mirror of https://github.com/grpc/grpc-node.git
Merge pull request #715 from nicolasnoble/upmerge
Upmerge from grpc@1.18.x
This commit is contained in:
commit
a10c534b01
|
@ -22,6 +22,8 @@ npm install -g node-gyp
|
|||
|
||||
DO_NATIVE=true
|
||||
DO_CROSS=true
|
||||
DO_ELECTRON=true
|
||||
DO_NODEJS=true
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case $1 in
|
||||
|
@ -30,6 +32,14 @@ while [ $# -gt 0 ] ; do
|
|||
;;
|
||||
--cross-only)
|
||||
DO_NATIVE=false
|
||||
DO_ELECTRON=false
|
||||
;;
|
||||
--electron-only)
|
||||
DO_NODEJS=false
|
||||
DO_CROSS=false
|
||||
;;
|
||||
--nodejs-only)
|
||||
DO_ELECTRON=false
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
|
@ -50,7 +60,12 @@ rm -rf build || true
|
|||
mkdir -p "${ARTIFACTS_OUT}"
|
||||
|
||||
if [ "$DO_NATIVE" = "true" ] ; then
|
||||
$tool_dir/build_artifact_node.sh
|
||||
if [ "$DO_ELECTRON" = "true" ] ; then
|
||||
$tool_dir/build_artifact_electron.sh
|
||||
fi
|
||||
if [ "$DO_NODEJS" = "true" ] ; then
|
||||
$tool_dir/build_artifact_node.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$DO_CROSS" = "true" ] ; then
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
@rem Copyright 2016 gRPC authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
|
||||
set arch_list=ia32 x64
|
||||
|
||||
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 2.0.0 3.0.0 4.0.0
|
||||
|
||||
set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm
|
||||
|
||||
set JOBS=8
|
||||
|
||||
del /f /q BUILD || rmdir build /s /q
|
||||
|
||||
call npm update || goto :error
|
||||
|
||||
mkdir -p %ARTIFACTS_OUT%
|
||||
|
||||
for %%a in (%arch_list%) do (
|
||||
for %%v in (%electron_versions%) do (
|
||||
cmd /V /C "set "HOME=%USERPROFILE%\electron-gyp" && call .\node_modules\.bin\node-pre-gyp.cmd configure rebuild package --runtime=electron --target=%%v --target_arch=%%a --disturl=https://atom.io/download/electron" || goto :error
|
||||
|
||||
xcopy /Y /I /S build\stage\* %ARTIFACTS_OUT%\ || goto :error
|
||||
rmdir build /S /Q
|
||||
)
|
||||
)
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
exit /b 1
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2016 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -ex
|
||||
|
||||
arch_list=( ia32 x64 )
|
||||
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 2.0.0 3.0.0 4.0.0 )
|
||||
|
||||
umask 022
|
||||
|
||||
cd $(dirname $0)/../../..
|
||||
|
||||
rm -rf build || true
|
||||
|
||||
mkdir -p "${ARTIFACTS_OUT}"
|
||||
|
||||
npm update
|
||||
|
||||
for arch in ${arch_list[@]}
|
||||
do
|
||||
for version in ${electron_versions[@]}
|
||||
do
|
||||
HOME=~/.electron-gyp ./node_modules/.bin/node-pre-gyp configure rebuild package --runtime=electron --target=$version --target_arch=$arch --disturl=https://atom.io/download/electron
|
||||
cp -r build/stage/* "${ARTIFACTS_OUT}"/
|
||||
done
|
||||
done
|
||||
|
||||
rm -rf build || true
|
|
@ -16,8 +16,6 @@ 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 11.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 2.0.0 3.0.0 4.0.0
|
||||
|
||||
set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm
|
||||
|
||||
set JOBS=8
|
||||
|
@ -40,13 +38,6 @@ for %%a in (%arch_list%) do (
|
|||
xcopy /Y /I /S build\stage\* %ARTIFACTS_OUT%\ || goto :error
|
||||
rmdir build /S /Q
|
||||
)
|
||||
|
||||
for %%v in (%electron_versions%) do (
|
||||
cmd /V /C "set "HOME=%USERPROFILE%\electron-gyp" && call .\node_modules\.bin\node-pre-gyp.cmd configure rebuild package --runtime=electron --target=%%v --target_arch=%%a --disturl=https://atom.io/download/electron" || goto :error
|
||||
|
||||
xcopy /Y /I /S build\stage\* %ARTIFACTS_OUT%\ || goto :error
|
||||
rmdir build /S /Q
|
||||
)
|
||||
)
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
|
|
|
@ -17,13 +17,11 @@ 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 10.0.0 11.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 2.0.0 3.0.0 4.0.0 )
|
||||
|
||||
while true ; do
|
||||
case $1 in
|
||||
--with-alpine)
|
||||
arch_list=( x64 )
|
||||
electron_versions=( )
|
||||
;;
|
||||
"")
|
||||
;;
|
||||
|
@ -52,12 +50,6 @@ do
|
|||
./node_modules/.bin/node-pre-gyp configure rebuild package --target=$version --target_arch=$arch
|
||||
cp -r build/stage/* "${ARTIFACTS_OUT}"/
|
||||
done
|
||||
|
||||
for version in ${electron_versions[@]}
|
||||
do
|
||||
HOME=~/.electron-gyp ./node_modules/.bin/node-pre-gyp configure rebuild package --runtime=electron --target=$version --target_arch=$arch --disturl=https://atom.io/download/electron
|
||||
cp -r build/stage/* "${ARTIFACTS_OUT}"/
|
||||
done
|
||||
done
|
||||
|
||||
rm -rf build || true
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro-electron.sh"
|
||||
timeout_mins: 60
|
|
@ -15,5 +15,5 @@
|
|||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro.sh"
|
||||
build_file: "grpc-node/tools/release/kokoro-nodejs.sh"
|
||||
timeout_mins: 60
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro-electron.sh"
|
||||
timeout_mins: 60
|
|
@ -15,5 +15,5 @@
|
|||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro.sh"
|
||||
build_file: "grpc-node/tools/release/kokoro-nodejs.sh"
|
||||
timeout_mins: 60
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro-electron.bat"
|
||||
timeout_mins: 60
|
|
@ -15,5 +15,5 @@
|
|||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro.bat"
|
||||
build_file: "grpc-node/tools/release/kokoro-nodejs.bat"
|
||||
timeout_mins: 60
|
|
@ -0,0 +1,42 @@
|
|||
@rem Copyright 2018 gRPC authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
|
||||
@echo "Starting Windows build"
|
||||
|
||||
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
|
||||
@rem https://github.com/mapbox/node-pre-gyp/issues/362
|
||||
call npm install -g node-gyp
|
||||
|
||||
cd /d %~dp0
|
||||
cd ..\..
|
||||
|
||||
git submodule update --init
|
||||
git submodule foreach --recursive git submodule update --init
|
||||
|
||||
set ARTIFACTS_OUT=artifacts
|
||||
cd packages\grpc-native-core
|
||||
call tools\run_tests\artifacts\build_artifact_electron.bat || goto :error
|
||||
cd ..\..
|
||||
|
||||
move packages\grpc-native-core\artifacts .
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
exit /b 1
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
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"
|
||||
|
||||
nvm install 10
|
||||
nvm use 10
|
||||
npm install -g npm
|
||||
# https://github.com/mapbox/node-pre-gyp/issues/362
|
||||
npm install -g node-gyp
|
||||
|
||||
set -ex
|
||||
cd $(dirname $0)/../..
|
||||
base_dir=$(pwd)
|
||||
|
||||
# Install gRPC and its submodules.
|
||||
git submodule update --init
|
||||
git submodule foreach --recursive git submodule update --init
|
||||
|
||||
pip install mako
|
||||
./packages/grpc-native-core/tools/buildgen/generate_projects.sh
|
||||
|
||||
OS=`uname`
|
||||
|
||||
case $OS in
|
||||
Linux)
|
||||
docker build -t kokoro-native-image tools/release/native
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $base_dir:$base_dir kokoro-native-image $base_dir/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh --native-only --electron-only
|
||||
cp -rv packages/grpc-native-core/artifacts .
|
||||
;;
|
||||
Darwin)
|
||||
JOBS=8 ARTIFACTS_OUT=$base_dir/artifacts ./packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_electron.sh
|
||||
;;
|
||||
esac
|
|
@ -40,9 +40,9 @@ case $OS in
|
|||
Linux)
|
||||
docker build -t kokoro-native-image tools/release/native
|
||||
docker build -t kokoro-cross-image tools/release/cross
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $base_dir:$base_dir kokoro-native-image $base_dir/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh --native-only
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $base_dir:$base_dir kokoro-native-image $base_dir/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh --native-only --nodejs-only
|
||||
cp -rv packages/grpc-native-core/artifacts .
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $base_dir:$base_dir kokoro-cross-image $base_dir/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh --cross-only
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $base_dir:$base_dir kokoro-cross-image $base_dir/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh --cross-only --nodejs-only
|
||||
cp -rv packages/grpc-native-core/artifacts .
|
||||
;;
|
||||
Darwin)
|
|
@ -1,10 +0,0 @@
|
|||
FROM ubuntu:16.04
|
||||
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl build-essential g++-aarch64-linux-gnu g++-arm-linux-gnueabihf docker.io python libc6-dev:i386 lib32stdc++-5-dev
|
||||
|
||||
RUN mkdir /usr/local/nvm
|
||||
ENV NVM_DIR /usr/local/nvm
|
||||
|
||||
RUN curl curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
|
|
@ -0,0 +1,25 @@
|
|||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro-electron.sh"
|
||||
timeout_mins: 180
|
||||
action {
|
||||
define_artifacts {
|
||||
regex: "github/grpc-node/artifacts/**",
|
||||
strip_prefix: "github/grpc-node/artifacts"
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro.sh"
|
||||
build_file: "grpc-node/tools/release/kokoro-nodejs.sh"
|
||||
timeout_mins: 180
|
||||
action {
|
||||
define_artifacts {
|
|
@ -0,0 +1,25 @@
|
|||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro-electron.sh"
|
||||
timeout_mins: 120
|
||||
action {
|
||||
define_artifacts {
|
||||
regex: "github/grpc-node/artifacts/**",
|
||||
strip_prefix: "github/grpc-node/artifacts"
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro.sh"
|
||||
build_file: "grpc-node/tools/release/kokoro-nodejs.sh"
|
||||
timeout_mins: 120
|
||||
action {
|
||||
define_artifacts {
|
|
@ -0,0 +1,25 @@
|
|||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro-electron.bat"
|
||||
timeout_mins: 120
|
||||
action {
|
||||
define_artifacts {
|
||||
regex: "github/grpc-node/artifacts/**",
|
||||
strip_prefix: "github/grpc-node/artifacts"
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
# Config file for Kokoro (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro.bat"
|
||||
build_file: "grpc-node/tools/release/kokoro-nodejs.bat"
|
||||
timeout_mins: 120
|
||||
action {
|
||||
define_artifacts {
|
Loading…
Reference in New Issue