@@ -16,20 +16,19 @@ jobs:
1616 env :
1717 CODEQL_THREADS : 4 # TODO: remove this once it's set by the CLI
1818 strategy :
19- fail-fast : false
2019 matrix :
21- repo : [github/codeql]
20+ repo :
21+ - github/codeql
22+ - github/codeql-go
2223 runs-on : ubuntu-latest
2324 steps :
2425 - uses : actions/checkout@v2
2526
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
3332 - uses : actions/cache@v2
3433 with :
3534 path : |
@@ -38,24 +37,29 @@ jobs:
3837 ql/target
3938 key : ${{ runner.os }}-qltest-cargo-${{ hashFiles('**/Cargo.lock') }}
4039 - 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 }}
4343 - name : Checkout ${{ matrix.repo }}
4444 uses : actions/checkout@v2
4545 with :
4646 repository : ${{ matrix.repo }}
4747 path : ${{ github.workspace }}/repo
4848 - name : Create database
4949 run : |
50- codeql/codeql database create \
50+ "${CODEQL}" database create \
5151 --search-path "ql/" \
5252 --threads 4 \
5353 --language ql --source-root "${{ github.workspace }}/repo" \
5454 "${{ runner.temp }}/database"
55+ env :
56+ CODEQL : ${{ steps.find-codeql.outputs.codeql-path }}
5557 - name : Measure database
5658 run : |
5759 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 }}
5963 - uses : actions/upload-artifact@v2
6064 with :
6165 name : measurements
7377 path : stats
7478 - run : |
7579 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
7781 - uses : actions/upload-artifact@v2
7882 with :
7983 name : ql.dbscheme.stats
0 commit comments