summary refs log tree commit diff
path: root/src/ci/scripts/install-rust.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/ci/scripts/install-rust.sh')
-rwxr-xr-xsrc/ci/scripts/install-rust.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ci/scripts/install-rust.sh b/src/ci/scripts/install-rust.sh
new file mode 100755
index 00000000000..e4aee98c9fb
--- /dev/null
+++ b/src/ci/scripts/install-rust.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# The Arm64 Windows Runner does not have Rust already installed
+# https://github.com/actions/partner-runner-images/issues/77
+
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
+
+if [[ "${CI_JOB_NAME}" = *aarch64* ]] && isWindows; then
+    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
+    sh -s -- -y -q --default-host aarch64-pc-windows-msvc
+    ciCommandAddPath "${USERPROFILE}/.cargo/bin"
+fi