From b4f34c1a7a6c2e850a522a34408f311a6bba1c4b Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Mon, 18 Apr 2022 09:33:15 -0600 Subject: [PATCH] Fix #236, Switch to reusable build-run workflow --- .github/workflows/build-cfs.yml | 86 ----------------------------- .github/workflows/build-run-app.yml | 10 ++++ 2 files changed, 10 insertions(+), 86 deletions(-) delete mode 100644 .github/workflows/build-cfs.yml create mode 100644 .github/workflows/build-run-app.yml diff --git a/.github/workflows/build-cfs.yml b/.github/workflows/build-cfs.yml deleted file mode 100644 index 7eec1837..00000000 --- a/.github/workflows/build-cfs.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Build and Run [OMIT_DEPRECATED = true] - -# Run every time a new commit pushed or for pull requests -on: - push: - pull_request: - -env: - SIMULATION: native - OMIT_DEPRECATED: true - ENABLE_UNIT_TESTS: false - -jobs: - #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. - check-for-duplicates: - runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'same_content' - skip_after_successful_duplicate: 'true' - do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' - - build-run: - needs: check-for-duplicates - if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} - runs-on: ubuntu-18.04 - timeout-minutes: 15 - - steps: - - name: Checkout bundle - uses: actions/checkout@v2 - with: - repository: nasa/cFS - submodules: true - - - name: Checkout bundle - uses: actions/checkout@v2 - with: - path: apps/cf - - - name: Check versions - run: git submodule - - - name: Add cf app - run: | - sed -i '7i CFE_APP, cf, CF_AppMain, CF, 80, 16384, 0x0, 0; \n' cfe/cmake/sample_defs/cpu1_cfe_es_startup.scr - sed -i -e 's|SET(cpu1_APPLIST ci_lab to_lab sch_lab)| SET(cpu1_APPLIST ci_lab to_lab sch_lab cf) |g' cfe/cmake/sample_defs/targets.cmake - - - name: Set up for build - run: | - cp ./cfe/cmake/Makefile.sample Makefile - cp -r ./cfe/cmake/sample_defs sample_defs - - name: Prep Build - run: make prep - - - name: Make Install - run: make install - - - name: Run cFS - run: | - ./core-cpu1 > cFS_startup_cpu1.txt & - sleep 30 - ../host/cmdUtil --endian=LE --pktid=0x1806 --cmdcode=2 --half=0x0002 - working-directory: ./build/exe/cpu1/ - - - name: Archive cFS Startup Artifacts - uses: actions/upload-artifact@v2 - with: - name: cFS-startup-log-omit-deprecate-true - path: ./build/exe/cpu1/cFS_startup_cpu1.txt - - - name: Check for cFS Warnings - run: | - if [[ -n $(grep -i "warn\|err\|fail" cFS_startup_cpu1.txt) ]]; then - echo "Must resolve warn|err|fail in cFS startup before submitting a pull request" - echo "" - grep -i 'warn\|err\|fail' cFS_startup_cpu1.txt - exit -1 - fi - working-directory: ./build/exe/cpu1/ - diff --git a/.github/workflows/build-run-app.yml b/.github/workflows/build-run-app.yml new file mode 100644 index 00000000..52bbb8c1 --- /dev/null +++ b/.github/workflows/build-run-app.yml @@ -0,0 +1,10 @@ +name: Build and Run + +on: + push: + pull_request: + +jobs: + build-run: + name: Build and run with startup msg verification + uses: nasa/cFS/.github/workflows/build-run-app.yml@main