Skip to content

Commit

Permalink
fixup! WIP: added Darwin arm64 binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellockyer committed May 19, 2022
1 parent e1e5ef9 commit 376637a
Showing 1 changed file with 8 additions and 49 deletions.
57 changes: 8 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/setup-msbuild@v1.1
if: contains(matrix.os, 'windows')
Expand Down Expand Up @@ -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

0 comments on commit 376637a

Please sign in to comment.