Skip to content

Commit 376637a

Browse files
committed
fixup! WIP: added Darwin arm64 binaries
1 parent e1e5ef9 commit 376637a

File tree

1 file changed

+8
-49
lines changed

1 file changed

+8
-49
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ jobs:
4141
node: 16
4242
host: x86
4343
target: x86
44+
- os: macos-m1
45+
node: 16
46+
host: arm64
47+
target: arm64
4448
name: ${{ matrix.os }} (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }})
4549
steps:
4650
- uses: actions/checkout@v3
@@ -49,6 +53,10 @@ jobs:
4953
node-version: ${{ matrix.node }}
5054
architecture: ${{ matrix.host }}
5155

56+
- name: Add yarn (self-hosted)
57+
if: matrix.os == 'macos-m1'
58+
run: npm install -g yarn
59+
5260
- name: Add msbuild to PATH
5361
uses: microsoft/setup-msbuild@v1.1
5462
if: contains(matrix.os, 'windows')
@@ -164,52 +172,3 @@ jobs:
164172
if: matrix.node == 16 && startsWith(github.ref, 'refs/tags/')
165173
env:
166174
NODE_PRE_GYP_GITHUB_TOKEN: ${{ github.token }}
167-
mac-arm64:
168-
runs-on: macos-m1
169-
strategy:
170-
fail-fast: false
171-
matrix:
172-
include:
173-
- node: 16
174-
host: arm64
175-
target: arm64
176-
defaults:
177-
run:
178-
shell: /usr/bin/arch -arch arm64e /bin/bash -l {0}
179-
name: macos (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }})
180-
steps:
181-
- uses: actions/checkout@v3
182-
- uses: actions/setup-node@v3
183-
with:
184-
node-version: ${{ matrix.node }}
185-
architecture: ${{ matrix.host }}
186-
187-
- run: npm install -g yarn
188-
189-
- name: Install dependencies
190-
run: yarn install --ignore-scripts
191-
192-
- name: Add env vars
193-
run: |
194-
echo "V=1" >> $GITHUB_ENV
195-
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
196-
197-
- name: Configure build
198-
run: yarn node-pre-gyp configure --target_arch=${{ env.TARGET }}
199-
200-
- name: Build binaries
201-
run: yarn node-pre-gyp build --target_arch=${{ env.TARGET }}
202-
203-
- name: Run tests
204-
run: yarn test
205-
206-
- name: Package prebuilt binaries
207-
run: yarn node-pre-gyp package --target_arch=${{ env.TARGET }}
208-
209-
- name: Upload binaries to commit artifacts
210-
uses: actions/upload-artifact@v3
211-
if: matrix.node == 16
212-
with:
213-
name: prebuilt-binaries
214-
path: build/stage/*/*
215-
retention-days: 7

0 commit comments

Comments
 (0)