Skip to content

Commit 4e64758

Browse files
committed
Cross-compile darwin-x64 from the arm64 macOS runner
Free-tier GitHub runners no longer offer Intel macOS (macos-13 was retired). Since macos-latest is now arm64, cross-compile the x64 native addon from there using --arch x86_64, mirroring the old approach but in the opposite direction. PR tests only run on native architectures (you can't execute a cross-compiled binary), so macos-13 is dropped from the test matrices. The darwin-x64 build is validated by the release pipeline's verify-prebuilds check.
1 parent c1351ce commit 4e64758

2 files changed

Lines changed: 13 additions & 31 deletions

File tree

.github/workflows/release.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
contents: read
1414
strategy:
1515
matrix:
16-
os:
17-
- ubuntu-latest
18-
- ubuntu-24.04-arm
19-
- macos-13 # x64
20-
- macos-latest # arm64
21-
- windows-latest
16+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
17+
arch: [""]
18+
include:
19+
# macos-latest is arm64; cross-compile for x64 too
20+
- os: macos-latest
21+
arch: "--arch x86_64"
2222
runs-on: ${{ matrix.os }}
2323
steps:
2424
- name: checkout
@@ -35,12 +35,12 @@ jobs:
3535
run: npm ci
3636
- name: build
3737
run: |
38-
npm run prebuild --workspace=@jazzer.js/fuzzer
39-
npm run build --workspace=@jazzer.js/fuzzer
38+
npm run prebuild --workspace=@jazzer.js/fuzzer -- ${{ matrix.arch }}
39+
npm run build --workspace=@jazzer.js/fuzzer -- ${{ matrix.arch }}
4040
- name: upload
4141
uses: actions/upload-artifact@v7
4242
with:
43-
name: native-addon-${{ matrix.os }}
43+
name: native-addon-${{ matrix.os }}${{ matrix.arch && '-x64' || '' }}
4444
path: packages/fuzzer/prebuilds
4545
if-no-files-found: error
4646

.github/workflows/run-all-tests-pr.yaml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,7 @@ jobs:
4242
runs-on: ${{ matrix.os }}
4343
strategy:
4444
matrix:
45-
os:
46-
[
47-
windows-latest,
48-
ubuntu-latest,
49-
ubuntu-24.04-arm,
50-
macos-13,
51-
macos-latest,
52-
]
45+
os: [windows-latest, ubuntu-latest, ubuntu-24.04-arm, macos-latest]
5346
node: [20]
5447
include:
5548
# Node 14 runtime compatibility is covered by end-to-end tests.
@@ -92,14 +85,7 @@ jobs:
9285
strategy:
9386
fail-fast: true
9487
matrix:
95-
os:
96-
[
97-
ubuntu-latest,
98-
ubuntu-24.04-arm,
99-
macos-13,
100-
macos-latest,
101-
windows-latest,
102-
]
88+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
10389
steps:
10490
- name: checkout
10591
uses: actions/checkout@v6
@@ -123,16 +109,12 @@ jobs:
123109
# all in one job to avoid rebuilding
124110
# Node 14 only has binaries for x64 runners
125111
- name: "node 14"
126-
if: >-
127-
matrix.os == 'ubuntu-latest' || matrix.os == 'macos-13' || matrix.os
128-
== 'windows-latest'
112+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
129113
uses: actions/setup-node@v6
130114
with:
131115
node-version: 14
132116
- name: run tests (node 14)
133-
if: >-
134-
matrix.os == 'ubuntu-latest' || matrix.os == 'macos-13' || matrix.os
135-
== 'windows-latest'
117+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
136118
run: cd end-to-end && npx jest
137119
shell: bash
138120

0 commit comments

Comments
 (0)