ci: use latest v20 LTS for missing node-gyp

Refs eacec5f490
This commit is contained in:
deepak1556 2024-04-10 18:38:44 +09:00
parent 9d4222079a
commit 1f3ea53dc4
3 changed files with 4 additions and 11 deletions

2
.nvmrc
View file

@ -1 +1 @@
20.9.0
20.12.1

View file

@ -78,8 +78,6 @@ steps:
- script: |
set -e
export npm_config_arch=$(VSCODE_ARCH)
npm i -g node-gyp@9.4.0
python3 -m pip install setuptools
for i in {1..5}; do # try 5 times
@ -91,6 +89,7 @@ steps:
echo "Yarn failed $i, trying again..."
done
env:
npm_config_arch: $(VSCODE_ARCH)
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"

View file

@ -93,16 +93,10 @@ steps:
. build/azure-pipelines/win32/exec.ps1
. build/azure-pipelines/win32/retry.ps1
$ErrorActionPreference = "Stop"
# TODO: remove custom node-gyp when updating to Node v20,
# refs https://github.com/npm/cli/releases/tag/v10.2.3 which is available with Node >= 20.10.0
$nodeGypDir = "$(Agent.TempDirectory)/custom-packages"
mkdir "$nodeGypDir"
npm install node-gyp@10.0.1 -g --prefix "$nodeGypDir"
$env:npm_config_node_gyp = "${nodeGypDir}/node_modules/node-gyp/bin/node-gyp.js"
$env:npm_config_arch = "$(VSCODE_ARCH)"
$env:CHILD_CONCURRENCY="1"
retry { exec { yarn --frozen-lockfile --check-files } }
env:
npm_config_arch: $(VSCODE_ARCH)
CHILD_CONCURRENCY: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"