Avoid recompiling remote native node modules (#112644)

* avoid recompiling remote native node modules

fixes #112320

* fix build

* update cache

* empty

* chore: remove rebuild step

* chore: update salt

* product compile should use same CC CXX

Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
João Moreno
2020-12-17 11:16:32 +01:00
committed by GitHub
parent 83c47f90d0
commit fd85ae4f4a
4 changed files with 29 additions and 17 deletions

View File

@@ -76,12 +76,19 @@ steps:
- script: |
set -e
if [ -z "$CC" ] || [ -z "$CXX" ]
then
export npm_config_arch=$(NPM_ARCH)
if [ -z "$CC" ] || [ -z "$CXX" ]; then
export CC=$(which gcc-5)
export CXX=$(which g++-5)
fi
export npm_config_arch=$(NPM_ARCH)
if [ "$VSCODE_ARCH" == "x64" ]; then
export VSCODE_REMOTE_CC=$(which gcc-4.8)
export VSCODE_REMOTE_CXX=$(which g++-4.8)
export VSCODE_REMOTE_NODE_GYP=$(which node-gyp)
fi
for i in {1..3}; do # try 3 times, for Terrapin
yarn --frozen-lockfile && break
if [ $i -eq 3 ]; then
@@ -103,16 +110,6 @@ steps:
vstsFeed: "npm-vscode"
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: |
set -e
export CC=$(which gcc-4.8)
export CXX=$(which g++-4.8)
export npm_config_node_gyp=$(which node-gyp)
cd remote && rm -rf node_modules/
yarn
displayName: Rebuild remote modules with gcc-4.8
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
- script: |
set -e
node build/azure-pipelines/mixin