From 9d1904fb9a9044c4876e7af00508649eec2f2354 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 1 May 2018 23:32:30 +0200 Subject: [PATCH 1/9] Adding initial node 10 support. --- packages/grpc-native-core/build.yaml | 2 +- packages/grpc-native-core/package.json | 4 ++-- packages/grpc-native-core/templates/package.json.template | 2 +- .../tools/run_tests/artifacts/build_artifact_node.bat | 2 +- .../tools/run_tests/artifacts/build_artifact_node.sh | 2 +- .../tools/run_tests/artifacts/build_artifact_node_arm.sh | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/grpc-native-core/build.yaml b/packages/grpc-native-core/build.yaml index 55bf7a486..4836b2492 100644 --- a/packages/grpc-native-core/build.yaml +++ b/packages/grpc-native-core/build.yaml @@ -1,3 +1,3 @@ settings: '#': It's possible to have node_version here as a key to override the core's version. - 'node_version': 1.11.0 + 'node_version': 1.11.1 diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index c112e7729..78a487b42 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.11.0", + "version": "1.11.1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", @@ -30,7 +30,7 @@ "dependencies": { "lodash": "^4.15.0", "nan": "^2.0.0", - "node-pre-gyp": "0.7.0", + "node-pre-gyp": "^0.10.0", "protobufjs": "^5.0.0" }, "devDependencies": { diff --git a/packages/grpc-native-core/templates/package.json.template b/packages/grpc-native-core/templates/package.json.template index 35f55b0ea..33a77dbb5 100644 --- a/packages/grpc-native-core/templates/package.json.template +++ b/packages/grpc-native-core/templates/package.json.template @@ -32,7 +32,7 @@ "dependencies": { "lodash": "^4.15.0", "nan": "^2.0.0", - "node-pre-gyp": "0.7.0", + "node-pre-gyp": "^0.10.0", "protobufjs": "^5.0.0" }, "devDependencies": { 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 e84dd8963..31d062f79 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 @@ -14,7 +14,7 @@ set arch_list=ia32 x64 -set node_versions=4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 9.0.0 +set node_versions=4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 9.0.0 10.0.0 set electron_versions=1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh index 006370daa..d9b2c424a 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh @@ -17,7 +17,7 @@ set -ex arch_list=( ia32 x64 ) -node_versions=( 4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 9.0.0 ) +node_versions=( 4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 9.0.0 10.0.0 ) electron_versions=( 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 ) while true ; do diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh index 7faf15cca..275b43b21 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh @@ -23,7 +23,7 @@ mkdir -p "${ARTIFACTS_OUT}" npm update -node_versions=( 4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 9.0.0 ) +node_versions=( 4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 9.0.0 10.0.0 ) for version in ${node_versions[@]} do From e35856061ebd28aaee67d30a856634981affc713 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 2 May 2018 00:45:04 +0200 Subject: [PATCH 2/9] Building with node 10, because otherwise there's a weird issue, and I can't be bothered to understand it. --- .../tools/run_tests/artifacts/build_artifact_node.bat | 7 +++++++ .../tools/run_tests/artifacts/build_artifact_node.sh | 2 ++ .../tools/run_tests/artifacts/build_artifact_node_arm.sh | 3 +++ 3 files changed, 12 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 31d062f79..442b2b047 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 @@ -12,6 +12,13 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. +powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/nvm-ps/master/nvm.ps1 | iex }" + +SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH% + +call nvm install 10 +call nvm use 10 + set arch_list=ia32 x64 set node_versions=4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 9.0.0 10.0.0 diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh index d9b2c424a..303fd3ec3 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +nvm install 10 +nvm use 10 set -ex diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh index 275b43b21..e7e301ed3 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +nvm install 10 +nvm use 10 + set -ex cd $(dirname $0)/../../.. From 5f47953c88ac9671e5e474630b640cf56b28b587 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 2 May 2018 01:20:08 +0200 Subject: [PATCH 3/9] Installing nvm from kokoro scripts. --- .../tools/run_tests/artifacts/build_artifact_node.bat | 4 ---- tools/release/kokoro.bat | 5 +++-- tools/release/kokoro.sh | 5 +++-- 3 files changed, 6 insertions(+), 8 deletions(-) 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 442b2b047..2c4ee6f37 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 @@ -12,10 +12,6 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. -powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/nvm-ps/master/nvm.ps1 | iex }" - -SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH% - call nvm install 10 call nvm use 10 diff --git a/tools/release/kokoro.bat b/tools/release/kokoro.bat index 1fde63b58..c55ddbf3d 100644 --- a/tools/release/kokoro.bat +++ b/tools/release/kokoro.bat @@ -14,8 +14,9 @@ @echo "Starting Windows build" -@rem https://github.com/mapbox/node-pre-gyp/issues/362 -call npm install -g node-gyp +powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/nvm-ps/master/nvm.ps1 | iex }" + +SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH% cd /d %~dp0 cd ..\.. diff --git a/tools/release/kokoro.sh b/tools/release/kokoro.sh index b89504a94..37e61ea76 100755 --- a/tools/release/kokoro.sh +++ b/tools/release/kokoro.sh @@ -13,8 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# https://github.com/mapbox/node-pre-gyp/issues/362 -npm install -g node-gyp +curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" set -ex cd $(dirname $0)/../.. From 582c171da4711441c9a7e92c149f2b784deb4aad Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 2 May 2018 01:43:31 +0200 Subject: [PATCH 4/9] Shuffling things around a bit better... --- .../tools/run_tests/artifacts/build_artifact_node.bat | 3 --- .../tools/run_tests/artifacts/build_artifact_node.sh | 3 --- .../tools/run_tests/artifacts/build_artifact_node_arm.sh | 6 +++--- tools/release/kokoro.bat | 5 +++++ tools/release/kokoro.sh | 5 +++++ 5 files changed, 13 insertions(+), 9 deletions(-) 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 2c4ee6f37..31d062f79 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 @@ -12,9 +12,6 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. -call nvm install 10 -call nvm use 10 - set arch_list=ia32 x64 set node_versions=4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 9.0.0 10.0.0 diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh index 303fd3ec3..3120d6d37 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -nvm install 10 -nvm use 10 - set -ex arch_list=( ia32 x64 ) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh index e7e301ed3..34d9ffacb 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -nvm install 10 -nvm use 10 - set -ex +# https://github.com/mapbox/node-pre-gyp/issues/362 +npm install -g node-gyp + cd $(dirname $0)/../../.. rm -rf build || true diff --git a/tools/release/kokoro.bat b/tools/release/kokoro.bat index c55ddbf3d..d26f58b3b 100644 --- a/tools/release/kokoro.bat +++ b/tools/release/kokoro.bat @@ -17,6 +17,11 @@ powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/nvm-ps/master/nvm.ps1 | iex }" SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH% +call nvm install 10 +call nvm use 10 + +call npm install -g npm +call npm install -g node-gyp cd /d %~dp0 cd ..\.. diff --git a/tools/release/kokoro.sh b/tools/release/kokoro.sh index 37e61ea76..4b0fe37d1 100755 --- a/tools/release/kokoro.sh +++ b/tools/release/kokoro.sh @@ -17,6 +17,11 @@ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +nvm install 10 +nvm use 10 +npm install -g npm +npm install -g node-gyp + set -ex cd $(dirname $0)/../.. base_dir=$(pwd) From c94718c007f56bb49a709009be6e2b21cc9a5a67 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 2 May 2018 03:41:42 +0200 Subject: [PATCH 5/9] Let's double down on installing node 10... --- .../tools/run_tests/artifacts/build_artifact_node.sh | 5 +++++ .../tools/run_tests/artifacts/build_artifact_node_arm.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh index 3120d6d37..d76536fd9 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh @@ -13,6 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +nvm install 10 +nvm use 10 +npm install -g npm +npm install -g node-gyp + set -ex arch_list=( ia32 x64 ) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh index 34d9ffacb..3ca347f74 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh @@ -13,6 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +nvm install 10 +nvm use 10 +npm install -g npm +npm install -g node-gyp + set -ex # https://github.com/mapbox/node-pre-gyp/issues/362 From 727e54ef1ba9d11e32e2195787d45675bdefdf2a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 2 May 2018 04:07:41 +0200 Subject: [PATCH 6/9] Right. We need to install nvm into the docker image. --- .../grpc-native-core/tools/docker/alpine_artifact/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/grpc-native-core/tools/docker/alpine_artifact/Dockerfile b/packages/grpc-native-core/tools/docker/alpine_artifact/Dockerfile index 0674654a5..1a7ee6ed8 100644 --- a/packages/grpc-native-core/tools/docker/alpine_artifact/Dockerfile +++ b/packages/grpc-native-core/tools/docker/alpine_artifact/Dockerfile @@ -1,2 +1,3 @@ FROM node:8-alpine RUN apk add --no-cache python curl bash build-base +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash From d46556622de61aef6382222bd0a691135d3ea54a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 2 May 2018 04:11:35 +0200 Subject: [PATCH 7/9] More nvm love. --- .../tools/run_tests/artifacts/build_artifact_node.sh | 3 +++ .../tools/run_tests/artifacts/build_artifact_node_arm.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh index d76536fd9..1dc04d647 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + nvm install 10 nvm use 10 npm install -g npm diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh index 3ca347f74..24292c5f2 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + nvm install 10 nvm use 10 npm install -g npm From c5fbaf1b5b7fc2e0d9abd416a2c22a58dc2ff64e Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 2 May 2018 05:33:08 +0200 Subject: [PATCH 8/9] Reverting these... --- .../tools/run_tests/artifacts/build_artifact_node.sh | 8 -------- .../tools/run_tests/artifacts/build_artifact_node_arm.sh | 8 -------- 2 files changed, 16 deletions(-) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh index 2b3452a52..a98c775d2 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh @@ -13,14 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - -nvm install 10 -nvm use 10 -npm install -g npm -npm install -g node-gyp - set -ex arch_list=( ia32 x64 ) diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh index 24292c5f2..34d9ffacb 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node_arm.sh @@ -13,14 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - -nvm install 10 -nvm use 10 -npm install -g npm -npm install -g node-gyp - set -ex # https://github.com/mapbox/node-pre-gyp/issues/362 From 30310d79b1bacb0b89fbd9131be39d045d858ad7 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 2 May 2018 05:36:19 +0200 Subject: [PATCH 9/9] Better this way... --- .../grpc-native-core/tools/docker/alpine_artifact/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/grpc-native-core/tools/docker/alpine_artifact/Dockerfile b/packages/grpc-native-core/tools/docker/alpine_artifact/Dockerfile index 1a7ee6ed8..728ccd02d 100644 --- a/packages/grpc-native-core/tools/docker/alpine_artifact/Dockerfile +++ b/packages/grpc-native-core/tools/docker/alpine_artifact/Dockerfile @@ -1,3 +1,2 @@ -FROM node:8-alpine +FROM node:10-alpine RUN apk add --no-cache python curl bash build-base -RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash