From f55b487c360caea932d819f5f7e8a41aa56195fb Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 13 Jun 2019 15:50:17 -0700 Subject: [PATCH 1/8] Delete another directory in Windows build script --- packages/grpc-native-core/gulpfile.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/grpc-native-core/gulpfile.ts b/packages/grpc-native-core/gulpfile.ts index cfb601d0..1d5c5ee2 100644 --- a/packages/grpc-native-core/gulpfile.ts +++ b/packages/grpc-native-core/gulpfile.ts @@ -44,6 +44,7 @@ const installWindows = () => { return execa('npm', ['install', '--build-from-source'], {cwd: nativeCoreDir, stdio: 'inherit'}).catch(() => del(path.resolve(process.env.USERPROFILE, '.node-gyp', process.versions.node, 'include/node/openssl'), { force: true }).then(() => +del(path.resolve(process.env.CSIDL_LOCAL_APPDATA, 'node-gyp/cache', process.versions.node, 'include/node/openssl'), { force: true })).then(() => execa('npm', ['install', '--build-from-source'], {cwd: nativeCoreDir, stdio: 'inherit'}) )); From 0e47c1264765e492ea5039e73d3d2136d8aea22f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 13 Jun 2019 17:04:38 -0700 Subject: [PATCH 2/8] Make the same change in the other build script --- .../tools/run_tests/artifacts/build_artifact_node.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat index 7f862edc..cd0c0f0e 100644 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat @@ -33,6 +33,8 @@ for %%a in (%arch_list%) do ( @rem Try again after removing openssl headers rmdir "%USERPROFILE%\.node-gyp\%%v\include\node\openssl" /S /Q rmdir "%USERPROFILE%\.node-gyp\iojs-%%v\include\node\openssl" /S /Q + rmdir "%CSIDL_LOCAL_APPDATA%\node-gyp\cache\%%v\include\node\openssl" /S /Q + rmdir "%CSIDL_LOCAL_APPDATA%\node-gyp\cache\iojs-%%v\include\node\openssl" /S /Q call .\node_modules\.bin\node-pre-gyp.cmd build package --target=%%v --target_arch=%%a || goto :error xcopy /Y /I /S build\stage\* %ARTIFACTS_OUT%\ || goto :error From 7c5f2ce8264a826076b975c6353c4dd429e87990 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 14 Jun 2019 10:06:34 -0700 Subject: [PATCH 3/8] Echo commands to see what's going wrong --- .../tools/run_tests/artifacts/build_artifact_node.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat index cd0c0f0e..0d9df783 100644 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat @@ -26,6 +26,8 @@ call npm update || goto :error mkdir -p %ARTIFACTS_OUT% +@echo on + for %%a in (%arch_list%) do ( for %%v in (%node_versions%) do ( call .\node_modules\.bin\node-pre-gyp.cmd configure build --target=%%v --target_arch=%%a From c55edf7107be2d0d1489d38e7a72181bdee0dbbe Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 17 Jun 2019 10:30:35 -0700 Subject: [PATCH 4/8] Use known-working environment variable --- packages/grpc-native-core/gulpfile.ts | 2 +- .../tools/run_tests/artifacts/build_artifact_node.bat | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/grpc-native-core/gulpfile.ts b/packages/grpc-native-core/gulpfile.ts index 1d5c5ee2..dbfc2228 100644 --- a/packages/grpc-native-core/gulpfile.ts +++ b/packages/grpc-native-core/gulpfile.ts @@ -44,7 +44,7 @@ const installWindows = () => { return execa('npm', ['install', '--build-from-source'], {cwd: nativeCoreDir, stdio: 'inherit'}).catch(() => del(path.resolve(process.env.USERPROFILE, '.node-gyp', process.versions.node, 'include/node/openssl'), { force: true }).then(() => -del(path.resolve(process.env.CSIDL_LOCAL_APPDATA, 'node-gyp/cache', process.versions.node, 'include/node/openssl'), { force: true })).then(() => +del(path.resolve(process.env.USERPROFILE, 'AppData/node-gyp/cache', process.versions.node, 'include/node/openssl'), { force: true })).then(() => execa('npm', ['install', '--build-from-source'], {cwd: nativeCoreDir, stdio: 'inherit'}) )); diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat index 0d9df783..3a094f1e 100644 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat @@ -26,8 +26,6 @@ call npm update || goto :error mkdir -p %ARTIFACTS_OUT% -@echo on - for %%a in (%arch_list%) do ( for %%v in (%node_versions%) do ( call .\node_modules\.bin\node-pre-gyp.cmd configure build --target=%%v --target_arch=%%a @@ -35,8 +33,8 @@ for %%a in (%arch_list%) do ( @rem Try again after removing openssl headers rmdir "%USERPROFILE%\.node-gyp\%%v\include\node\openssl" /S /Q rmdir "%USERPROFILE%\.node-gyp\iojs-%%v\include\node\openssl" /S /Q - rmdir "%CSIDL_LOCAL_APPDATA%\node-gyp\cache\%%v\include\node\openssl" /S /Q - rmdir "%CSIDL_LOCAL_APPDATA%\node-gyp\cache\iojs-%%v\include\node\openssl" /S /Q + rmdir "%USERPROFILE%\AppData\node-gyp\cache\%%v\include\node\openssl" /S /Q + rmdir "%USERPROFILE%\AppData\node-gyp\cache\iojs-%%v\include\node\openssl" /S /Q call .\node_modules\.bin\node-pre-gyp.cmd build package --target=%%v --target_arch=%%a || goto :error xcopy /Y /I /S build\stage\* %ARTIFACTS_OUT%\ || goto :error From 58ce2779a1da14859877cae0ce6cb0c7347e2962 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 17 Jun 2019 14:06:02 -0700 Subject: [PATCH 5/8] Forgot the 'Local' directory component --- packages/grpc-native-core/gulpfile.ts | 2 +- .../tools/run_tests/artifacts/build_artifact_node.bat | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grpc-native-core/gulpfile.ts b/packages/grpc-native-core/gulpfile.ts index dbfc2228..6950f06d 100644 --- a/packages/grpc-native-core/gulpfile.ts +++ b/packages/grpc-native-core/gulpfile.ts @@ -44,7 +44,7 @@ const installWindows = () => { return execa('npm', ['install', '--build-from-source'], {cwd: nativeCoreDir, stdio: 'inherit'}).catch(() => del(path.resolve(process.env.USERPROFILE, '.node-gyp', process.versions.node, 'include/node/openssl'), { force: true }).then(() => -del(path.resolve(process.env.USERPROFILE, 'AppData/node-gyp/cache', process.versions.node, 'include/node/openssl'), { force: true })).then(() => +del(path.resolve(process.env.USERPROFILE, 'AppData/Local/node-gyp/cache', process.versions.node, 'include/node/openssl'), { force: true })).then(() => execa('npm', ['install', '--build-from-source'], {cwd: nativeCoreDir, stdio: 'inherit'}) )); diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat index 3a094f1e..3dcb6c20 100644 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.bat @@ -33,8 +33,8 @@ for %%a in (%arch_list%) do ( @rem Try again after removing openssl headers rmdir "%USERPROFILE%\.node-gyp\%%v\include\node\openssl" /S /Q rmdir "%USERPROFILE%\.node-gyp\iojs-%%v\include\node\openssl" /S /Q - rmdir "%USERPROFILE%\AppData\node-gyp\cache\%%v\include\node\openssl" /S /Q - rmdir "%USERPROFILE%\AppData\node-gyp\cache\iojs-%%v\include\node\openssl" /S /Q + rmdir "%USERPROFILE%\AppData\Local\node-gyp\cache\%%v\include\node\openssl" /S /Q + rmdir "%USERPROFILE%\AppData\Local\node-gyp\cache\iojs-%%v\include\node\openssl" /S /Q call .\node_modules\.bin\node-pre-gyp.cmd build package --target=%%v --target_arch=%%a || goto :error xcopy /Y /I /S build\stage\* %ARTIFACTS_OUT%\ || goto :error From b484cc286879beb58863d093607aba7b3b349842 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 18 Jun 2019 10:07:03 -0700 Subject: [PATCH 6/8] Use older version of node-gyp --- tools/release/kokoro-nodejs.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release/kokoro-nodejs.bat b/tools/release/kokoro-nodejs.bat index d73a592a..e03d4d97 100644 --- a/tools/release/kokoro-nodejs.bat +++ b/tools/release/kokoro-nodejs.bat @@ -22,7 +22,7 @@ call nvm use 10 call npm install -g npm @rem https://github.com/mapbox/node-pre-gyp/issues/362 -call npm install -g node-gyp +call npm install -g node-gyp@4 cd /d %~dp0 cd ..\.. From 31d6f4362c1ba171f4a329187cd302605185842c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 18 Jun 2019 10:24:40 -0700 Subject: [PATCH 7/8] Also use older node-gyp for electron builds --- tools/release/kokoro-electron.bat | 2 +- tools/release/kokoro-electron.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/release/kokoro-electron.bat b/tools/release/kokoro-electron.bat index 52e2fb1f..1e0fb3da 100644 --- a/tools/release/kokoro-electron.bat +++ b/tools/release/kokoro-electron.bat @@ -22,7 +22,7 @@ call nvm use 10 call npm install -g npm @rem https://github.com/mapbox/node-pre-gyp/issues/362 -call npm install -g node-gyp +call npm install -g node-gyp@4 cd /d %~dp0 cd ..\.. diff --git a/tools/release/kokoro-electron.sh b/tools/release/kokoro-electron.sh index cfb9d153..ade51215 100755 --- a/tools/release/kokoro-electron.sh +++ b/tools/release/kokoro-electron.sh @@ -21,7 +21,7 @@ nvm install 10 nvm use 10 npm install -g npm # https://github.com/mapbox/node-pre-gyp/issues/362 -npm install -g node-gyp +npm install -g node-gyp@4 set -ex cd $(dirname $0)/../.. From aed0706bf6a685091d647c48679b7b5cf0891bd9 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 19 Jun 2019 09:41:08 -0700 Subject: [PATCH 8/8] Maybe node-gyp 3 will do it --- tools/release/kokoro-electron.bat | 2 +- tools/release/kokoro-electron.sh | 2 +- tools/release/kokoro-nodejs.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/release/kokoro-electron.bat b/tools/release/kokoro-electron.bat index 1e0fb3da..4bc1d0a2 100644 --- a/tools/release/kokoro-electron.bat +++ b/tools/release/kokoro-electron.bat @@ -22,7 +22,7 @@ call nvm use 10 call npm install -g npm @rem https://github.com/mapbox/node-pre-gyp/issues/362 -call npm install -g node-gyp@4 +call npm install -g node-gyp@3 cd /d %~dp0 cd ..\.. diff --git a/tools/release/kokoro-electron.sh b/tools/release/kokoro-electron.sh index ade51215..1305c1ae 100755 --- a/tools/release/kokoro-electron.sh +++ b/tools/release/kokoro-electron.sh @@ -21,7 +21,7 @@ nvm install 10 nvm use 10 npm install -g npm # https://github.com/mapbox/node-pre-gyp/issues/362 -npm install -g node-gyp@4 +npm install -g node-gyp@3 set -ex cd $(dirname $0)/../.. diff --git a/tools/release/kokoro-nodejs.bat b/tools/release/kokoro-nodejs.bat index e03d4d97..0655d2df 100644 --- a/tools/release/kokoro-nodejs.bat +++ b/tools/release/kokoro-nodejs.bat @@ -22,7 +22,7 @@ call nvm use 10 call npm install -g npm @rem https://github.com/mapbox/node-pre-gyp/issues/362 -call npm install -g node-gyp@4 +call npm install -g node-gyp@3 cd /d %~dp0 cd ..\..