|
27 | 27 | shell: bash
|
28 | 28 | env:
|
29 | 29 | CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
|
30 |
| - - name: Cache queries |
31 |
| - id: cache-queries |
32 |
| - uses: actions/cache@v3 |
33 |
| - with: |
34 |
| - 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 }} |
36 |
| - - name: Build query pack |
37 |
| - if: steps.cache-queries.outputs.cache-hit != 'true' |
38 |
| - run: | |
39 |
| - cd ql/ql/src |
40 |
| - "${CODEQL}" pack create |
41 |
| - cd .codeql/pack/codeql/ql/0.0.0 |
42 |
| - zip "${PACKZIP}" -r . |
43 |
| - rm -rf * |
44 |
| - env: |
45 |
| - CODEQL: ${{ steps.find-codeql.outputs.codeql-path }} |
46 |
| - PACKZIP: ${{ runner.temp }}/query-pack.zip |
47 |
| - - name: Upload query pack |
48 |
| - uses: actions/upload-artifact@v3 |
49 |
| - with: |
50 |
| - name: query-pack-zip |
51 |
| - path: ${{ runner.temp }}/query-pack.zip |
52 |
| - |
53 | 30 | ### Build the extractor ###
|
54 | 31 | - name: Cache entire extractor
|
55 | 32 | id: cache-extractor
|
@@ -95,17 +72,13 @@ jobs:
|
95 | 72 | ql/target/release/ql-extractor.exe
|
96 | 73 | retention-days: 1
|
97 | 74 |
|
98 |
| - ### Package the queries and extractor ### |
99 |
| - - uses: actions/download-artifact@v3 |
100 |
| - with: |
101 |
| - name: query-pack-zip |
102 |
| - path: query-pack-zip |
| 75 | + ### Package the extractor ### |
103 | 76 | - uses: actions/download-artifact@v3
|
104 | 77 | with:
|
105 | 78 | name: extractor-ubuntu-latest
|
106 | 79 | path: linux64
|
107 | 80 | - run: |
|
108 |
| - unzip query-pack-zip/*.zip -d pack |
| 81 | + mkdir pack |
109 | 82 | cp -r ql/codeql-extractor.yml ql/tools ql/ql/src/ql.dbscheme.stats pack/
|
110 | 83 | mkdir -p pack/tools/linux64
|
111 | 84 | if [[ -f linux64/ql-autobuilder ]]; then
|
@@ -164,6 +137,13 @@ jobs:
|
164 | 137 | db-location: ${{ runner.temp }}/db
|
165 | 138 | config-file: ./ql-for-ql-config.yml
|
166 | 139 |
|
| 140 | + - name: Cache queries |
| 141 | + id: cache-queries |
| 142 | + uses: actions/cache@v3 |
| 143 | + with: |
| 144 | + path: ql/ql/src/.cache |
| 145 | + key: queries-${{ hashFiles('ql/**/*.ql*') }}-${{ hashFiles('ql/**/qlpack.yml') }}-${{ hashFiles('ql/ql/src/ql.dbscheme*') }}-${{ steps.get-codeql-version.outputs.version }} |
| 146 | + |
167 | 147 | - name: Perform CodeQL Analysis
|
168 | 148 | uses: github/codeql-action/analyze@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
|
169 | 149 | with:
|
|
0 commit comments