about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-21 18:41:33 +0000
committerbors <bors@rust-lang.org>2023-10-21 18:41:33 +0000
commit85812004e2211ffc12d36bb3805d203020eef616 (patch)
treece73abd5c92d0d0c578b1c9050a3bdcb83254ccc /src/ci/scripts
parent0d1664674a620f2c139be756a5cf7b1b057bc3a9 (diff)
parent821b03d767e7da7442c21fdc12bb4ac7d5606956 (diff)
downloadrust-85812004e2211ffc12d36bb3805d203020eef616.tar.gz
rust-85812004e2211ffc12d36bb3805d203020eef616.zip
Auto merge of #116368 - shepmaster:github-actions-m1, r=Mark-Simulacrum
Use GitHub Actions M1 builder for aarch64-apple-darwin

r? `@ghost`
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/install-awscli.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ci/scripts/install-awscli.sh b/src/ci/scripts/install-awscli.sh
new file mode 100755
index 00000000000..b4a239fd3bc
--- /dev/null
+++ b/src/ci/scripts/install-awscli.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+# This script downloads and installs the awscli binaries directly from
+# Amazon.
+
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
+
+AWS_VERSION="2.13.25"
+
+# Only the macOS arm64/aarch64 GitHub Actions runner needs to have AWS
+# installed; other platforms have it preinstalled.
+
+if isMacOS; then
+    platform=$(uname -m)
+    case $platform in
+        x86_64)
+            ;;
+        arm64)
+            file="https://awscli.amazonaws.com/AWSCLIV2-${AWS_VERSION}.pkg"
+            retry curl -f "${file}" -o "AWSCLIV2.pkg"
+            sudo installer -pkg "AWSCLIV2.pkg" -target /
+            ;;
+        *)
+            echo "unsupported architecture: ${platform}"
+            exit 1
+    esac
+fi