@@ -2,11 +2,9 @@ name: CI
22
33on :
44 push :
5- branches :
6- - master
5+ branches : [master]
76 pull_request :
8- branches :
9- - master
7+ branches : [master]
108 workflow_call :
119
1210concurrency :
@@ -18,58 +16,49 @@ jobs:
1816 strategy :
1917 matrix :
2018 os :
21- - windows-latest
22- - macos-latest
19+ - windows-2022
20+ - windows-11-arm
21+ - macos-15
22+ - macos-13
2323 - ubuntu-22.04
24+ - ubuntu-22.04-arm
2425 node :
25- - 18
26- - 20
27- - 22
26+ - 20.19.5
27+ - 22.19.0
28+ - 24.7.0
2829 fail-fast : false
29- name : Test Node ${{ matrix.node }} on ${{ matrix.os }}
30- runs-on : ${{ matrix.os }}
30+ name : Test Node ${{matrix.node}} on ${{matrix.os}}
31+ runs-on : ${{matrix.os}}
3132 defaults :
3233 run :
3334 shell : bash
3435 steps :
3536 - name : Checkout repository
36- uses : actions/checkout@v4
37+ uses : actions/checkout@v5
3738 with :
3839 submodules : true
39- fetch-depth : 0
4040
4141 - name : Setup Node
42- uses : actions/setup-node@v4
42+ uses : actions/setup-node@v5
4343 with :
44- node-version : ${{ matrix.node }}
45-
46- - name : Install dependencies
47- run : npm ci --legacy-peer-deps
44+ node-version : ${{matrix.node}}
4845
4946 - name : Set npm_config_target
50- run : echo "CONFIG_TARGET =${{ matrix.node == 22 && '22.12.0' || '20.9.0' }}" >> $GITHUB_ENV
47+ run : printf 'npm_config_target =${{matrix.node}}\n' >> " $GITHUB_ENV"
5148
52- - name : Build x64 binary
53- run : npm_config_target=${{ env.CONFIG_TARGET }} npm x -- prebuildify --napi --arch x64 -t 20.9.0
54-
55- - name : Set up cross-compilation
56- if : runner.os == 'Linux'
57- run : |-
58- sudo apt-get update
59- sudo apt-get install g++-aarch64-linux-gnu
60- printf '%s\n' >> "$GITHUB_ENV" \
61- 'CC=aarch64-linux-gnu-gcc' 'CXX=aarch64-linux-gnu-g++'
49+ - name : Install dependencies
50+ run : npm ci --legacy-peer-deps
6251
63- - name : Build arm64 binary
64- run : npm_config_target=${{ env.CONFIG_TARGET }} npm x -- prebuildify --napi --arch arm64 -t 20.9.0
52+ - name : Build binary
53+ run : npm x -- prebuildify --napi
6554
6655 - name : Run tests
6756 run : npm test
6857
6958 - name : Upload prebuilds
7059 uses : actions/upload-artifact@v4
71- if : github.ref_type == 'tag' && matrix.node == 20
60+ if : github.ref_type == 'tag' && startsWith( matrix.node, '20')
7261 with :
7362 path : prebuilds/**
74- name : prebuilds-${{matrix .os}}
63+ name : prebuilds-${{runner .os}}-${{runner.arch }}
7564 retention-days : 2
0 commit comments