Skip to content

Commit 3806c58

Browse files
committed
add arm64 to test/release workflow
1 parent 637d2eb commit 3806c58

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
strategy:
124124
matrix:
125125
node: [20, 22, 24]
126-
arch: [x86, x64]
126+
arch: [x86, x64, arm64]
127127
exclude:
128128
- node: 24
129129
arch: x86
@@ -141,16 +141,27 @@ jobs:
141141
- uses: actions/checkout@v4
142142

143143
- name: Use Node.js
144+
if: matrix.arch == 'x86'
144145
uses: actions/setup-node@v4
145146
with:
146147
node-version: ${{ matrix.node }}
147148
check-latest: true
148-
architecture: ${{ matrix.arch }}
149+
architecture: x86
150+
151+
- name: Use Node.js
152+
uses: actions/setup-node@v4
153+
if: matrix.arch != 'x86'
154+
with:
155+
node-version: ${{ matrix.node }}
156+
check-latest: true
149157

150158
- name: Install
159+
env:
160+
npm_config_arch: ${{ matrix.arch == 'x86' && 'ia32' || matrix.arch }}
151161
run: npm install
152162

153163
- name: Test
164+
if: matrix.arch != 'arm64'
154165
env:
155166
GIT_SSH: ${{ github.workspace }}\vendor\plink.exe
156167
run: |
@@ -170,12 +181,12 @@ jobs:
170181

171182
- name: Deploy (Package)
172183
if: startsWith(github.ref, 'refs/tags/v')
173-
run: node-pre-gyp package
184+
run: node-pre-gyp package --target_arch=${{ matrix.arch }}
174185

175186
- name: Deploy (Publish)
176187
if: startsWith(github.ref, 'refs/tags/v')
177188
env:
178189
node_pre_gyp_bucket: ${{ secrets.node_pre_gyp_bucket }}
179190
AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }}
180191
AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }}
181-
run: node-pre-gyp publish
192+
run: node-pre-gyp publish --target_arch=${{ matrix.arch }}

0 commit comments

Comments
 (0)