Skip to content

Commit

Permalink
[CI] Detect architecture when determining node download url (#91497)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jbudz committed Feb 16, 2021
1 parent 1fb387e commit 1bfdc14
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dev/ci_setup/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1bfdc14

Please sign in to comment.