aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tools/dockerfile/grpc_artifact_linux_x64/Dockerfile8
-rw-r--r--tools/run_tests/artifacts/artifact_targets.py7
-rwxr-xr-xtools/run_tests/artifacts/build_artifact_node.sh7
3 files changed, 19 insertions, 3 deletions
diff --git a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile
index 3479944717..c3590f5e5d 100644
--- a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile
+++ b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile
@@ -101,6 +101,14 @@ RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
RUN apt-get update && apt-get install -y \
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
# Define the default command.
diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py
index e3658acbf6..29eca92a34 100644
--- a/tools/run_tests/artifacts/artifact_targets.py
+++ b/tools/run_tests/artifacts/artifact_targets.py
@@ -279,11 +279,12 @@ class NodeExtArtifact:
return create_docker_jobspec(
self.name,
'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:
return create_jobspec(self.name,
['tools/run_tests/artifacts/build_artifact_node.sh',
- self.gyp_arch],
+ self.gyp_arch, self.platform],
use_workspace=True)
class PHPArtifact:
@@ -343,7 +344,7 @@ class ProtocArtifact:
environ=environ,
use_workspace=True)
else:
- generator = 'Visual Studio 12 Win64' if self.arch == 'x64' else 'Visual Studio 12'
+ generator = 'Visual Studio 12 Win64' if self.arch == 'x64' else 'Visual Studio 12'
vcplatform = 'x64' if self.arch == 'x64' else 'Win32'
return create_jobspec(self.name,
['tools\\run_tests\\artifacts\\build_artifact_protoc.bat'],
diff --git a/tools/run_tests/artifacts/build_artifact_node.sh b/tools/run_tests/artifacts/build_artifact_node.sh
index e5e36903eb..af0bed1fe2 100755
--- a/tools/run_tests/artifacts/build_artifact_node.sh
+++ b/tools/run_tests/artifacts/build_artifact_node.sh
@@ -29,6 +29,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NODE_TARGET_ARCH=$1
+NODE_TARGET_OS=$2
source ~/.nvm/nvm.sh
nvm use 4
@@ -50,6 +51,12 @@ for version in ${node_versions[@]}
do
./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}"/
+ 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
for version in ${electron_versions[@]}