1010 CARGO_TERM_COLOR : always
1111
1212jobs :
13- queries :
14- runs-on : ubuntu-latest
13+ all-the-things :
14+ runs-on : ubuntu-latest-xl
1515 steps :
16+ # ## Build the queries ###
1617 - uses : actions/checkout@v3
1718 - name : Find codeql
1819 id : find-codeql
4849 name : query-pack-zip
4950 path : ${{ runner.temp }}/query-pack.zip
5051
51- extractors :
52- runs-on : ubuntu-latest
53-
54- steps :
55- - uses : actions/checkout@v3
52+ # ## Build the extractor ###
5653 - name : Cache entire extractor
5754 id : cache-extractor
5855 uses : actions/cache@v3
9693 ql/target/release/ql-extractor
9794 ql/target/release/ql-extractor.exe
9895 retention-days : 1
99- package :
100- runs-on : ubuntu-latest
10196
102- needs :
103- - extractors
104- - queries
105-
106- steps :
107- - uses : actions/checkout@v3
97+ # ## Package the queries and extractor ###
10898 - uses : actions/download-artifact@v3
10999 with :
110100 name : query-pack-zip
@@ -132,16 +122,8 @@ jobs:
132122 name : codeql-ql-pack
133123 path : codeql-ql.zip
134124 retention-days : 1
135- analyze :
136- runs-on : ubuntu-latest
137- strategy :
138- matrix :
139- folder : [cpp, csharp, java, javascript, python, ql, ruby, swift, go]
140-
141- needs :
142- - package
143125
144- steps :
126+ # ## Run the analysis ###
145127 - name : Download pack
146128 uses : actions/download-artifact@v3
147129 with :
@@ -161,12 +143,8 @@ jobs:
161143 env :
162144 PACK : ${{ runner.temp }}/pack
163145
164- - name : Checkout repository
165- uses : actions/checkout@v3
166146 - name : Create CodeQL config file
167147 run : |
168- echo "paths:" > ${CONF}
169- echo " - ${FOLDER}" >> ${CONF}
170148 echo "paths-ignore:" >> ${CONF}
171149 echo " - ql/ql/test" >> ${CONF}
172150 echo "disable-default-queries: true" >> ${CONF}
@@ -176,7 +154,6 @@ jobs:
176154 cat ${CONF}
177155 env :
178156 CONF : ./ql-for-ql-config.yml
179- FOLDER : ${{ matrix.folder }}
180157 - name : Initialize CodeQL
181158 uses : github/codeql-action/init@aa93aea877e5fb8841bcb1193f672abf6e9f2980
182159 with :
@@ -187,39 +164,14 @@ jobs:
187164 - name : Perform CodeQL Analysis
188165 uses : github/codeql-action/analyze@aa93aea877e5fb8841bcb1193f672abf6e9f2980
189166 with :
190- category : " ql-for-ql-${{ matrix.folder }} "
167+ category : " ql-for-ql"
191168 - name : Copy sarif file to CWD
192- run : cp ../results/ql.sarif ./${{ matrix.folder }} .sarif
169+ run : cp ../results/ql.sarif ./ql-for-ql .sarif
193170 - name : Fixup the $scema in sarif # Until https://github.com/microsoft/sarif-vscode-extension/pull/436/ is part in a stable release
194171 run : |
195- sed -i 's/\$schema.*/\$schema": "https:\/\/raw.githubusercontent.com\/oasis-tcs\/sarif-spec\/master\/Schemata\/sarif-schema-2.1.0",/' ${{ matrix.folder }} .sarif
172+ sed -i 's/\$schema.*/\$schema": "https:\/\/raw.githubusercontent.com\/oasis-tcs\/sarif-spec\/master\/Schemata\/sarif-schema-2.1.0",/' ql-for-ql .sarif
196173 - name : Sarif as artifact
197174 uses : actions/upload-artifact@v3
198175 with :
199- name : ${{ matrix.folder }}.sarif
200- path : ${{ matrix.folder }}.sarif
201-
202- combine :
203- runs-on : ubuntu-latest
204- needs :
205- - analyze
206-
207- steps :
208- - uses : actions/checkout@v3
209- - name : Make a folder for artifacts.
210- run : mkdir -p results
211- - name : Download all sarif files
212- uses : actions/download-artifact@v3
213- with :
214- path : results
215- - uses : actions/setup-node@v3
216- with :
217- node-version : 16
218- - name : Combine all sarif files
219- run : |
220- node ./ql/scripts/merge-sarif.js results/**/*.sarif combined.sarif
221- - name : Upload combined sarif file
222- uses : actions/upload-artifact@v3
223- with :
224- name : combined.sarif
225- path : combined.sarif
176+ name : ql-for-ql.sarif
177+ path : ql-for-ql.sarif
0 commit comments