|
41 | 41 | node: 16
|
42 | 42 | host: x86
|
43 | 43 | target: x86
|
| 44 | + - os: macos-m1 |
| 45 | + node: 16 |
| 46 | + host: arm64 |
| 47 | + target: arm64 |
44 | 48 | name: ${{ matrix.os }} (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }})
|
45 | 49 | steps:
|
46 | 50 | - uses: actions/checkout@v3
|
|
49 | 53 | node-version: ${{ matrix.node }}
|
50 | 54 | architecture: ${{ matrix.host }}
|
51 | 55 |
|
| 56 | + - name: Add yarn (self-hosted) |
| 57 | + if: matrix.os == 'macos-m1' |
| 58 | + run: npm install -g yarn |
| 59 | + |
52 | 60 | - name: Add msbuild to PATH
|
53 | 61 | uses: microsoft/setup-msbuild@v1.1
|
54 | 62 | if: contains(matrix.os, 'windows')
|
@@ -164,52 +172,3 @@ jobs:
|
164 | 172 | if: matrix.node == 16 && startsWith(github.ref, 'refs/tags/')
|
165 | 173 | env:
|
166 | 174 | 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