Skip to content

Commit 6522c07

Browse files
committed
Exclude Swift on macos for version 2.14.6
1 parent 34919cb commit 6522c07

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.github/workflows/__multi-language-autodetect.yml

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/multi-language-autodetect.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ steps:
1515
tools: ${{ steps.prepare-test.outputs.tools-url }}
1616

1717
- uses: ./../action/.github/actions/setup-swift
18-
if: runner.os == 'macOS'
18+
# Exclude macos on v2.14.6 since we can not longer run swift on ARM runners
19+
if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6'
1920
with:
2021
codeql-path: ${{ steps.init.outputs.codeql-path }}
2122

23+
- name: Avoid compiling swift
24+
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
25+
run: |
26+
echo "CODEQL_NO_SWIFT_COMPILATION=true" >> $GITHUB_ENV
27+
2228
- name: Build code
2329
shell: bash
2430
run: ./build.sh
@@ -68,7 +74,8 @@ steps:
6874
fi
6975
7076
- name: Check language autodetect for Swift on macOS
71-
if: runner.os == 'macOS'
77+
# Exclude macos on v2.14.6 since we can not longer run swift on ARM runners
78+
if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6'
7279
shell: bash
7380
run: |
7481
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}

tests/multi-language-repo/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ javac Main.java
88

99
go build main.go
1010

11-
if [[ "$OSTYPE" == "darwin"* ]]; then
11+
# Not all platforms support Swift
12+
if [[ "$OSTYPE" == "darwin"* && -z "$CODEQL_NO_SWIFT_COMPILATION" ]]; then
1213
swift build
1314
fi
1415

0 commit comments

Comments
 (0)