Skip to content

Commit cede617

Browse files
authored
Merge pull request #10012 from erik-krogh/update-ql-for-ql-action
QL: update codeql-action in QL-for-QL
2 parents 72c2040 + b3adb62 commit cede617

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.github/workflows/ql-for-ql-build.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v3
1818
- name: Find codeql
1919
id: find-codeql
20-
uses: github/codeql-action/init@aa93aea877e5fb8841bcb1193f672abf6e9f2980
20+
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
2121
with:
2222
languages: javascript # does not matter
2323
- name: Get CodeQL version
@@ -32,12 +32,12 @@ jobs:
3232
uses: actions/cache@v3
3333
with:
3434
path: ${{ runner.temp }}/query-pack.zip
35-
key: queries-${{ hashFiles('ql/**/*.ql*') }}-${{ hashFiles('ql/**/qlpack.yml') }}-${{ hashFiles('ql/ql/src/ql.dbscheme*') }}-${{ steps.get-codeql-version.outputs.version }}
35+
key: queries-${{ hashFiles('ql/**/*.ql*') }}-${{ hashFiles('ql/**/qlpack.yml') }}-${{ hashFiles('ql/ql/src/ql.dbscheme*') }}-${{ steps.get-codeql-version.outputs.version }}--${{ hashFiles('.github/workflows/ql-for-ql-build.yml') }}
3636
- name: Build query pack
3737
if: steps.cache-queries.outputs.cache-hit != 'true'
3838
run: |
3939
cd ql/ql/src
40-
"${CODEQL}" pack create
40+
"${CODEQL}" pack create -j 16
4141
cd .codeql/pack/codeql/ql/0.0.0
4242
zip "${PACKZIP}" -r .
4343
rm -rf *
@@ -151,21 +151,26 @@ jobs:
151151
echo " - ql/ql/test" >> ${CONF}
152152
echo " - \"*/ql/lib/upgrades/\"" >> ${CONF}
153153
echo "disable-default-queries: true" >> ${CONF}
154-
echo "packs:" >> ${CONF}
155-
echo " - codeql/ql" >> ${CONF}
154+
echo "queries:" >> ${CONF}
155+
echo " - uses: ./ql/ql/src/codeql-suites/ql-code-scanning.qls" >> ${CONF}
156156
echo "Config file: "
157157
cat ${CONF}
158158
env:
159159
CONF: ./ql-for-ql-config.yml
160160
- name: Initialize CodeQL
161-
uses: github/codeql-action/init@aa93aea877e5fb8841bcb1193f672abf6e9f2980
161+
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
162162
with:
163163
languages: ql
164164
db-location: ${{ runner.temp }}/db
165165
config-file: ./ql-for-ql-config.yml
166+
- name: Move pack cache
167+
run: |
168+
cp -r ${PACK}/.cache ql/ql/src/.cache
169+
env:
170+
PACK: ${{ runner.temp }}/pack
166171

167172
- name: Perform CodeQL Analysis
168-
uses: github/codeql-action/analyze@aa93aea877e5fb8841bcb1193f672abf6e9f2980
173+
uses: github/codeql-action/analyze@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
169174
with:
170175
category: "ql-for-ql"
171176
- name: Copy sarif file to CWD

.github/workflows/ql-for-ql-dataset_measure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Find codeql
2727
id: find-codeql
28-
uses: github/codeql-action/init@aa93aea877e5fb8841bcb1193f672abf6e9f2980
28+
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
2929
with:
3030
languages: javascript # does not matter
3131
- uses: actions/cache@v3

.github/workflows/ql-for-ql-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v3
2323
- name: Find codeql
2424
id: find-codeql
25-
uses: github/codeql-action/init@aa93aea877e5fb8841bcb1193f672abf6e9f2980
25+
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
2626
with:
2727
languages: javascript # does not matter
2828
- uses: actions/cache@v3

0 commit comments

Comments
 (0)