Skip to content

Commit dd874e9

Browse files
paul0403rniczh
andauthored
Pin mac wheels CI runner to MacOS 14 (#1986)
**Context:** Github recently updated MacOS in CI images to 15.5. This macos works with xcode 16.4. actions/runner-images#12541 actions/runner-images#12520 New xcode registers the sdk file a bit differently, which broke the macos/xcode version parsing in lapacke. **Description of the Change:** Pin macos version in mac wheels CI to `macos-14` **Benefits:** Mac wheels no longer fail. **Possible Drawbacks:** xcode 16 seems painfully slow. Forcing single threaded build and disabling macos spotlight/OS indexing fixes this. --------- Co-authored-by: Hong-Sheng Zheng <[email protected]>
1 parent d8dd234 commit dd874e9

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/build-wheel-macos-arm64.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
python_version: ${{ fromJson(format('["{0}"]', needs.constants.outputs.primary_python_version)) }}
6969

7070
name: Build Dependencies (Python ${{ matrix.python_version }})
71-
runs-on: macos-latest
71+
runs-on: macos-14
7272

7373
if: needs.check_if_wheel_build_required.outputs.build-wheels == 'true'
7474

@@ -252,7 +252,7 @@ jobs:
252252
python_version: ${{ fromJson(needs.constants.outputs.python_versions) }}
253253

254254
name: Build Wheels (Python ${{ matrix.python_version }})
255-
runs-on: macos-latest
255+
runs-on: macos-14
256256

257257
steps:
258258
- name: Checkout Catalyst repo
@@ -325,6 +325,11 @@ jobs:
325325
key: ${{ runner.os }}-${{ runner.arch }}-enzyme-${{ needs.constants.outputs.llvm_version }}-${{ needs.constants.outputs.enzyme_version }}-wheel-build
326326
fail-on-cache-miss: True
327327

328+
# TODO: uncomment the setup xcode action when updating to MacOS 15 in the github runner images
329+
# - name: Setup Xcode
330+
# run:
331+
# sudo xcode-select --switch /Library/Developer/CommandLineTools
332+
328333
# Build Catalyst-Runtime
329334
- name: Build Catalyst-Runtime
330335
id: runtime-build
@@ -363,6 +368,8 @@ jobs:
363368
# Build Quantum and Gradient Dialects
364369
- name: Build MLIR Dialects
365370
run: |
371+
# xcode builds very slow if we don't turn off spotlight
372+
sudo mdutil -i off /Users
366373
cmake -S mlir -B $GITHUB_WORKSPACE/quantum-build -G Ninja \
367374
-DCMAKE_BUILD_TYPE=Release \
368375
-DLLVM_ENABLE_ASSERTIONS=ON \
@@ -379,7 +386,8 @@ jobs:
379386
-DLLVM_ENABLE_LLD=OFF \
380387
-DLLVM_DIR="$GITHUB_WORKSPACE/llvm-build/lib/cmake/llvm"
381388
382-
cmake --build $GITHUB_WORKSPACE/quantum-build --target check-dialects catalyst-cli
389+
# xcode builds significantly slower when multithreaded
390+
cmake --build $GITHUB_WORKSPACE/quantum-build --target check-dialects catalyst-cli -- -j 1
383391
384392
- name: Build Plugin wheel
385393
# Run only on Thursday at the given time
@@ -430,7 +438,7 @@ jobs:
430438

431439
# To check all wheels for supported python3 versions
432440
name: Test Wheels (Python ${{ matrix.python_version }}) on Mac arm64
433-
runs-on: macos-latest
441+
runs-on: macos-14
434442

435443
steps:
436444
- name: Checkout Catalyst repo

0 commit comments

Comments
 (0)