From 76d1dedd7620423863e056d1e06099a743481829 Mon Sep 17 00:00:00 2001 From: James Vaughan Date: Thu, 22 Feb 2024 17:53:28 -0800 Subject: [PATCH] Run prebuilds on Apple Silicon Macs changes to get macos prebuild to pass on arm64 local machine Add packages to the uninstall list Restore changes in prebuild.yaml Restore changes to tarball.sh Set a temporary canvas_tag Revert temporary canvas tag Update runners Remove unnecessary changes Add a code signing step Remove explicit `--arch` argument --- .github/workflows/prebuild.yaml | 14 ++++++++++++-- prebuild/macOS/binding.gyp | 4 +++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prebuild.yaml b/.github/workflows/prebuild.yaml index 28235c8a2..12b7a9912 100644 --- a/.github/workflows/prebuild.yaml +++ b/.github/workflows/prebuild.yaml @@ -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: @@ -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 diff --git a/prebuild/macOS/binding.gyp b/prebuild/macOS/binding.gyp index 718844ac8..605a81710 100644 --- a/prebuild/macOS/binding.gyp +++ b/prebuild/macOS/binding.gyp @@ -34,6 +34,7 @@ '