From 2cac9f7715975bf6256d76cb2d9819f6489448dc Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Wed, 6 Nov 2024 15:23:10 -0800 Subject: [PATCH] Exclude Swift on macos for version 2.14.6 --- .github/workflows/__multi-language-autodetect.yml | 12 +++++++----- pr-checks/checks/multi-language-autodetect.yml | 10 ++++++---- tests/multi-language-repo/build.sh | 2 ++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index 9e8a3c273e..1e47b83e3e 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -88,13 +88,14 @@ jobs: id: init with: db-location: ${{ runner.temp }}/customDbLocation - # Swift is not supported on Ubuntu so we manually exclude it from the list here - languages: ${{ runner.os == 'Linux' && 'cpp,csharp,go,java,javascript,python,ruby' - || '' }} + # Swift is not supported on Ubuntu or codeql 2.14 so we manually exclude it from the list here + languages: ${{ (runner.os == 'Linux' || matrix.version != 'stable-v2.14.6') + && 'cpp,csharp,go,java,javascript,python,ruby' || '' }} tools: ${{ steps.prepare-test.outputs.tools-url }} - uses: ./../action/.github/actions/setup-swift - if: runner.os == 'macOS' + # Exclude macos on v2.14.6 since we can not longer run swift on ARM runners + if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6' with: codeql-path: ${{ steps.init.outputs.codeql-path }} @@ -147,7 +148,8 @@ jobs: fi - name: Check language autodetect for Swift on macOS - if: runner.os == 'macOS' + # Exclude macos on v2.14.6 since we can not longer run swift on ARM runners + if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6' shell: bash run: | SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }} diff --git a/pr-checks/checks/multi-language-autodetect.yml b/pr-checks/checks/multi-language-autodetect.yml index 0990961bbc..5420a4ff2e 100644 --- a/pr-checks/checks/multi-language-autodetect.yml +++ b/pr-checks/checks/multi-language-autodetect.yml @@ -10,12 +10,13 @@ steps: id: init with: db-location: "${{ runner.temp }}/customDbLocation" - # Swift is not supported on Ubuntu so we manually exclude it from the list here - languages: ${{ runner.os == 'Linux' && 'cpp,csharp,go,java,javascript,python,ruby' || '' }} + # Swift is not supported on Ubuntu or codeql 2.14 so we manually exclude it from the list here + languages: ${{ (runner.os == 'Linux' || matrix.version != 'stable-v2.14.6') && 'cpp,csharp,go,java,javascript,python,ruby' || '' }} tools: ${{ steps.prepare-test.outputs.tools-url }} - uses: ./../action/.github/actions/setup-swift - if: runner.os == 'macOS' + # Exclude macos on v2.14.6 since we can not longer run swift on ARM runners + if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6' with: codeql-path: ${{ steps.init.outputs.codeql-path }} @@ -68,7 +69,8 @@ steps: fi - name: Check language autodetect for Swift on macOS - if: runner.os == 'macOS' + # Exclude macos on v2.14.6 since we can not longer run swift on ARM runners + if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6' shell: bash run: | SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }} diff --git a/tests/multi-language-repo/build.sh b/tests/multi-language-repo/build.sh index 84d8096144..3ebb97fb0c 100755 --- a/tests/multi-language-repo/build.sh +++ b/tests/multi-language-repo/build.sh @@ -8,7 +8,9 @@ javac Main.java go build main.go +# Not all platforms support Swift if [[ "$OSTYPE" == "darwin"* ]]; then + echo "Compiling Swift" swift build fi