Skip to content

Commit

Permalink
fix(*): add support for v14 on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
derevnjuk committed Aug 29, 2023
1 parent 51b6abc commit aef2321
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
jobs:
build_x86_64:
runs-on: ${{ matrix.os }}
env:
npm_config_python: python3.10
strategy:
fail-fast: false
matrix:
Expand All @@ -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:
Expand All @@ -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: |
Expand All @@ -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') }}
Expand Down

0 comments on commit aef2321

Please sign in to comment.