From c8a1a09d6cb2bc7a02f320ab0751955a7bc80bf6 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Tue, 16 Feb 2021 09:09:26 -0600 Subject: [PATCH] [CI] Detect architecture when determining node download url Currently CI is setup to always download the x64 Node.js architecture. When runing builds on ARM machines we'll want to make sure the architecture matches the machine. --- src/dev/ci_setup/setup_env.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dev/ci_setup/setup_env.sh b/src/dev/ci_setup/setup_env.sh index 2deafaaf35a94..b9898960135fc 100644 --- a/src/dev/ci_setup/setup_env.sh +++ b/src/dev/ci_setup/setup_env.sh @@ -56,7 +56,13 @@ export WORKSPACE="${WORKSPACE:-$PARENT_DIR}" nodeVersion="$(cat "$dir/.node-version")" nodeDir="$cacheDir/node/$nodeVersion" nodeBin="$nodeDir/bin" -classifier="x64.tar.gz" +hostArch="$(command uname -m)" +case "${hostArch}" in + x86_64 | amd64) nodeArch="x64" ;; + aarch64) nodeArch="arm64" ;; + *) nodeArch="${hostArch}" ;; +esac +classifier="$nodeArch.tar.gz" UNAME=$(uname) OS="linux"