Skip to content

Commit

Permalink
Moves build, run, test steps into one job. Removes redundant caches
Browse files Browse the repository at this point in the history
  • Loading branch information
chillfig committed Apr 1, 2022
1 parent 3b77134 commit aa21622
Showing 1 changed file with 3 additions and 50 deletions.
53 changes: 3 additions & 50 deletions .github/workflows/build-cfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

build-cf-omit-deprecated-true:
name: Build
build-run-test:
name: Build, Run, Test
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -85,29 +85,6 @@ jobs:

- name: Make Install
run: make install

run-cf-omit-deprecated-true:
name: Run
needs: build-cf-omit-deprecated-true
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
buildtype: [debug, release]

# Set the type of machine to run on
env:
BUILDTYPE: ${{ matrix.buildtype }}

steps:
- name: Cache Source and Build
id: cache-src-bld
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/*
key: build-${{ github.run_number }}-${{ matrix.buildtype }}-${{ matrix.os }}

- name: Run cFS
run: |
Expand All @@ -131,33 +108,9 @@ jobs:
exit -1
fi
working-directory: ./build/exe/cpu1/

tests-and-coverage-omit-deprecated-true:
name: Run Unit Tests and Check Coverage
needs: run-cf-omit-deprecated-true
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
buildtype: [debug, release]

# Set the type of machine to run on
env:
BUILDTYPE: ${{ matrix.buildtype }}
ENABLE_UNIT_TESTS: true

steps:
- name: Install Dependencies
run: sudo apt-get install lcov -y

- name: Cache Source and Build
id: cache-src-bld
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/*
key: build-${{ github.run_number }}-${{ matrix.buildtype }}-${{ matrix.os }}
run: sudo apt-get install lcov -y

- name: Run Tests
run: make test
Expand Down

0 comments on commit aa21622

Please sign in to comment.