Skip to content

Commit 2bf3004

Browse files
committed
Install awscli on the aarch64-apple-darwin builder
Unlike the other builders, this one doesn't come with it preinstalled.
1 parent cdddcd3 commit 2bf3004

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.github/workflows/ci.yml

+9
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ jobs:
9393
- name: show the current environment
9494
run: src/ci/scripts/dump-environment.sh
9595
if: success() && !env.SKIP_JOB
96+
- name: install awscli
97+
run: src/ci/scripts/install-awscli.sh
98+
if: success() && !env.SKIP_JOB
9699
- name: install sccache
97100
run: src/ci/scripts/install-sccache.sh
98101
if: success() && !env.SKIP_JOB
@@ -458,6 +461,9 @@ jobs:
458461
- name: show the current environment
459462
run: src/ci/scripts/dump-environment.sh
460463
if: success() && !env.SKIP_JOB
464+
- name: install awscli
465+
run: src/ci/scripts/install-awscli.sh
466+
if: success() && !env.SKIP_JOB
461467
- name: install sccache
462468
run: src/ci/scripts/install-sccache.sh
463469
if: success() && !env.SKIP_JOB
@@ -578,6 +584,9 @@ jobs:
578584
- name: show the current environment
579585
run: src/ci/scripts/dump-environment.sh
580586
if: success() && !env.SKIP_JOB
587+
- name: install awscli
588+
run: src/ci/scripts/install-awscli.sh
589+
if: success() && !env.SKIP_JOB
581590
- name: install sccache
582591
run: src/ci/scripts/install-sccache.sh
583592
if: success() && !env.SKIP_JOB

src/ci/github-actions/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ x--expand-yaml-anchors--remove:
153153
run: src/ci/scripts/dump-environment.sh
154154
<<: *step
155155

156+
- name: install awscli
157+
run: src/ci/scripts/install-awscli.sh
158+
<<: *step
159+
156160
- name: install sccache
157161
run: src/ci/scripts/install-sccache.sh
158162
<<: *step

src/ci/scripts/install-awscli.sh

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# This script downloads and installs the awscli binaries directly from
3+
# Amazon.
4+
5+
set -euo pipefail
6+
IFS=$'\n\t'
7+
8+
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
9+
10+
AWS_VERSION="2.13.25"
11+
12+
# Only the macOS arm64/aarch64 GitHub Actions runner needs to have AWS
13+
# installed; other platforms have it preinstalled.
14+
15+
if isMacOS; then
16+
platform=$(uname -m)
17+
case $platform in
18+
x86_64)
19+
;;
20+
arm64)
21+
file="https://awscli.amazonaws.com/AWSCLIV2-${AWS_VERSION}.pkg"
22+
retry curl -f "${file}" -o "AWSCLIV2.pkg"
23+
sudo installer -pkg "AWSCLIV2.pkg" -target /
24+
;;
25+
*)
26+
echo "unsupported architecture: ${platform}"
27+
exit 1
28+
esac
29+
fi

0 commit comments

Comments
 (0)