Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebuilt binaries for s390x #1230

Merged
merged 10 commits into from Jan 24, 2020
Expand Up @@ -70,6 +70,7 @@ fi

if [ "$DO_CROSS" = "true" ] ; then
$tool_dir/build_artifact_node_arm.sh
$tool_dir/build_artifact_node_s390x.sh

docker build -t alpine_node_artifact $base_dir/tools/docker/alpine_artifact
docker run -e JOBS=8 -e ARTIFACTS_OUT=/var/grpc/artifacts -v $base_dir:/var/grpc alpine_node_artifact /var/grpc/tools/run_tests/artifacts/build_artifact_node.sh --with-alpine
Expand Down
@@ -0,0 +1,24 @@
#!/bin/bash

set -ex

# https://github.com/mapbox/node-pre-gyp/issues/362
npm install -g node-gyp

cd $(dirname $0)/../../..

rm -rf build || true

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 10.0.0 11.0.0 12.0.0 13.0.0 )

for version in ${node_versions[@]}
do
# Cross compile for s390x on x64
# Requires debian or ubuntu packages "g++-s390x-linux-gnu".
CC=s390x-linux-gnu-gcc CXX=s390x-linux-gnu-g++ LD=s390x-linux-gnu-g++ ./node_modules/.bin/node-pre-gyp configure rebuild package testpackage --target=$version --target_arch=s390x
cp -r build/stage/* "${ARTIFACTS_OUT}"/
done
2 changes: 1 addition & 1 deletion tools/release/cross/Dockerfile
Expand Up @@ -2,7 +2,7 @@ FROM debian:stretch

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 python libc6-dev:i386 lib32stdc++-6-dev
RUN apt-get install -y curl build-essential g++-aarch64-linux-gnu g++-arm-linux-gnueabihf g++-s390x-linux-gnu python libc6-dev:i386 lib32stdc++-6-dev
RUN curl -fsSL get.docker.com | bash

RUN mkdir /usr/local/nvm
Expand Down