Skip to content

Commit

Permalink
Fix #264, CodeQL Dependent on Successful Build
Browse files Browse the repository at this point in the history
  • Loading branch information
arielswalker committed Jul 16, 2021
1 parent fb2968d commit 3c9db50
Showing 1 changed file with 79 additions and 5 deletions.
84 changes: 79 additions & 5 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,87 @@ jobs:
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

CodeQL-Security-Build:

build-cfs:
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
name: Build
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:
# Check out the cfs bundle
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true

# Setup the build system
- name: Copy Files
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
- name: Make Prep
run: make prep

- name: Make
run: make

test-cfs:
name: Test
runs-on: ubuntu-18.04

needs: build-cfs

strategy:
fail-fast: false
matrix:
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

# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true

# Setup the build system
- name: Copy Files
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
- name: Make
run: make

- name: Run Tests
run: make test

- name: Check Coverage
run: make lcov


CodeQL-Security-Build:
needs: test-cfs
runs-on: ubuntu-18.04
timeout-minutes: 15

Expand Down Expand Up @@ -75,9 +151,7 @@ jobs:
uses: github/codeql-action/analyze@v1

CodeQL-Coding-Standard-Build:
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
needs: test-cfs
runs-on: ubuntu-18.04
timeout-minutes: 15

Expand Down

0 comments on commit 3c9db50

Please sign in to comment.