-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use newest node-gyp for SDL pipeline (#199820)
* chore: use latest upstream node-gyp * fix: use node-gyp.js file directly * apply PR feedback * chore: delete patch file * Apply PR feedback * Update cache salt
- Loading branch information
Showing
4 changed files
with
14 additions
and
94 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 |
---|---|---|
@@ -1 +1 @@ | ||
2023-12-07T16:21:36.646Z | ||
2024-01-29T19:26:27.993Z |
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 |
---|---|---|
|
@@ -95,29 +95,16 @@ stages: | |
displayName: CodeQL Initialize | ||
condition: eq(variables['Codeql.enabled'], 'True') | ||
|
||
- powershell: | | ||
mkdir -Force .build/node-gyp | ||
displayName: Create custom node-gyp directory | ||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) | ||
- powershell: | | ||
. ../../build/azure-pipelines/win32/exec.ps1 | ||
$ErrorActionPreference = "Stop" | ||
# TODO: Should be replaced with upstream URL once https://github.com/nodejs/node-gyp/pull/2825 | ||
# gets merged. | ||
exec { git clone https://github.com/rzhao271/node-gyp.git . } "Cloning rzhao271/node-gyp failed" | ||
exec { git checkout 102b347da0c92c29f9c67df22e864e70249cf086 } "Checking out 102b347 failed" | ||
exec { npm install } "Building rzhao271/node-gyp failed" | ||
exec { python3 -m pip install setuptools } "Installing setuptools failed" | ||
displayName: Install custom node-gyp | ||
workingDirectory: .build/node-gyp | ||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) | ||
- powershell: | | ||
. build/azure-pipelines/win32/exec.ps1 | ||
. build/azure-pipelines/win32/retry.ps1 | ||
$ErrorActionPreference = "Stop" | ||
$env:npm_config_node_gyp = "$(Join-Path $pwd.Path '.build/node-gyp/bin/node-gyp.js')" | ||
# 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 [email protected] -g --prefix "$nodeGypDir" | ||
$env:npm_config_node_gyp = "${nodeGypDir}/node_modules/node-gyp/bin/node-gyp.js" | ||
$env:npm_config_arch = "$(NPM_ARCH)" | ||
retry { exec { yarn --frozen-lockfile --check-files } } | ||
env: | ||
|
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 |
---|---|---|
|
@@ -89,33 +89,17 @@ steps: | |
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) | ||
displayName: Setup NPM Authentication | ||
|
||
- powershell: | | ||
mkdir -Force .build/node-gyp | ||
displayName: Create custom node-gyp directory | ||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) | ||
- powershell: | | ||
. ../../build/azure-pipelines/win32/exec.ps1 | ||
$ErrorActionPreference = "Stop" | ||
# TODO: Should be replaced with upstream URL once https://github.com/nodejs/node-gyp/pull/2825 | ||
# gets merged. | ||
exec { git config --global user.email "[email protected]" } "git config user.email failed" | ||
exec { git config --global user.name "VSCode" } "git config user.name failed" | ||
exec { git clone https://github.com/nodejs/node-gyp.git . } "Cloning nodejs/node-gyp failed" | ||
exec { git checkout v9.4.0 } "Checking out v9.4.0 failed" | ||
exec { git am --3way --whitespace=fix ../../build/npm/gyp/patches/gyp_spectre_mitigation_support.patch } "Apply spectre patch failed" | ||
exec { npm install } "Building node-gyp failed" | ||
exec { python3 -m pip install setuptools } "Installing setuptools failed" | ||
displayName: Install custom node-gyp | ||
workingDirectory: .build/node-gyp | ||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) | ||
- powershell: | | ||
. build/azure-pipelines/win32/exec.ps1 | ||
. build/azure-pipelines/win32/retry.ps1 | ||
$ErrorActionPreference = "Stop" | ||
$env:npm_config_node_gyp="$(Join-Path $pwd.Path '.build/node-gyp/bin/node-gyp.js')" | ||
$env:npm_config_arch="$(VSCODE_ARCH)" | ||
# 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 [email protected] -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: | ||
|
51 changes: 0 additions & 51 deletions
51
build/npm/gyp/patches/gyp_spectre_mitigation_support.patch
This file was deleted.
Oops, something went wrong.