Skip to content

Commit e6fc058

Browse files
committed
npm v12 removes command-line options
1 parent 3f81949 commit e6fc058

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

.github/workflows/tests.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ jobs:
9393
fail-fast: false
9494
max-parallel: 11
9595
matrix:
96-
os: [macos-latest, ubuntu-latest, windows-latest]
97-
python: ["3.10", "3.12", "3.14"]
98-
node: [20.x, 22.x, 24.x]
96+
# os: [macos-latest, ubuntu-latest, windows-latest]
97+
# python: ["3.10", "3.12", "3.14"]
98+
# node: [20.x, 22.x, 24.x]
9999
include:
100100
- os: macos-15-intel # macOS on Intel
101101
python: "3.14"
@@ -124,6 +124,7 @@ jobs:
124124
with:
125125
python-version: ${{ matrix.python }}
126126
allow-prereleases: true
127+
- run: py --list-paths || true # Show all Python paths on Windows
127128
- uses: seanmiddleditch/gha-setup-ninja@v6
128129
- name: Install wasi-sdk (Windows)
129130
shell: pwsh
@@ -163,15 +164,23 @@ jobs:
163164
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
164165
- name: Run Python Tests
165166
run: python -m pytest
166-
- name: Run Tests (macOS or Linux)
167+
- run: echo "pythonLocation=${pythonLocation}" # Non-Windows no `env:` prefix
168+
- run: echo "env:pythonLocation=${env:pythonLocation}" # Windows requires `env:` prefix
169+
- run: env
170+
- name: Run Tests (Linux or macOS)
167171
if: runner.os != 'Windows'
168-
shell: bash
169-
run: npm test --python="${pythonLocation}/python"
170172
env:
171173
FULL_TEST: ${{ (matrix.node == '24.x' && matrix.python == '3.14') && '1' || '0' }}
174+
NODE_GYP_FORCE_PYTHON: "${{ env.pythonLocation }}/python"
175+
run: |
176+
echo "NODE_GYP_FORCE_PYTHON=${NODE_GYP_FORCE_PYTHON}"
177+
# NODE_GYP_FORCE_PYTHON="${env:pythonLocation}/python"
178+
npm test
172179
- name: Run Tests (Windows)
173180
if: runner.os == 'Windows'
174181
shell: bash # Building wasm on Windows requires using make generator, it only works in bash
175-
run: npm run test --python="${pythonLocation}\\python.exe"
176182
env:
177183
FULL_TEST: ${{ (matrix.node == '24.x' && matrix.python == '3.14') && '1' || '0' }}
184+
NODE_GYP_FORCE_PYTHON: "${{ env.pythonLocation }}\\python.exe"
185+
run: npm run test
186+

.github/workflows/visual-studio.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
python-version: "3.x"
3434
- name: Install Dependencies
3535
run: npm install
36+
# - run: echo "pythonLocation=${pythonLocation}"
37+
- run: echo "env:pythonLocation=${env:pythonLocation}"
38+
# - run: env
3639
- name: Run Node tests
37-
shell: pwsh
38-
run: npm run test --python="${env:pythonLocation}\\python.exe" --msvs-version="${{ matrix.msvs-version }}"
40+
shell: bash # Building wasm on Windows requires using make generator, it only works in bash
41+
run: npm run test

gyp/.github/workflows/node-gyp.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,35 @@ jobs:
1111
matrix:
1212
os: [macos-latest, ubuntu-latest, windows-latest]
1313
python-version: ["3.10", "3.12", "3.14"]
14-
exclude:
15-
# Windows on Python 3.14 is blocked by nodejs/node#59983
14+
#exclude:
15+
# # Windows on Python 3.14 is blocked by nodejs/node#59983
16+
# - os: windows-latest
17+
# python-version: "3.14"
18+
include:
1619
- os: windows-latest
1720
python-version: "3.14"
18-
include:
19-
- os: windows-latest # Windows on Python 3.13 instead of 3.14
20-
python-version: "3.13"
2121
- os: macos-15-intel # macOS on Intel
2222
python-version: "3.14"
2323
- os: ubuntu-24.04-arm # Ubuntu on ARM
2424
python-version: "3.14"
2525
- os: windows-11-arm # Windows on ARM
26-
python-version: "3.13" # Windows on Python 3.13 instead of 3.14
26+
python-version: "3.14"
2727
runs-on: ${{ matrix.os }}
2828
steps:
2929
- name: Clone gyp-next
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131
with:
3232
path: gyp-next
3333
- name: Clone nodejs/node-gyp
34-
uses: actions/checkout@v5
34+
uses: actions/checkout@v6
3535
with:
3636
repository: nodejs/node-gyp
3737
path: node-gyp
3838
- uses: actions/setup-node@v6
3939
with:
4040
node-version: "lts/*"
41-
- uses: actions/setup-python@v6
41+
- name: Use Python ${{ matrix.python-version }}
42+
uses: actions/setup-python@v6
4243
with:
4344
python-version: ${{ matrix.python-version }}
4445
allow-prereleases: true
@@ -57,14 +58,9 @@ jobs:
5758
run: |
5859
rm -rf node-gyp/gyp
5960
cp -r gyp-next node-gyp/gyp
60-
- name: Run tests (macOS or Linux)
61-
if: runner.os != 'Windows'
62-
run: |
63-
cd node-gyp
64-
npm test --python="${pythonLocation}/python"
65-
- name: Run tests (Windows)
66-
if: runner.os == 'Windows'
67-
shell: pwsh
61+
- run: echo "env:pythonLocation=${env:pythonLocation}"
62+
# - run: env
63+
- name: Run tests
6864
run: |
6965
cd node-gyp
70-
npm run test --python="${env:pythonLocation}\\python.exe"
66+
npm test

0 commit comments

Comments
 (0)