Skip to content

Commit 75d1260

Browse files
mstrathmanclaude
andcommitted
ci(npm): cross-compile darwin-x64 on the arm64 runner (drop macos-13)
The Intel macos-13 runners are scarce and being deprecated by GitHub, so the darwin-x64 job queued indefinitely. Build it on the available macos-14 (Apple Silicon) runner with clang -arch x86_64 instead (verified locally: produces a Mach-O x86_64 dylib). Same cross-compile pattern as linux-arm64. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9438722 commit 75d1260

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎.github/workflows/npm.yml‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ jobs:
3030
fail-fast: false
3131
matrix:
3232
include:
33-
- { pkg: sqlite-predict-darwin-arm64, runner: macos-14, os: darwin, cpu: arm64, ext: dylib, apt: "", cc: "" }
34-
- { pkg: sqlite-predict-darwin-x64, runner: macos-13, os: darwin, cpu: x64, ext: dylib, apt: "", cc: "" }
35-
- { pkg: sqlite-predict-linux-x64, runner: ubuntu-latest, os: linux, cpu: x64, ext: so, apt: "", cc: "" }
33+
- { pkg: sqlite-predict-darwin-arm64, runner: macos-14, os: darwin, cpu: arm64, ext: dylib, apt: "", cc: "", macarch: "" }
34+
# darwin-x64 cross-compiles on the arm64 runner: the Intel macos-13
35+
# runners are scarce / being deprecated, and clang targets x86_64 fine.
36+
- { pkg: sqlite-predict-darwin-x64, runner: macos-14, os: darwin, cpu: x64, ext: dylib, apt: "", cc: "", macarch: "x86_64" }
37+
- { pkg: sqlite-predict-linux-x64, runner: ubuntu-latest, os: linux, cpu: x64, ext: so, apt: "", cc: "", macarch: "" }
3638
# linux-arm64 cross-compiles on the x64 runner (the free arm64 runner
3739
# is public-repo-only); the binary is built, not run, on CI.
38-
- { pkg: sqlite-predict-linux-arm64, runner: ubuntu-latest, os: linux, cpu: arm64, ext: so, apt: "gcc-aarch64-linux-gnu", cc: "CC=aarch64-linux-gnu-gcc" }
40+
- { pkg: sqlite-predict-linux-arm64, runner: ubuntu-latest, os: linux, cpu: arm64, ext: so, apt: "gcc-aarch64-linux-gnu", cc: "CC=aarch64-linux-gnu-gcc", macarch: "" }
3941
steps:
4042
- uses: actions/checkout@v4
4143
- uses: actions/setup-node@v4
@@ -53,7 +55,12 @@ jobs:
5355
if: matrix.apt != ''
5456
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.apt }}
5557
- name: Build loadable extension
56-
run: make loadable ${{ matrix.cc }}
58+
run: |
59+
if [ -n "${{ matrix.macarch }}" ]; then
60+
make loadable CC="clang -arch ${{ matrix.macarch }}"
61+
else
62+
make loadable ${{ matrix.cc }}
63+
fi
5764
- name: Assemble platform package
5865
run: node scripts/npm-pkg.mjs platform ${{ matrix.pkg }} ${{ matrix.os }} ${{ matrix.cpu }} ${{ matrix.ext }} ${{ steps.v.outputs.version }}
5966
- name: Publish

0 commit comments

Comments
 (0)