Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cFS Bundle Integration candidate: 2021-09-21 #359

Merged
merged 4 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix #334, Add cache to all jobs
- Combine build-prep and build-cfs jobs
- Rename jobs and artifacts for consistency and clarity
- Update workflow trigger for codeql build
  • Loading branch information
astrogeco committed Sep 22, 2021
commit fa8512c584cb9546144706df87acfdd05ca792a1
114 changes: 46 additions & 68 deletions .github/workflows/build-cfs-deprecated.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Deprecated Build, Test, and Run"
name: Build, Test, and Run [OMIT_DEPRECATED = false]

# Run every time a new commit pushed or for pull requests
on:
Expand All @@ -25,23 +25,31 @@ jobs:
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

prep-env:
name: Prepare Environment
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.

build-cfs-omit-deprecated-false:
name: "[Deprecated] Build"
needs: check-for-duplicates
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
buildtype: [debug, release]

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

steps:
- name: Cache Source and proto-build
id: cache-src-proto-bld
- 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: proto-build-${{ github.run_number }}
key: deprecated-build-${{ github.run_number }}-${{ matrix.buildtype }}

- name: Checkout cFS
if: steps.cache-src-proto-bld.outputs.cache-hit != 'true'
if: steps.cache-src-bld.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
submodules: true
Expand All @@ -56,35 +64,13 @@ jobs:

- name: Prep Build
run: make prep

build-cfs:
name: Build
needs: prep-env
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
buildtype: [debug, release]

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

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

- name: Make
run: make
run: make install

test-cfs:
name: Test
needs: build-cfs
tests-and-coverage-omit-deprecated-false:
name: "[Deprecated] Run Unit Tests and Check Coverage"
needs: build-cfs-omit-deprecated-false
runs-on: ubuntu-18.04

strategy:
Expand All @@ -101,28 +87,22 @@ jobs:
- name: Install Dependencies
run: sudo apt-get install lcov -y

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

- name: Prep Build
run: make prep

- name: Make
run: make

key: deprecated-build-${{ github.run_number }}-${{ matrix.buildtype }}

- name: Run Tests
run: make test

- name: Check Coverage
run: make lcov

run-cfs:
name: Run
needs: build-cfs
run-cfs-omit-deprecated-false:
name: "[Deprecated] Run cFS"
needs: build-cfs-omit-deprecated-false
runs-on: ubuntu-18.04

strategy:
Expand All @@ -135,16 +115,13 @@ jobs:
BUILDTYPE: ${{ matrix.buildtype }}

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

# Setup the build system
- name: Make Install
run: make install

- name: List cpu1
run: ls build/exe/cpu1/
Expand All @@ -159,7 +136,7 @@ jobs:
- name: Archive cFS Startup Artifacts
uses: actions/upload-artifact@v2
with:
name: cFS-startup-log-deprecate-true-${{ matrix.buildtype }}
name: cFS-startup-log-omit-deprecate-false${{ matrix.buildtype }}
path: ./build/exe/cpu1/cFS_startup_cpu1.txt

- name: Check for cFS Warnings
Expand All @@ -172,30 +149,31 @@ jobs:
fi
working-directory: ./build/exe/cpu1/


Functional-Test-Build:
run-functional-test-app-omit-deprecated-false:
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
needs: build-cfs
needs: run-cfs-omit-deprecated-false
name: "[DEPRECATED] cFS Functional Tests"
runs-on: ubuntu-18.04
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
buildtype: [debug, release]

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

# Setup the build system
- name: Make Install
run: make install
key: deprecated-build-${{ github.run_number }}-${{ matrix.buildtype }}

- name: List cpu1
run: ls build/exe/cpu1/

# Run cFS, send commands to set perf trigger and start perf data, and run functional tests
- name: Run cFS Functional
- name: Run cFS Functional Tests
run: |
./core-cpu1 &
sleep 10
Expand All @@ -219,10 +197,10 @@ jobs:
../host/cmdUtil --endian=LE --pktid=0x1806 --cmdcode=2 --half=0x0002
working-directory: ./build/exe/cpu1/

- name: Archive cFS Startup Artifacts
- name: Archive Functional Test Artifacts
uses: actions/upload-artifact@v2
with:
name: cFS-functional-log-deprecate-true-${{ matrix.buildtype }}
name: cFS-functional-test-log-omit-deprecate-false-${{ matrix.buildtype }}
path: ./build/exe/cpu1/cf/cfe_test.log

- name: Check for cFS Warnings
Expand Down
Loading