@@ -2,9 +2,9 @@ name: "CodeQL Analysis"
2
2
3
3
on :
4
4
push :
5
+ pull_request :
5
6
branches :
6
7
- main
7
- pull_request :
8
8
9
9
env :
10
10
SIMULATION : native
13
13
BUILDTYPE : release
14
14
15
15
jobs :
16
+ # Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
17
+ check-for-duplicates :
18
+ runs-on : ubuntu-latest
19
+ # Map a step output to a job output
20
+ outputs :
21
+ should_skip : ${{ steps.skip_check.outputs.should_skip }}
22
+ steps :
23
+ - id : skip_check
24
+ uses : fkirc/skip-duplicate-actions@master
25
+ with :
26
+ concurrent_skipping : ' same_content'
27
+ skip_after_successful_duplicate : ' true'
28
+ do_not_skip : ' ["pull_request", "workflow_dispatch", "schedule"]'
16
29
17
- CodeQL-Build :
30
+ CodeQL-Security-Build :
31
+ needs : check-for-duplicates
32
+ if : ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
18
33
runs-on : ubuntu-18.04
19
34
timeout-minutes : 15
20
35
38
53
uses : github/codeql-action/init@v1
39
54
with :
40
55
languages : c
41
- queries : +security-extended, security-and-quality
56
+ config-file : nasa/cFS-GroundSystem/.github/codeql/codeql-security.yml@main
42
57
43
58
# Setup the build system
44
59
- name : Set up for build
53
68
54
69
- name : Perform CodeQL Analysis
55
70
uses : github/codeql-action/analyze@v1
71
+
72
+ CodeQL-Coding-Standard-Build :
73
+ needs : check-for-duplicates
74
+ if : ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
75
+ runs-on : ubuntu-18.04
76
+ timeout-minutes : 15
77
+
78
+ steps :
79
+ # Checks out a copy of your repository on the ubuntu-latest machine
80
+ - name : Checkout bundle
81
+ uses : actions/checkout@v2
82
+ with :
83
+ repository : nasa/cFS
84
+ submodules : true
85
+
86
+ - name : Checkout submodule
87
+ uses : actions/checkout@v2
88
+ with :
89
+ path : tools/cFS-GroundSystem
90
+
91
+ - name : Check versions
92
+ run : git submodule
93
+
94
+ - name : Initialize CodeQL
95
+ uses : github/codeql-action/init@v1
96
+ with :
97
+ languages : c
98
+ config-file : nasa/cFS-GroundSystem/.github/codeql/codeql-coding-standard.yml@main
99
+
100
+ # Setup the build system
101
+ - name : Set up for build
102
+ run : |
103
+ cp ./cfe/cmake/Makefile.sample Makefile
104
+ cp -r ./cfe/cmake/sample_defs sample_defs
105
+ make prep
106
+
107
+ # Build the code
108
+ - name : Build
109
+ run : make tools/cFS-GroundSystem/Subsystems/cmdUtil/
110
+
111
+ - name : Perform CodeQL Analysis
112
+ uses : github/codeql-action/analyze@v1
0 commit comments