Skip to content

Commit

Permalink
Bypass master.bash file in CI (#889)
Browse files Browse the repository at this point in the history
* Create tutorial-support.yml

* Update tutorial-support.yml

GpsApp tutorial to be pulled for build test and submodules to be pulled recursively

* Implementation of tutorial workflow

* typo in repo address

* Added missing github action file

* Changed workflow path

* Changed dir paths

* Work around for workflow

* work around

* troubleshooting

* troubleshoot

* troubleshoot

* Performance update

* Path correction

* troubleshoot

* Dockerfile correction

* path change

* path change

* path fix

* path fix

* path fix

* path fix

* paht fix

* Revert to changes

* Completed workflow for tutorial support

* troubleshoot

* Build path error

* Optimization of workflow

* Path fix

* Path fix

* Path fix #1

* path fix #2

* path check

* Workflow test

* Workflow test #2

* Added logging feature

* Logs Troubleshoot

* Typo fix

* Troubleshoot #1

* Troubleshoot #2

* Corrected typo on path

* Troubleshoot #3

* Troubleshoot #4

* Troubleshoot #5

* Removed log archive feature

* Changed repo path to conform pull request merge

* Test run #1

* test #2

* test #3

* added branch for workflow test

* test #4

* test #4

* test #5

* test #6

* Test #7

* test #8

* test #8

* Test #9

* Test #9

* Test #10

* Test #11

* Test #12

* Test #13

* Test #14

* Test #15

* Test #16

* Test #17

* Test #18

* Test #20

* Test #21

* Test #22

* Test #23

* Test #24

* Test #25

* Split test files

* Split tests #2

* Added executable permissions

* Delete RPI.bash

* Delete Ref.bash

* Delete Framework.bash

* exe files

* Make Framework.bash executable

* Make RPI.bash and Ref.bash executable

* Test #26

* Test #27

* Test #28

* Attached Integration test to Ref test

* Test #29

* Test #30

* Test #31

* Test #32

* Test #33

* Test #34

* Test #35

* Test #35

* Test #37

* Test #38

* Test #39

* Test #40

* Test #41

* Test #42

* Test #43

* Test #43

* Test #44

* Test #45

* Cleaned up files to remove commented code

* Remove CI test branch from workflow

* Incorporated comments for PR

* Modified path for framework job test

* Incoporate reviewer comment for PR

* Incoporated reviewer comment for PR

* Was using incorrect directory for the test

* Revised args call for jobs

* Passing args #1

* Define entrypoint directly from workflow

* Changed entrypoint method

* Changed entrypoint method #2

* Corrected test path

* Syntax correction

* Path Test #1

* Path test #2

* Path Test #4

* Path Test $5

* Test Path #6

* Path Test #6

* Path Test #7

* Path Test #8

* Refactored scripts to remove master.bash

* Corrected test path

* Fixed log problems

* Entrypoint alternative

* Bypassed master.bash file

* Added line for better CI error messages
  • Loading branch information
r9-pena committed Aug 4, 2021
1 parent ba57967 commit 8fddb8c
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 44 deletions.
3 changes: 1 addition & 2 deletions .github/actions/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ if [ "$GITHUB_WORKFLOW" == "Autodocs" ]
then
/autodoc.bash
else
#echo "$INPUT_TEST1"
"$GITHUB_WORKSPACE/ci/master.bash" $INPUT_TEST
"$GITHUB_WORKSPACE/ci/tests/$INPUT_TEST.bash"
fi
1 change: 1 addition & 0 deletions .github/actions/github-ci-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ runs:
image: 'Dockerfile'
args:
- ${{ inputs.test }}
# entrypoint: '$GITHUB_WORKSPACE/ci/tests/${{ inputs.test }}.bash'
26 changes: 0 additions & 26 deletions ci/master.bash

This file was deleted.

21 changes: 17 additions & 4 deletions ci/tests/30-ints.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,27 @@
#
# Integration tests for CI
####
export CTEST_OUTPUT_ON_FAILURE=1

export SCRIPT_DIR="$(dirname ${BASH_SOURCE})"
. "${SCRIPT_DIR}/../helpers.bash"
. ${SCRIPT_DIR}/fputil.bash

#### NEEDED ENVIRONMENT ####
export FPRIME_DIR="$(cd ${SCRIPT_DIR}/../..; pwd)"
export LOG_DIR="${FPRIME_DIR}/ci-30-ints-logs-$(date +"%Y-%m-%dT%H%M%S")"
mkdir -p "${LOG_DIR}"

# Directory to be used for Integration CI test
export FPUTIL_DEPLOYS="${FPRIME_DIR}/Ref"

export SCRIPT_DIR="$(dirname ${BASH_SOURCE})/.."
. "${SCRIPT_DIR}/helpers.bash"

. ${SCRIPT_DIR}/tests/fputil.bash
echo -e "${BLUE}Starting CI test ${FPUTIL_DEPLOYS} Ref${NOCOLOR}"

# Run integration tests
echo -e "${BLUE}Testing ${INT_DEPLOYS} against integration tests${NOCOLOR}"
integration_test "${FPUTIL_DEPLOYS}"

# Test Completed
echo -e "${GREEN}CI test ${FPUTIL_DEPLOYS} Integration SUCCESSFUL${NOCOLOR}"

archive_logs
22 changes: 18 additions & 4 deletions ci/tests/Framework.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@
#
# Run the tests on the software through fp-util.
####
export CTEST_OUTPUT_ON_FAILURE=1

export SCRIPT_DIR="$(dirname ${BASH_SOURCE})"
. "${SCRIPT_DIR}/../helpers.bash"
. ${SCRIPT_DIR}/fputil.bash

#### NEEDED ENVIRONMENT ####
export FPRIME_DIR="$(cd ${SCRIPT_DIR}/../..; pwd)"
export LOG_DIR="${FPRIME_DIR}/ci-Framework-logs-$(date +"%Y-%m-%dT%H%M%S")"
mkdir -p "${LOG_DIR}"

# Directory to be used for Framework CI test
export FPUTIL_DEPLOYS="${FPRIME_DIR}"

export SCRIPT_DIR="$(dirname ${BASH_SOURCE})/.."
. "${SCRIPT_DIR}/helpers.bash"
. ${SCRIPT_DIR}/tests/fputil.bash
echo -e "${BLUE}Starting CI test ${FPUTIL_DEPLOYS} Ref${NOCOLOR}"

export CMAKE_EXTRA_SETTINGS=""
echo -e "${BLUE}Testing ${FPUTIL_DEPLOYS} against fprime-util targets: ${FPUTIL_TARGETS[@]}${NOCOLOR}"
Expand All @@ -21,4 +30,9 @@ do
rm -rf "${FPUTIL_DEPLOYS}/build-fprime-automatic-"*
fi
fputil_action "${FPUTIL_DEPLOYS}" "${target}"
done
done

# Test Completed
echo -e "${GREEN}CI test ${FPUTIL_DEPLOYS} Framework SUCCESSFUL${NOCOLOR}"

archive_logs
24 changes: 19 additions & 5 deletions ci/tests/RPI.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@
#
# Run the tests on the software through fp-util.
####
# Directory to be used for RPI CI test
export CTEST_OUTPUT_ON_FAILURE=1

export SCRIPT_DIR="$(dirname ${BASH_SOURCE})"
. "${SCRIPT_DIR}/../helpers.bash"
. ${SCRIPT_DIR}/fputil.bash

#### NEEDED ENVIRONMENT ####
export FPRIME_DIR="$(cd ${SCRIPT_DIR}/../..; pwd)"
export LOG_DIR="${FPRIME_DIR}/ci-RPI-logs-$(date +"%Y-%m-%dT%H%M%S")"
mkdir -p "${LOG_DIR}"

# Directory to be used for Ref CI test
export FPUTIL_DEPLOYS="${FPRIME_DIR}/RPI"

export SCRIPT_DIR="$(dirname ${BASH_SOURCE})/.."
. "${SCRIPT_DIR}/helpers.bash"
. ${SCRIPT_DIR}/tests/fputil.bash
echo -e "${BLUE}Starting CI test ${FPUTIL_DEPLOYS} RPI${NOCOLOR}"

export CMAKE_EXTRA_SETTINGS=""
if [ ! -d "/opt/rpi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf" ]
Expand All @@ -29,4 +38,9 @@ do
rm -rf "${FPUTIL_DEPLOYS}/build-fprime-automatic-"*
fi
fputil_action "${FPUTIL_DEPLOYS}" "${target}"
done
done

# Test Completed
echo -e "${GREEN}CI test ${FPUTIL_DEPLOYS} RPI SUCCESSFUL${NOCOLOR}"

archive_logs
21 changes: 18 additions & 3 deletions ci/tests/Ref.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@
#
# Run the tests on the software through fp-util.
####
export CTEST_OUTPUT_ON_FAILURE=1

export SCRIPT_DIR="$(dirname ${BASH_SOURCE})"
. "${SCRIPT_DIR}/../helpers.bash"
. ${SCRIPT_DIR}/fputil.bash

#### NEEDED ENVIRONMENT ####
export FPRIME_DIR="$(cd ${SCRIPT_DIR}/../..; pwd)"
export LOG_DIR="${FPRIME_DIR}/ci-Ref-logs-$(date +"%Y-%m-%dT%H%M%S")"
mkdir -p "${LOG_DIR}"

# Directory to be used for Ref CI test
export FPUTIL_DEPLOYS="${FPRIME_DIR}/Ref"

export SCRIPT_DIR="$(dirname ${BASH_SOURCE})/.."
. "${SCRIPT_DIR}/helpers.bash"
. ${SCRIPT_DIR}/tests/fputil.bash
echo -e "${BLUE}Starting CI test ${FPUTIL_DEPLOYS} Ref${NOCOLOR}"

export CMAKE_EXTRA_SETTINGS=""
# For Ref deployment to disable FRAMEWORK UTS
export CMAKE_EXTRA_SETTINGS="${CMAKE_EXTRA_SETTINGS} -DFPRIME_ENABLE_FRAMEWORK_UTS=OFF"

echo -e "${BLUE}Testing ${FPUTIL_DEPLOYS} against fprime-util targets: ${FPUTIL_TARGETS[@]}${NOCOLOR}"

export CHECK_TARGET_PLATFORM="native"
for target in "${FPUTIL_TARGETS[@]}"
do
Expand All @@ -25,3 +35,8 @@ do
fi
fputil_action "${FPUTIL_DEPLOYS}" "${target}"
done

# Test Completed
echo -e "${GREEN}CI test ${FPUTIL_DEPLOYS} Ref SUCCESSFUL${NOCOLOR}"

archive_logs

0 comments on commit 8fddb8c

Please sign in to comment.