-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from skliper/fix68-add_codeql
Fix #68, Add CodeQL analysis to workflow
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: "CodeQL Analysis" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
SIMULATION: native | ||
ENABLE_UNIT_TESTS: true | ||
OMIT_DEPRECATED: true | ||
BUILDTYPE: release | ||
|
||
jobs: | ||
|
||
CodeQL-Build: | ||
runs-on: ubuntu-18.04 | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
# Checks out a copy of your repository on the ubuntu-latest machine | ||
- name: Checkout bundle | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: nasa/cFS | ||
submodules: true | ||
|
||
- name: Checkout submodule | ||
uses: actions/checkout@v2 | ||
with: | ||
path: tools/elf2cfetbl | ||
|
||
- name: Check versions | ||
run: git submodule | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: c | ||
queries: +security-extended, security-and-quality | ||
|
||
# Setup the build system | ||
- name: Set up for build | ||
run: | | ||
cp ./cfe/cmake/Makefile.sample Makefile | ||
cp -r ./cfe/cmake/sample_defs sample_defs | ||
make prep | ||
# Build the code | ||
- name: Build | ||
run: make tools/elf2cfetbl/ | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |