Skip to content

Commit fc8aef7

Browse files
committed
Prebuild through GitHub Actions
1 parent d1d2864 commit fc8aef7

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
- master
1010

1111
env:
12-
NODE_BUILD_CMD: npx --no-install prebuild -t 10.12.0 -t 12.13.0 --strip
13-
ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 3.0.0 -t 4.0.0 -t 4.0.4 -t 5.0.0 --strip
12+
NODE_PREBUILD_CMD: npx prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --strip
13+
ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 3.0.0 -t 4.0.0 -t 4.0.4 -t 5.0.0 --strip
1414

1515
jobs:
1616

@@ -19,8 +19,16 @@ jobs:
1919
matrix:
2020
os:
2121
- windows-2019
22+
- ubuntu-latest
23+
- macos-latest
2224
node:
2325
- 10
26+
- 12
27+
- 14
28+
- 16
29+
# Not supported until superstring is removed or updated to support Node 18+
30+
# - 18
31+
# - 20
2432
fail-fast: false
2533
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
2634
runs-on: ${{ matrix.os }}
@@ -35,3 +43,34 @@ jobs:
3543

3644
- run: npm install
3745
- run: npm test
46+
47+
prebuild:
48+
strategy:
49+
matrix:
50+
os:
51+
- ubuntu-latest
52+
- windows-2019
53+
- macos-latest
54+
fail-fast: false
55+
name: Prebuild on ${{ matrix.os }}
56+
runs-on: ${{ matrix.os }}
57+
# needs: test
58+
steps:
59+
- uses: actions/checkout@v3
60+
with:
61+
submodules: true
62+
fetch-depth: 0
63+
- uses: actions/setup-node@v3
64+
with:
65+
node-version: 16
66+
- run: npm install
67+
- if: matrix.os == 'windows-latest'
68+
run: |
69+
${{ env.NODE_PREBUILD_CMD }} --arch ia32
70+
${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32
71+
- if: matrix.os == 'macos-latest'
72+
run: |
73+
${{ env.NODE_PREBUILD_CMD }} --arch arm64
74+
${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64
75+
- run: ${{ env.NODE_PREBUILD_CMD }}
76+
- run: ${{ env.ELECTRON_PREBUILD_CMD }}

binding.gyp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@
4949
]
5050
}
5151
],
52-
'variables': { 'runtime%': 'node' },
52+
'variables': {
53+
'runtime%': 'node',
54+
'openssl_fips': '',
55+
'v8_enable_pointer_compression%': 0,
56+
'v8_enable_31bit_smis_on_64bit_arch%': 0,
57+
},
5358
'conditions': [
5459
['runtime=="electron"', { 'defines': ['NODE_RUNTIME_ELECTRON=1'] }],
5560
]

0 commit comments

Comments
 (0)