From 393de98facbe29a124c3e95dffcf1f2d505b9391 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 7 Oct 2026 12:00:32 +0100 Subject: [PATCH 1/3] QL4QL: Install CodeQL with `setup-codeql` rather than `init` Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ql-for-ql-build.yml | 3 +-- .github/workflows/ql-for-ql-dataset_measure.yml | 4 +--- .github/workflows/ql-for-ql-tests.yml | 6 ++---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ql-for-ql-build.yml b/.github/workflows/ql-for-ql-build.yml index e05a7c39c4b8..54c7b63d591f 100644 --- a/.github/workflows/ql-for-ql-build.yml +++ b/.github/workflows/ql-for-ql-build.yml @@ -24,9 +24,8 @@ jobs: fetch-depth: 0 - name: Find codeql id: find-codeql - uses: github/codeql-action/init@main + uses: github/codeql-action/setup-codeql@main with: - languages: javascript # does not matter tools: nightly - uses: ./.github/actions/os-version id: os_version diff --git a/.github/workflows/ql-for-ql-dataset_measure.yml b/.github/workflows/ql-for-ql-dataset_measure.yml index b4561c04a965..069e5c8a4174 100644 --- a/.github/workflows/ql-for-ql-dataset_measure.yml +++ b/.github/workflows/ql-for-ql-dataset_measure.yml @@ -29,9 +29,7 @@ jobs: - name: Find codeql id: find-codeql - uses: github/codeql-action/init@main - with: - languages: javascript # does not matter + uses: github/codeql-action/setup-codeql@main - uses: ./.github/actions/os-version id: os_version - uses: actions/cache@v3 diff --git a/.github/workflows/ql-for-ql-tests.yml b/.github/workflows/ql-for-ql-tests.yml index e21860519041..5342fc6ec311 100644 --- a/.github/workflows/ql-for-ql-tests.yml +++ b/.github/workflows/ql-for-ql-tests.yml @@ -27,9 +27,8 @@ jobs: - uses: actions/checkout@v5 - name: Find codeql id: find-codeql - uses: github/codeql-action/init@main + uses: github/codeql-action/setup-codeql@main with: - languages: javascript # does not matter tools: nightly - uses: ./.github/actions/os-version id: os_version @@ -73,9 +72,8 @@ jobs: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - name: Find codeql id: find-codeql - uses: github/codeql-action/init@main + uses: github/codeql-action/setup-codeql@main with: - languages: javascript # does not matter tools: nightly - uses: ./.github/actions/os-version id: os_version From 931615ea1e9802e182a64ad65eac6027dff63c3d Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 7 Oct 2026 12:46:55 +0100 Subject: [PATCH 2/3] QL4QL: Pass `--threads=0` when creating the database and running tests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ql-for-ql-build.yml | 2 +- .github/workflows/ql-for-ql-tests.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ql-for-ql-build.yml b/.github/workflows/ql-for-ql-build.yml index 54c7b63d591f..4885b614fb56 100644 --- a/.github/workflows/ql-for-ql-build.yml +++ b/.github/workflows/ql-for-ql-build.yml @@ -60,7 +60,7 @@ jobs: - name: Make database and analyze run: | ./ql/target/release/buramu | tee deprecated.blame # Add a blame file for the extractor to parse. - ${CODEQL} database create -l=ql ${DB} --search-path "${{ github.workspace }}" + ${CODEQL} database create --threads=0 -l=ql ${DB} --search-path "${{ github.workspace }}" ${CODEQL} database analyze -j0 --format=sarif-latest --output=ql-for-ql.sarif ${DB} ql/ql/src/codeql-suites/ql-code-scanning.qls --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" env: CODEQL: ${{ steps.find-codeql.outputs.codeql-path }} diff --git a/.github/workflows/ql-for-ql-tests.yml b/.github/workflows/ql-for-ql-tests.yml index 5342fc6ec311..0454fe043fd3 100644 --- a/.github/workflows/ql-for-ql-tests.yml +++ b/.github/workflows/ql-for-ql-tests.yml @@ -53,7 +53,7 @@ jobs: key: ql-for-ql-tests - name: Run QL tests run: | - "${CODEQL}" test run --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --search-path "${{ github.workspace }}" --consistency-queries ql/ql/consistency-queries --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" ql/ql/test + "${CODEQL}" test run --threads=0 --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --search-path "${{ github.workspace }}" --consistency-queries ql/ql/consistency-queries --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" ql/ql/test env: CODEQL: ${{ steps.find-codeql.outputs.codeql-path }} @@ -100,7 +100,7 @@ jobs: - name: Run a single QL tests - Unix if: runner.os != 'Windows' run: | - "${CODEQL}" test run --check-databases --search-path "${{ github.workspace }}" ql/ql/test/queries/style/DeadCode/DeadCode.qlref + "${CODEQL}" test run --threads=0 --check-databases --search-path "${{ github.workspace }}" ql/ql/test/queries/style/DeadCode/DeadCode.qlref env: CODEQL: ${{ steps.find-codeql.outputs.codeql-path }} - name: Run a single QL tests - Windows @@ -108,4 +108,4 @@ jobs: shell: pwsh run: | $Env:PATH += ";$(dirname ${{ steps.find-codeql.outputs.codeql-path }})" - codeql test run --check-databases --search-path "${{ github.workspace }}" ql/ql/test/queries/style/DeadCode/DeadCode.qlref + codeql test run --threads=0 --check-databases --search-path "${{ github.workspace }}" ql/ql/test/queries/style/DeadCode/DeadCode.qlref From 8b0733beec66778bb75af5749922ede82f46b58f Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 7 Oct 2026 12:58:02 +0100 Subject: [PATCH 3/3] QL4QL: Remove redundant `CODEQL_THREADS` setting from the database stats workflow Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ql-for-ql-dataset_measure.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ql-for-ql-dataset_measure.yml b/.github/workflows/ql-for-ql-dataset_measure.yml index 069e5c8a4174..21c27b9efb79 100644 --- a/.github/workflows/ql-for-ql-dataset_measure.yml +++ b/.github/workflows/ql-for-ql-dataset_measure.yml @@ -17,8 +17,6 @@ permissions: jobs: measure: - env: - CODEQL_THREADS: 4 # TODO: remove this once it's set by the CLI strategy: matrix: repo: