88 - main
99 - next
1010 - " rc/**"
11-
1211 push :
1312 branches :
1413 - main
4746
4847 - name : Cache CodeQL
4948 id : cache-codeql
50- uses : actions/cache@v2.1.3
49+ uses : actions/cache@v4
5150 with :
5251 path : ${{ github.workspace }}/codeql_home
5352 key : codeql-home-${{ matrix.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library }}
@@ -98,15 +97,36 @@ jobs:
9897 CODEQL_HOME : ${{ github.workspace }}/codeql_home
9998 run : |
10099 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
104103
105104 cd ..
106105 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
107106
108107 - name : Upload GHAS Query Pack
109- uses : actions/upload-artifact@v3
108+ uses : actions/upload-artifact@v4
110109 with :
111110 name : code-scanning-cpp-query-pack.zip
112111 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