From f847da57b846c98cff6c192e2441451d1d7b1114 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 4 Jan 2026 13:54:04 +0100 Subject: [PATCH] npm v12 removes command-line options --- .github/workflows/tests.yml | 13 ++++++++---- .github/workflows/visual-studio.yml | 7 +++++-- gyp/.github/workflows/node-gyp.yml | 32 +++++++++++++---------------- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d530aed20d..d51ae2a4e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -124,6 +124,7 @@ jobs: with: python-version: ${{ matrix.python }} allow-prereleases: true + - run: py --list-paths || true # Show all Python paths on Windows - uses: seanmiddleditch/gha-setup-ninja@v6 - name: Install wasi-sdk (Windows) shell: pwsh @@ -163,15 +164,19 @@ jobs: echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV - name: Run Python Tests run: python -m pytest - - name: Run Tests (macOS or Linux) + - name: Run Tests (Linux or macOS) if: runner.os != 'Windows' - shell: bash - run: npm test --python="${pythonLocation}/python" env: FULL_TEST: ${{ (matrix.node == '24.x' && matrix.python == '3.14') && '1' || '0' }} + NODE_GYP_FORCE_PYTHON: "${{ env.pythonLocation }}/python" + run: npm test - name: Run Tests (Windows) if: runner.os == 'Windows' shell: bash # Building wasm on Windows requires using make generator, it only works in bash - run: npm run test --python="${pythonLocation}\\python.exe" env: FULL_TEST: ${{ (matrix.node == '24.x' && matrix.python == '3.14') && '1' || '0' }} + NODE_GYP_FORCE_PYTHON: "${{ env.pythonLocation }}\\python.exe" + run: | + echo "NODE_GYP_FORCE_PYTHON=${NODE_GYP_FORCE_PYTHON}" + npm run test + diff --git a/.github/workflows/visual-studio.yml b/.github/workflows/visual-studio.yml index c4d45c7d9f..10e6622088 100644 --- a/.github/workflows/visual-studio.yml +++ b/.github/workflows/visual-studio.yml @@ -33,6 +33,9 @@ jobs: python-version: "3.x" - name: Install Dependencies run: npm install + # - run: echo "pythonLocation=${pythonLocation}" + - run: echo "env:pythonLocation=${env:pythonLocation}" + # - run: env - name: Run Node tests - shell: pwsh - run: npm run test --python="${env:pythonLocation}\\python.exe" --msvs-version="${{ matrix.msvs-version }}" + shell: bash # Building wasm on Windows requires using make generator, it only works in bash + run: npm run test diff --git a/gyp/.github/workflows/node-gyp.yml b/gyp/.github/workflows/node-gyp.yml index 2e592a6d38..fbbfdad634 100644 --- a/gyp/.github/workflows/node-gyp.yml +++ b/gyp/.github/workflows/node-gyp.yml @@ -11,34 +11,35 @@ jobs: matrix: os: [macos-latest, ubuntu-latest, windows-latest] python-version: ["3.10", "3.12", "3.14"] - exclude: - # Windows on Python 3.14 is blocked by nodejs/node#59983 + #exclude: + # # Windows on Python 3.14 is blocked by nodejs/node#59983 + # - os: windows-latest + # python-version: "3.14" + include: - os: windows-latest python-version: "3.14" - include: - - os: windows-latest # Windows on Python 3.13 instead of 3.14 - python-version: "3.13" - os: macos-15-intel # macOS on Intel python-version: "3.14" - os: ubuntu-24.04-arm # Ubuntu on ARM python-version: "3.14" - os: windows-11-arm # Windows on ARM - python-version: "3.13" # Windows on Python 3.13 instead of 3.14 + python-version: "3.14" runs-on: ${{ matrix.os }} steps: - name: Clone gyp-next - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: path: gyp-next - name: Clone nodejs/node-gyp - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: repository: nodejs/node-gyp path: node-gyp - uses: actions/setup-node@v6 with: node-version: "lts/*" - - uses: actions/setup-python@v6 + - name: Use Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -57,14 +58,9 @@ jobs: run: | rm -rf node-gyp/gyp cp -r gyp-next node-gyp/gyp - - name: Run tests (macOS or Linux) - if: runner.os != 'Windows' - run: | - cd node-gyp - npm test --python="${pythonLocation}/python" - - name: Run tests (Windows) - if: runner.os == 'Windows' - shell: pwsh + - run: echo "env:pythonLocation=${env:pythonLocation}" + # - run: env + - name: Run tests run: | cd node-gyp - npm run test --python="${env:pythonLocation}\\python.exe" + npm test