forked from nospaceships/node-raw-socket
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(*): add support for v14 on windows
- Loading branch information
Showing
1 changed file
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ env: | |
jobs: | ||
build_x86_64: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
npm_config_python: python3.10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -34,13 +36,6 @@ jobs: | |
- os: windows-2019 | ||
node: 20 | ||
arch: ia32 | ||
exclude: | ||
- os: windows-2019 | ||
node: 14 | ||
arch: x64 | ||
env: | ||
npm_config_msvs_version: 2019 | ||
npm_config_python: python3.10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
|
@@ -52,6 +47,18 @@ jobs: | |
node-version: ${{ matrix.node }} | ||
architecture: ${{ matrix.arch == 'ia32' && 'x86' || 'x64' }} | ||
|
||
# https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md#windows | ||
- name: Update node-gyp | ||
shell: pwsh | ||
if: ${{ startsWith(matrix.os, 'windows') && matrix.node <= 14 }} | ||
run: | | ||
# Find the location of node.exe | ||
$nodeExeLocation = Get-Command node | Select-Object -ExpandProperty Source | ||
# Extract the directory path from the node.exe location | ||
$nodeDir = $nodeExeLocation | Split-Path | ||
# Install node-gyp | ||
npm i --prefix "$nodeDir\node_modules\npm\node_modules\npm-lifecycle" [email protected] | ||
- name: Install cross-compilation tools | ||
if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||
run: | | ||
|
@@ -63,7 +70,9 @@ jobs: | |
&& sudo rm -rf /var/lib/apt/lists/* | ||
- name: Install dependencies | ||
run: npm ci --ignore-scripts | ||
run: | | ||
node-gyp -v | ||
npm ci --ignore-scripts | ||
- name: Prebuild package | ||
if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||
|