-
-
Notifications
You must be signed in to change notification settings - Fork 812
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! WIP: added Darwin arm64 binaries
- Loading branch information
1 parent
e1e5ef9
commit 376637a
Showing
1 changed file
with
8 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,10 @@ jobs: | |
node: 16 | ||
host: x86 | ||
target: x86 | ||
- os: macos-m1 | ||
node: 16 | ||
host: arm64 | ||
target: arm64 | ||
name: ${{ matrix.os }} (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }}) | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -49,6 +53,10 @@ jobs: | |
node-version: ${{ matrix.node }} | ||
architecture: ${{ matrix.host }} | ||
|
||
- name: Add yarn (self-hosted) | ||
if: matrix.os == 'macos-m1' | ||
run: npm install -g yarn | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
if: contains(matrix.os, 'windows') | ||
|
@@ -164,52 +172,3 @@ jobs: | |
if: matrix.node == 16 && startsWith(github.ref, 'refs/tags/') | ||
env: | ||
NODE_PRE_GYP_GITHUB_TOKEN: ${{ github.token }} | ||
mac-arm64: | ||
runs-on: macos-m1 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- node: 16 | ||
host: arm64 | ||
target: arm64 | ||
defaults: | ||
run: | ||
shell: /usr/bin/arch -arch arm64e /bin/bash -l {0} | ||
name: macos (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }}) | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
architecture: ${{ matrix.host }} | ||
|
||
- run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install --ignore-scripts | ||
|
||
- name: Add env vars | ||
run: | | ||
echo "V=1" >> $GITHUB_ENV | ||
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV | ||
- name: Configure build | ||
run: yarn node-pre-gyp configure --target_arch=${{ env.TARGET }} | ||
|
||
- name: Build binaries | ||
run: yarn node-pre-gyp build --target_arch=${{ env.TARGET }} | ||
|
||
- name: Run tests | ||
run: yarn test | ||
|
||
- name: Package prebuilt binaries | ||
run: yarn node-pre-gyp package --target_arch=${{ env.TARGET }} | ||
|
||
- name: Upload binaries to commit artifacts | ||
uses: actions/upload-artifact@v3 | ||
if: matrix.node == 16 | ||
with: | ||
name: prebuilt-binaries | ||
path: build/stage/*/* | ||
retention-days: 7 |