Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add Electron 12+ macOS arm64 prebuilds #376

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
CC: "clang"
CXX: "clang++"
npm_config_clang: "1"
# Needed for macOS arm64 until hosted macos-11.0 runners become available
# https://github.com/actions/virtual-environments/issues/2486
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk

strategy:
matrix:
Expand Down Expand Up @@ -86,6 +89,17 @@ jobs:
if: ${{ matrix.os == 'ubuntu-16.04' }}
name: Prebuild (Linux x86 + ARM64)

# Due to issues in the past, we check if the generated file _actually_ was built for arm64.
# Example output: build/Release/keytar.node: Mach-O 64-bit bundle arm64
- run: |
npm run prebuild-electron-arm64-mac
if [[ "$(file build/Release/keytar.node)" != *"64-bit bundle arm64" ]]; then
echo "Generated arm64 build doesn't seem to have the proper architecture. Exiting."
exit 1
fi
if: ${{ matrix.os == 'macos-latest' }}
name: Prebuild (macOS arm64)

- run: |
ls prebuilds/
name: List prebuilds
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"prebuild-node": "prebuild -t 10.11.0 -t 11.9.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 --strip",
"prebuild-electron": "prebuild -t 10.0.0 -t 11.0.0 -t 12.0.0 -r electron --strip",
"prebuild-electron-arm64": "prebuild -t 10.0.0 -t 11.0.0 -t 12.0.0 -r electron -a arm64 --strip",
"prebuild-electron-arm64-mac": "prebuild -t 12.0.0 -r electron -a arm64 --strip",
"prebuild-electron-ia32": "prebuild -t 10.0.0 -t 11.0.0 -t 12.0.0 -r electron -a ia32 --strip",
"upload": "node ./script/upload.js"
},
Expand Down