8
8
- main
9
9
- next
10
10
- " rc/**"
11
-
12
11
push :
13
12
branches :
14
13
- main
47
46
48
47
- name : Cache CodeQL
49
48
id : cache-codeql
50
- uses : actions/cache@v2.1.3
49
+ uses : actions/cache@v4
51
50
with :
52
51
path : ${{ github.workspace }}/codeql_home
53
52
key : codeql-home-${{ matrix.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library }}
@@ -98,15 +97,36 @@ jobs:
98
97
CODEQL_HOME : ${{ github.workspace }}/codeql_home
99
98
run : |
100
99
PATH=$PATH:$CODEQL_HOME/codeql
101
-
102
- codeql query compile --precompile --threads 0 cpp
103
- codeql query compile --precompile --threads 0 c
100
+ # Precompile all queries, and use a compilation cache larger than default
101
+ # to ensure we cache all the queries for later steps
102
+ codeql query compile --precompile --threads 0 --compilation-cache-size=1024 cpp c
104
103
105
104
cd ..
106
105
zip -r codeql-coding-standards/code-scanning-cpp-query-pack.zip codeql-coding-standards/c/ codeql-coding-standards/cpp/ codeql-coding-standards/.codeqlmanifest.json codeql-coding-standards/supported_codeql_configs.json codeql-coding-standards/scripts/configuration codeql-coding-standards/scripts/reports codeql-coding-standards/scripts/shared codeql-coding-standards/scripts/guideline_recategorization codeql-coding-standards/schemas
107
106
108
107
- name : Upload GHAS Query Pack
109
- uses : actions/upload-artifact@v3
108
+ uses : actions/upload-artifact@v4
110
109
with :
111
110
name : code-scanning-cpp-query-pack.zip
112
111
path : code-scanning-cpp-query-pack.zip
112
+
113
+ - name : Create qlpack bundles
114
+ env :
115
+ CODEQL_HOME : ${{ github.workspace }}/codeql_home
116
+ run : |
117
+ PATH=$PATH:$CODEQL_HOME/codeql
118
+
119
+ codeql pack bundle --output=common-cpp-coding-standards.tgz cpp/common/src
120
+ codeql pack bundle --output=common-c-coding-standards.tgz c/common/src
121
+ codeql pack bundle --output=misra-c-coding-standards.tgz c/misra/src
122
+ codeql pack bundle --output=cert-c-coding-standards.tgz c/cert/src
123
+ codeql pack bundle --output=cert-cpp-coding-standards.tgz cpp/cert/src
124
+ codeql pack bundle --output=autosar-cpp-coding-standards.tgz cpp/autosar/src
125
+ codeql pack bundle --output=misra-cpp-coding-standards.tgz cpp/misra/src
126
+ codeql pack bundle --output=report-coding-standards.tgz cpp/report/src
127
+
128
+ - name : Upload qlpack bundles
129
+ uses : actions/upload-artifact@v4
130
+ with :
131
+ name : coding-standards-codeql-packs
132
+ path : ' *-coding-standards.tgz'
0 commit comments