Skip to content

Commit 757d6f1

Browse files
authored
CI: ensure that macOS runner is x64 (#1807)
---------- Motivation ---------- The runner images for 'macOS 13' had the following convention regarding the hardware architecture: - 'macos-13' --> x64 - 'macos-13-xlarge' --> arm64 It has been different since 'macOS 14': - 'macos-14' --> arm64 - 'macos-14-large' --> x64 - 'macos-15' --> arm64 - 'macos-15-intel' and 'macos-15-large' --> x64 In January 2026 the runner image was updated from 'macos-13' to 'macos-14' because the older version was deprecated. It was not checked that the runner architecture is different -- the change in runner naming convention was not expected. Recently the job, which executes functional tests for Swift generated code on macOS started to fail. The installation of Java did not work properly. The investigation revealed that Java was installed for x64 instead of arm64. The action used to install Java cannot be configured for arm. ---------- Solution ---------- Introduced the usage of 'macos-15-intel' runner to ensure that the hardware architecture of the runner is x64. Moreover, adjusted the environment variable to avoid problems with 'JAVA_HOME' variable. Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
1 parent e1875a1 commit 757d6f1

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/cmake-tests-macos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
cmake-tests-ios:
1414
name: CMake toolchain tests for iOS
15-
runs-on: macos-14
15+
runs-on: macos-15-intel
1616

1717
steps:
1818
- uses: actions/checkout@v2
@@ -36,6 +36,7 @@ jobs:
3636
- name: Build and run functional tests
3737
run: |
3838
export CTEST_PARALLEL_LEVEL=6
39+
export JAVA_HOME="$JAVA_HOME/Contents/Home"
3940
./gradlew publishToMavenLocal
4041
cd cmake
4142
GLUECODIUM_BUILD_ENVIRONMENT=ios-x86_64 cmake -P run-cmake-unit-test.cmake

.github/workflows/functional-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ jobs:
260260

261261
swift-mac:
262262
name: Swift on MacOS
263-
runs-on: macos-14
263+
runs-on: macos-15-intel
264264

265265
steps:
266266
- uses: actions/checkout@v2
@@ -285,6 +285,7 @@ jobs:
285285
run: |
286286
export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion)
287287
export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"
288+
export JAVA_HOME="$JAVA_HOME/Contents/Home"
288289
./scripts/build-swift-functional --buildGluecodium
289290
working-directory: functional-tests
290291
- name: Removing build folder
@@ -295,10 +296,12 @@ jobs:
295296
run: |
296297
export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion)
297298
export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"
299+
export JAVA_HOME="$JAVA_HOME/Contents/Home"
298300
./scripts/build-swift-namerules --publish
299301
working-directory: functional-tests
300302
- name: Build examples
301303
run: |
304+
export JAVA_HOME="$JAVA_HOME/Contents/Home"
302305
mkdir build_example_calculator
303306
cmake -B build_example_calculator examples/calculator -GXcode -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_SYSTEM_NAME=iOS
304307
cmake --build build_example_calculator

0 commit comments

Comments
 (0)