Skip to content

Commit b8f7a68

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

File tree

2 files changed

+55
-3
lines changed

2 files changed

+55
-3
lines changed

.github/workflows/build.yml

Lines changed: 49 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,42 @@ 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+
node:
55+
- 10
56+
- 12
57+
- 14
58+
- 16
59+
# Not supported until superstring is removed or updated to support Node 18+
60+
# - 18
61+
# - 20
62+
fail-fast: false
63+
name: Prebuild with Node ${{ matrix.node }} on ${{ matrix.os }}
64+
runs-on: ${{ matrix.os }}
65+
# needs: test
66+
steps:
67+
- uses: actions/checkout@v3
68+
with:
69+
submodules: true
70+
fetch-depth: 0
71+
- uses: actions/setup-node@v3
72+
with:
73+
node-version: ${{ matrix.node }}
74+
- run: npm install
75+
- if: matrix.os == 'windows-latest'
76+
run: |
77+
${{ env.NODE_PREBUILD_CMD }} --arch ia32
78+
${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32
79+
- if: matrix.os == 'macos-latest'
80+
run: |
81+
${{ env.NODE_PREBUILD_CMD }} --arch arm64
82+
${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64
83+
- run: ${{ env.NODE_PREBUILD_CMD }}
84+
- 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)