Skip to content

Commit d9d2ce1

Browse files
fix(ci): tests on windows runner
1 parent 3803af4 commit d9d2ce1

File tree

6 files changed

+112
-1052
lines changed

6 files changed

+112
-1052
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: CI
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [main]
8+
branches:
9+
- main
810

911
defaults:
1012
run:
@@ -42,6 +44,8 @@ jobs:
4244
runs-on: ${{ matrix.os }}
4345
strategy:
4446
matrix:
47+
node-version:
48+
- '24.10.0'
4549
os:
4650
- windows-latest
4751
- ubuntu-latest
@@ -52,7 +56,7 @@ jobs:
5256
uses: actions/cache@v4
5357
id: splicer-build
5458
with:
55-
key: splicer-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }}
59+
key: splicer-${{ matrix.os }}-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }}
5660
path: |
5761
lib
5862
target
@@ -64,10 +68,10 @@ jobs:
6468
rustup target add wasm32-wasip1 --toolchain 1.80.0
6569
rustup target add wasm32-wasip1
6670
67-
- uses: actions/setup-node@v4
71+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
6872
if: steps.splicer-build.outputs.cache-hit != 'true'
6973
with:
70-
node-version: '23.10.0'
74+
node-version: ${{ matrix.node-version }}
7175

7276
- name: Install NPM packages
7377
if: steps.splicer-build.outputs.cache-hit != 'true'
@@ -78,12 +82,18 @@ jobs:
7882
run: make lib/spidermonkey-embedding-splicer.js
7983

8084
build:
81-
runs-on: ubuntu-latest
85+
runs-on: ${{ matrix.os }}
8286
needs:
8387
- build-splicer
8488
strategy:
8589
fail-fast: false
8690
matrix:
91+
node-version:
92+
- '24.10.0'
93+
os:
94+
# NOTE: at present the build does *not* work on windows. Required binaries are built here
95+
# (only on linux) and reused in later steps
96+
- ubuntu-latest
8797
build-type:
8898
- 'release'
8999
- 'debug'
@@ -117,15 +127,15 @@ jobs:
117127
uses: actions/cache/restore@v4
118128
id: splicer-build
119129
with:
120-
key: splicer-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }}
130+
key: splicer-${{ matrix.os }}-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }}
121131
path: |
122132
lib
123133
target
124134
125-
- uses: actions/setup-node@v4
135+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
126136
if: steps.starlingmonkey-build.outputs.cache-hit != 'true'
127137
with:
128-
node-version: '23.10.0'
138+
node-version: ${{ matrix.node-version }}
129139

130140
- name: Install NPM packages
131141
if: steps.starlingmonkey-build.outputs.cache-hit != 'true'
@@ -149,12 +159,11 @@ jobs:
149159
fail-fast: false
150160
matrix:
151161
node-version:
152-
- '23.10.0'
153-
# - latest reenable when https://github.com/nodejs/node/issues/57172 is fixed
162+
- '24.10.0'
163+
- latest # reenable when https://github.com/nodejs/node/issues/57172 is fixed
154164
os:
155165
- ubuntu-latest
156-
# NOTE: windows-2025 (which is now latest) seems to hang on test runs
157-
- windows-2022
166+
- windows-latest
158167
- macos-latest
159168
build-type:
160169
- 'release'
@@ -178,25 +187,30 @@ jobs:
178187
uses: actions/cache/restore@v4
179188
id: splicer-build
180189
with:
181-
key: splicer-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }}
190+
key: splicer-${{ matrix.os }}-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }}
182191
path: |
183192
lib
184193
target
185194
186-
- uses: actions/setup-node@v4
195+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
187196
with:
188197
node-version: ${{matrix.node-version}}
189198

190199
- name: Install NPM packages
191200
run: npm install
192201

193202
- name: Test
194-
run: npm run test:${{matrix.build-type}}
203+
run: |
204+
npm run test:${{matrix.build-type}}
195205
196206
test-example:
197207
runs-on: ubuntu-latest
198208
needs:
199209
- build
210+
strategy:
211+
matrix:
212+
node-version:
213+
- '24.10.0'
200214
steps:
201215
- uses: actions/checkout@v4
202216

@@ -220,9 +234,9 @@ jobs:
220234
lib
221235
target
222236
223-
- uses: actions/setup-node@v4
237+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
224238
with:
225-
node-version: '23.10.0'
239+
node-version: ${{ matrix.node-version }}
226240

227241
- name: Install NPM packages
228242
run: npm install

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
steps:
3737
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3838

39-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
39+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
4040
with:
4141
node-version: ">=22"
4242

@@ -123,7 +123,7 @@ jobs:
123123
rustup target add wasm32-wasip1
124124
125125
# NOTE: we must use a node version new-enough to have --experimental-wasm-jspi
126-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
126+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
127127
with:
128128
node-version: ">=22"
129129

@@ -182,7 +182,7 @@ jobs:
182182
steps:
183183
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
184184

185-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
185+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
186186
with:
187187
node-version: ">=22"
188188

0 commit comments

Comments
 (0)