Skip to content

Commit bd54771

Browse files
authored
Merge pull request #1163 from skliper/fix1162-add_codeql
Fix #1162, Add CodeQL analysis to workflow
2 parents 0d1e7c0 + cfb01fb commit bd54771

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/codeql-build.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: "CodeQL Analysis"
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
SIMULATION: native
9+
ENABLE_UNIT_TESTS: true
10+
OMIT_DEPRECATED: true
11+
BUILDTYPE: release
12+
13+
jobs:
14+
15+
CodeQL-Build:
16+
runs-on: ubuntu-18.04
17+
timeout-minutes: 15
18+
19+
steps:
20+
# Checks out a copy of your repository on the ubuntu-latest machine
21+
- name: Checkout bundle
22+
uses: actions/checkout@v2
23+
with:
24+
repository: nasa/cFS
25+
submodules: true
26+
27+
- name: Checkout submodule
28+
uses: actions/checkout@v2
29+
with:
30+
path: cfe
31+
32+
- name: Check versions
33+
run: git submodule
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v1
37+
with:
38+
languages: c
39+
queries: +security-extended, security-and-quality
40+
41+
# Setup the build system
42+
- name: Set up for build
43+
run: |
44+
cp ./cfe/cmake/Makefile.sample Makefile
45+
cp -r ./cfe/cmake/sample_defs sample_defs
46+
make prep
47+
48+
# Build the code
49+
- name: Build
50+
run: |
51+
make cfe-core
52+
make native/default_cpu1/cfe-core/unit-test/
53+
make native/default_cpu1/cfe-core/ut-stubs/
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)