Skip to content

Commit

Permalink
Prebuild through GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed Jun 14, 2023
1 parent d1d2864 commit 37306f8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- master

env:
NODE_BUILD_CMD: npx --no-install prebuild -t 10.12.0 -t 12.13.0 --strip
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
NODE_PREBUILD_CMD: npx prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --strip
ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 3.0.0 -t 4.0.0 -t 4.0.4 -t 5.0.0 --strip

jobs:

Expand All @@ -19,8 +19,15 @@ jobs:
matrix:
os:
- windows-2019
- ubuntu-latest
- macos-latest
node:
- 10
- 12
- 14
- 16
# - 18
# - 20
fail-fast: false
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -35,3 +42,34 @@ jobs:

- run: npm install
- run: npm test

prebuild:
strategy:
matrix:
os:
- ubuntu-latest
- windows-2019
- macos-latest
fail-fast: false
name: Prebuild on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# needs: test
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- if: matrix.os == 'windows-latest'
run: |
${{ env.NODE_PREBUILD_CMD }} --arch ia32
${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32
- if: matrix.os == 'macos-latest'
run: |
${{ env.NODE_PREBUILD_CMD }} --arch arm64
${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64
- run: ${{ env.NODE_PREBUILD_CMD }}
- run: ${{ env.ELECTRON_PREBUILD_CMD }}
7 changes: 6 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@
]
}
],
'variables': { 'runtime%': 'node' },
'variables': {
'runtime%': 'node',
'openssl_fips': '',
'v8_enable_pointer_compression%': 0,
'v8_enable_31bit_smis_on_64bit_arch%': 0,
},
'conditions': [
['runtime=="electron"', { 'defines': ['NODE_RUNTIME_ELECTRON=1'] }],
]
Expand Down

0 comments on commit 37306f8

Please sign in to comment.