From 91bae3ac6822bcd997cfe984db021f65dfef41b4 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 9 Nov 2026 17:13:32 +0000 Subject: [PATCH] Check that the `all-platform-bundle` PR check uses an all-platform bundle Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/__all-platform-bundle.yml | 12 ++++++++++++ pr-checks/checks/all-platform-bundle.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/__all-platform-bundle.yml b/.github/workflows/__all-platform-bundle.yml index 22635a0d1..a2d8c1abb 100644 --- a/.github/workflows/__all-platform-bundle.yml +++ b/.github/workflows/__all-platform-bundle.yml @@ -92,6 +92,18 @@ jobs: # Swift is not supported on Ubuntu so we manually exclude it from the list here languages: cpp,csharp,go,java,javascript,python,ruby tools: ${{ steps.prepare-test.outputs.tools-url }} + - name: Check that the bundle contains tools for all platforms + env: + CODEQL_PATH: ${{ steps.init.outputs.codeql-path }} + run: | + # Platform-specific bundles only contain the tools for their own platform. + tools_dir="$(dirname "$CODEQL_PATH")/tools" + for platform in linux64 osx64 win64; do + if [[ ! -d "$tools_dir/$platform" ]]; then + echo "::error::Expected an all-platform CodeQL bundle, but '$tools_dir' does not contain a '$platform' directory." + exit 1 + fi + done - name: Build code run: ./build.sh - uses: ./../action/analyze diff --git a/pr-checks/checks/all-platform-bundle.yml b/pr-checks/checks/all-platform-bundle.yml index 24bd29015..40792c876 100644 --- a/pr-checks/checks/all-platform-bundle.yml +++ b/pr-checks/checks/all-platform-bundle.yml @@ -17,6 +17,18 @@ steps: # Swift is not supported on Ubuntu so we manually exclude it from the list here languages: cpp,csharp,go,java,javascript,python,ruby tools: ${{ steps.prepare-test.outputs.tools-url }} + - name: Check that the bundle contains tools for all platforms + env: + CODEQL_PATH: ${{ steps.init.outputs.codeql-path }} + run: | + # Platform-specific bundles only contain the tools for their own platform. + tools_dir="$(dirname "$CODEQL_PATH")/tools" + for platform in linux64 osx64 win64; do + if [[ ! -d "$tools_dir/$platform" ]]; then + echo "::error::Expected an all-platform CodeQL bundle, but '$tools_dir' does not contain a '$platform' directory." + exit 1 + fi + done - name: Build code run: ./build.sh - uses: ./../action/analyze