Merge pull request #11457 from murgatroid99/node_arm_artifacts_1.4.x

Add ARM Linux Node artifacts
pull/11640/head
Michael Lumish 8 years ago committed by GitHub
commit 36e97de3f1
  1. 8
      tools/dockerfile/grpc_artifact_linux_x64/Dockerfile
  2. 5
      tools/run_tests/artifacts/artifact_targets.py
  3. 7
      tools/run_tests/artifacts/build_artifact_node.sh

@ -101,6 +101,14 @@ RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
php5 php5-dev php-pear phpunit php5 php5-dev php-pear phpunit
##################
# Install cross compiler for ARM
RUN echo 'deb http://emdebian.org/tools/debian/ jessie main' | tee -a /etc/apt/sources.list.d/crosstools.list && \
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
RUN dpkg --add-architecture armhf && apt-get update && apt-get install -y crossbuild-essential-armhf
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins
# Define the default command. # Define the default command.

@ -279,11 +279,12 @@ class NodeExtArtifact:
return create_docker_jobspec( return create_docker_jobspec(
self.name, self.name,
'tools/dockerfile/grpc_artifact_linux_{}'.format(self.arch), 'tools/dockerfile/grpc_artifact_linux_{}'.format(self.arch),
'tools/run_tests/artifacts/build_artifact_node.sh {}'.format(self.gyp_arch)) 'tools/run_tests/artifacts/build_artifact_node.sh {} {}'.format(
self.gyp_arch, self.platform))
else: else:
return create_jobspec(self.name, return create_jobspec(self.name,
['tools/run_tests/artifacts/build_artifact_node.sh', ['tools/run_tests/artifacts/build_artifact_node.sh',
self.gyp_arch], self.gyp_arch, self.platform],
use_workspace=True) use_workspace=True)
class PHPArtifact: class PHPArtifact:

@ -29,6 +29,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NODE_TARGET_ARCH=$1 NODE_TARGET_ARCH=$1
NODE_TARGET_OS=$2
source ~/.nvm/nvm.sh source ~/.nvm/nvm.sh
nvm use 4 nvm use 4
@ -50,6 +51,12 @@ for version in ${node_versions[@]}
do do
./node_modules/.bin/node-pre-gyp configure rebuild package --target=$version --target_arch=$NODE_TARGET_ARCH --grpc_alpine=true ./node_modules/.bin/node-pre-gyp configure rebuild package --target=$version --target_arch=$NODE_TARGET_ARCH --grpc_alpine=true
cp -r build/stage/* "${ARTIFACTS_OUT}"/ cp -r build/stage/* "${ARTIFACTS_OUT}"/
if [ "$NODE_TARGET_ARCH" == 'x64' ] && [ "$NODE_TARGET_OS" == 'linux' ]
then
# Cross compile for ARM on x64
CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ LD=arm-linux-gnueabihf-g++ ./node_modules/.bin/node-pre-gyp configure rebuild package testpackage --target=$version --target_arch=arm
cp -r build/stage/* "${ARTIFACTS_OUT}"/
fi
done done
for version in ${electron_versions[@]} for version in ${electron_versions[@]}

Loading…
Cancel
Save