diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index 9e8a3c273..7f1346d13 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -88,13 +88,15 @@ 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' || (runner.os == 'macOS' && 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 +149,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 0990961bb..1bb2ad425 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' || (runner.os == 'macOS' && 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 84d809614..3ebb97fb0 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