Skip to content

Commit

Permalink
Install awscli on the aarch64-apple-darwin builder
Browse files Browse the repository at this point in the history
Unlike the other builders, this one doesn't come with it preinstalled.
  • Loading branch information
shepmaster committed Oct 9, 2023
1 parent cdddcd3 commit 2bf3004
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ jobs:
- name: show the current environment
run: src/ci/scripts/dump-environment.sh
if: success() && !env.SKIP_JOB
- name: install awscli
run: src/ci/scripts/install-awscli.sh
if: success() && !env.SKIP_JOB
- name: install sccache
run: src/ci/scripts/install-sccache.sh
if: success() && !env.SKIP_JOB
Expand Down Expand Up @@ -458,6 +461,9 @@ jobs:
- name: show the current environment
run: src/ci/scripts/dump-environment.sh
if: success() && !env.SKIP_JOB
- name: install awscli
run: src/ci/scripts/install-awscli.sh
if: success() && !env.SKIP_JOB
- name: install sccache
run: src/ci/scripts/install-sccache.sh
if: success() && !env.SKIP_JOB
Expand Down Expand Up @@ -578,6 +584,9 @@ jobs:
- name: show the current environment
run: src/ci/scripts/dump-environment.sh
if: success() && !env.SKIP_JOB
- name: install awscli
run: src/ci/scripts/install-awscli.sh
if: success() && !env.SKIP_JOB
- name: install sccache
run: src/ci/scripts/install-sccache.sh
if: success() && !env.SKIP_JOB
Expand Down
4 changes: 4 additions & 0 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ x--expand-yaml-anchors--remove:
run: src/ci/scripts/dump-environment.sh
<<: *step

- name: install awscli
run: src/ci/scripts/install-awscli.sh
<<: *step

- name: install sccache
run: src/ci/scripts/install-sccache.sh
<<: *step
Expand Down
29 changes: 29 additions & 0 deletions src/ci/scripts/install-awscli.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2bf3004

Please sign in to comment.