From 74e277ff142088900f066acfbbbc79d3a9c2c0e5 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Wed, 18 May 2022 21:28:55 +0200 Subject: [PATCH] fix: fix macos arm64 build --- .github/workflows/CI.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dc21a4c..a6e0ef9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -43,9 +43,15 @@ jobs: npm run build -- --target x86_64-unknown-linux-gnu --zig --zig-abi-suffix 2.12 && llvm-strip -x *.node - host: macos-latest + architecture: x64 target: aarch64-apple-darwin build: | - npm run build --target=aarch64-apple-darwin + sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*; + export CC=$(xcrun -f clang); + export CXX=$(xcrun -f clang++); + SYSROOT=$(xcrun --sdk macosx --show-sdk-path); + export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; + npm run build -- --target aarch64-apple-darwin strip -x *.node - host: ubuntu-latest architecture: x64