about summary refs log tree commit diff
path: root/src/ci/scripts/install-tidy.sh
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-08 22:40:10 +0000
committerbors <bors@rust-lang.org>2023-11-08 22:40:10 +0000
commit57fb1e643aa96da3c7024ff5a45859647f39ad5b (patch)
treeb010c436127293650f9c72d31f119d4b4d59357a /src/ci/scripts/install-tidy.sh
parentfdaaaf9f923281ab98b865259aa40fbf93d72c7a (diff)
parent6909992501b400c8cd7d75e8d61365b2c20015f9 (diff)
downloadrust-57fb1e643aa96da3c7024ff5a45859647f39ad5b.tar.gz
rust-57fb1e643aa96da3c7024ff5a45859647f39ad5b.zip
Auto merge of #117454 - shepmaster:github-actions-m1-tests, r=GuillaumeGomez,onur-ozkan
Run tests in CI for aarch64-apple-darwin

r? `@ghost`
Diffstat (limited to 'src/ci/scripts/install-tidy.sh')
-rwxr-xr-xsrc/ci/scripts/install-tidy.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ci/scripts/install-tidy.sh b/src/ci/scripts/install-tidy.sh
new file mode 100755
index 00000000000..fab126453fd
--- /dev/null
+++ b/src/ci/scripts/install-tidy.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# This script downloads and installs the tidy binary from Homebrew.
+
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
+
+# Only the macOS arm64/aarch64 GitHub Actions runner needs to have tidy
+# installed; other platforms have it preinstalled.
+
+if isMacOS; then
+    platform=$(uname -m)
+    case $platform in
+        x86_64)
+            ;;
+        arm64)
+            brew install tidy-html5
+            ;;
+        *)
+            echo "unsupported architecture: ${platform}"
+            exit 1
+    esac
+fi