Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prebuilds for ARM64 Macs #2354

Open
wants to merge 11 commits into
base: prebuilds
Choose a base branch
from
14 changes: 12 additions & 2 deletions .github/workflows/prebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,13 @@ jobs:
matrix:
node: [21]
canvas_tag: ["v3.0.0-rc2"] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, macOS
runs-on: macos-12 # macos-14+ is M1
os:
- runner: macos-12
arch: x64
- runner: macos-14
arch: arm64
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, macOS ${{ matrix.os.arch }}
runs-on: ${{ matrix.os.runner }}
env:
CANVAS_VERSION_TO_BUILD: ${{ matrix.canvas_tag }}
steps:
Expand Down Expand Up @@ -177,6 +182,11 @@ jobs:
brew uninstall --force --ignore-dependencies cairo pango librsvg giflib harfbuzz
npm test

- name: Sign the executable
uses: indygreg/apple-code-sign-action@v1
with:
input_path: build/Release/canvas.node

- name: Make bundle
id: make_bundle
run: . prebuild/tarball.sh
Expand Down
4 changes: 3 additions & 1 deletion prebuild/macOS/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'<!@(pkg-config pangocairo --libs)',
'<!@(pkg-config freetype2 --libs)',
'<!@(pkg-config librsvg-2.0 --libs)',
'-L/opt/homebrew/lib',
'-ljpeg',
'-lgif'
],
Expand All @@ -43,7 +44,8 @@
'<!@(pkg-config libpng --cflags-only-I | sed s/-I//g)',
'<!@(pkg-config pangocairo --cflags-only-I | sed s/-I//g)',
'<!@(pkg-config freetype2 --cflags-only-I | sed s/-I//g)',
'<!@(pkg-config librsvg-2.0 --cflags-only-I | sed s/-I//g)'
'<!@(pkg-config librsvg-2.0 --cflags-only-I | sed s/-I//g)',
'/opt/homebrew/include'
],
'cflags+': ['-fvisibility=hidden'],
'xcode_settings': {
Expand Down