Skip to content

Commit 1cd8e12

Browse files
committed
Use Rosetta, macos-latest
1 parent 693bc49 commit 1cd8e12

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,29 @@ jobs:
1212
build:
1313
strategy:
1414
matrix:
15-
# macos-13 is the last x86_64 runner; ArrayFire only ships an x86_64
16-
# macOS binary, so the flake has no aarch64-darwin (macos-latest) build.
17-
os: [ubuntu-latest, macos-13]
15+
os: [ubuntu-latest, macos-latest]
1816
runs-on: ${{ matrix.os }}
1917
steps:
2018
- uses: actions/checkout@v4
2119

20+
# macos-latest is Apple Silicon, but ArrayFire only ships an x86_64 macOS
21+
# binary, so the flake's darwin output is x86_64-darwin. Build it under
22+
# Rosetta 2: ensure Rosetta is present and let Nix build x86_64-darwin
23+
# derivations via `extra-platforms` below.
24+
- name: Install Rosetta 2
25+
if: runner.os == 'macOS'
26+
run: softwareupdate --install-rosetta --agree-to-license
27+
2228
- uses: cachix/install-nix-action@v31
2329
with:
2430
nix_path: nixpkgs=channel:nixpkgs-unstable
31+
extra_nix_config: |
32+
extra-platforms = x86_64-darwin
2533
26-
- name: Build and run tests
34+
- name: Build and run tests (Linux)
35+
if: runner.os == 'Linux'
2736
run: nix build -L
37+
38+
- name: Build and run tests (macOS, x86_64 via Rosetta)
39+
if: runner.os == 'macOS'
40+
run: nix build -L .#packages.x86_64-darwin.default

0 commit comments

Comments
 (0)