Skip to content

Commit fd179be

Browse files
committed
Use native runners for both macOS architectures instead of cross-compiling
macos-latest now points to Apple Silicon, so the old --arch arm64 cross-compile produced a duplicate arm64 binary while darwin-x64 was quietly missing from releases. Replace the cross-compile approach with native builds on macos-13 (x64) and macos-latest (arm64). Also add macos-13 to the PR test matrices so both architectures are tested.
1 parent b74d3ce commit fd179be

2 files changed

Lines changed: 32 additions & 13 deletions

File tree

.github/workflows/release.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ jobs:
1313
contents: read
1414
strategy:
1515
matrix:
16-
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
17-
opts: [""]
18-
include:
19-
- os: macos-latest
20-
opts: "--arch arm64"
16+
os:
17+
- ubuntu-latest
18+
- ubuntu-24.04-arm
19+
- macos-13 # x64
20+
- macos-latest # arm64
21+
- windows-latest
2122
runs-on: ${{ matrix.os }}
2223
steps:
2324
- name: checkout
@@ -34,13 +35,12 @@ jobs:
3435
run: npm ci
3536
- name: build
3637
run: |
37-
npm run prebuild --workspace=@jazzer.js/fuzzer -- ${{ matrix.opts }}
38-
npm run build --workspace=@jazzer.js/fuzzer -- ${{ matrix.opts }}
38+
npm run prebuild --workspace=@jazzer.js/fuzzer
39+
npm run build --workspace=@jazzer.js/fuzzer
3940
- name: upload
4041
uses: actions/upload-artifact@v4
4142
with:
42-
name:
43-
native-addon-${{ matrix.os }}${{ matrix.opts && '-arm64' || '' }}
43+
name: native-addon-${{ matrix.os }}
4444
path: packages/fuzzer/prebuilds
4545
if-no-files-found: error
4646

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ jobs:
4242
runs-on: ${{ matrix.os }}
4343
strategy:
4444
matrix:
45-
os: [windows-latest, ubuntu-latest, macos-latest, ubuntu-24.04-arm]
45+
os:
46+
[
47+
windows-latest,
48+
ubuntu-latest,
49+
ubuntu-24.04-arm,
50+
macos-13,
51+
macos-latest,
52+
]
4653
node: [20]
4754
include:
4855
# Node 14 runtime compatibility is covered by end-to-end tests.
@@ -85,7 +92,14 @@ jobs:
8592
strategy:
8693
fail-fast: true
8794
matrix:
88-
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
95+
os:
96+
[
97+
ubuntu-latest,
98+
ubuntu-24.04-arm,
99+
macos-13,
100+
macos-latest,
101+
windows-latest,
102+
]
89103
steps:
90104
- name: checkout
91105
uses: actions/checkout@v4
@@ -107,13 +121,18 @@ jobs:
107121

108122
# Run with different node.js versions
109123
# all in one job to avoid rebuilding
124+
# Node 14 only has binaries for x64 runners
110125
- name: "node 14"
111-
if: matrix.os != 'macos-latest' && matrix.os != 'ubuntu-24.04-arm'
126+
if: >-
127+
matrix.os == 'ubuntu-latest' || matrix.os == 'macos-13' || matrix.os
128+
== 'windows-latest'
112129
uses: actions/setup-node@v4
113130
with:
114131
node-version: 14
115132
- name: run tests (node 14)
116-
if: matrix.os != 'macos-latest' && matrix.os != 'ubuntu-24.04-arm'
133+
if: >-
134+
matrix.os == 'ubuntu-latest' || matrix.os == 'macos-13' || matrix.os
135+
== 'windows-latest'
117136
run: cd end-to-end && npx jest
118137
shell: bash
119138

0 commit comments

Comments
 (0)