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