Add ARM Linux Node artifacts
diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py
index e3658ac..29eca92 100644
--- a/tools/run_tests/artifacts/artifact_targets.py
+++ b/tools/run_tests/artifacts/artifact_targets.py
@@ -279,11 +279,12 @@
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 @@
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 e5e3690..af0bed1 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 @@
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[@]}