@@ -16,20 +16,19 @@ jobs:
16
16
env :
17
17
CODEQL_THREADS : 4 # TODO: remove this once it's set by the CLI
18
18
strategy :
19
- fail-fast : false
20
19
matrix :
21
- repo : [github/codeql]
20
+ repo :
21
+ - github/codeql
22
+ - github/codeql-go
22
23
runs-on : ubuntu-latest
23
24
steps :
24
25
- uses : actions/checkout@v2
25
26
26
- - name : Fetch CodeQL
27
- run : |
28
- LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | tail -1)
29
- gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
30
- unzip -q codeql-linux64.zip
31
- env :
32
- GITHUB_TOKEN : ${{ github.token }}
27
+ - name : Find codeql
28
+ id : find-codeql
29
+ uses : github/codeql-action/init@esbena/ql
30
+ with :
31
+ languages : javascript # does not matter
33
32
- uses : actions/cache@v2
34
33
with :
35
34
path : |
@@ -38,24 +37,29 @@ jobs:
38
37
ql/target
39
38
key : ${{ runner.os }}-qltest-cargo-${{ hashFiles('**/Cargo.lock') }}
40
39
- name : Build Extractor
41
- run : cd ql; env "PATH=$PATH:${{ github.workspace }}/codeql" ./create-extractor-pack.sh
42
-
40
+ run : cd ql; env "PATH=$PATH:`dirname ${CODEQL}`" ./create-extractor-pack.sh
41
+ env :
42
+ CODEQL : ${{ steps.find-codeql.outputs.codeql-path }}
43
43
- name : Checkout ${{ matrix.repo }}
44
44
uses : actions/checkout@v2
45
45
with :
46
46
repository : ${{ matrix.repo }}
47
47
path : ${{ github.workspace }}/repo
48
48
- name : Create database
49
49
run : |
50
- codeql/codeql database create \
50
+ "${CODEQL}" database create \
51
51
--search-path "ql/" \
52
52
--threads 4 \
53
53
--language ql --source-root "${{ github.workspace }}/repo" \
54
54
"${{ runner.temp }}/database"
55
+ env :
56
+ CODEQL : ${{ steps.find-codeql.outputs.codeql-path }}
55
57
- name : Measure database
56
58
run : |
57
59
mkdir -p "stats/${{ matrix.repo }}"
58
- codeql/codeql dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ql"
60
+ "${CODEQL}" dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ql"
61
+ env :
62
+ CODEQL : ${{ steps.find-codeql.outputs.codeql-path }}
59
63
- uses : actions/upload-artifact@v2
60
64
with :
61
65
name : measurements
73
77
path : stats
74
78
- run : |
75
79
python -m pip install --user lxml
76
- find stats -name 'stats.xml' | sort | xargs python ql/scripts/merge_stats.py --output ql/ql/src/ql.dbscheme.stats --normalise ql_tokeninfo
80
+ find stats -name 'stats.xml' -print0 | sort -z | xargs -0 python ql/scripts/merge_stats.py --output ql/ql/src/ql.dbscheme.stats --normalise ql_tokeninfo
77
81
- uses : actions/upload-artifact@v2
78
82
with :
79
83
name : ql.dbscheme.stats
0 commit comments