Skip to content

Commit

Permalink
Merge pull request #1230 from linux-on-ibm-z/grpc-node_s390x
Browse files Browse the repository at this point in the history
Prebuilt binaries for s390x
  • Loading branch information
murgatroid99 committed Jan 24, 2020
2 parents 7d2a5f3 + 43d7bc7 commit 4421ff6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
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

0 comments on commit 4421ff6

Please sign in to comment.