Install tidy for aarch64-apple-darwin

The GitHub Actions image has this preinstalled for x86_64 but not M1.
This commit is contained in:
Jake Goulding 2023-10-31 16:32:37 -04:00
parent 469d34b39b
commit 64090536d4
3 changed files with 37 additions and 0 deletions

View File

@ -106,6 +106,9 @@ jobs:
- name: install clang
run: src/ci/scripts/install-clang.sh
if: success() && !env.SKIP_JOB
- name: install tidy
run: src/ci/scripts/install-tidy.sh
if: success() && !env.SKIP_JOB
- name: install WIX
run: src/ci/scripts/install-wix.sh
if: success() && !env.SKIP_JOB
@ -483,6 +486,9 @@ jobs:
- name: install clang
run: src/ci/scripts/install-clang.sh
if: success() && !env.SKIP_JOB
- name: install tidy
run: src/ci/scripts/install-tidy.sh
if: success() && !env.SKIP_JOB
- name: install WIX
run: src/ci/scripts/install-wix.sh
if: success() && !env.SKIP_JOB
@ -607,6 +613,9 @@ jobs:
- name: install clang
run: src/ci/scripts/install-clang.sh
if: success() && !env.SKIP_JOB
- name: install tidy
run: src/ci/scripts/install-tidy.sh
if: success() && !env.SKIP_JOB
- name: install WIX
run: src/ci/scripts/install-wix.sh
if: success() && !env.SKIP_JOB

View File

@ -173,6 +173,10 @@ x--expand-yaml-anchors--remove:
run: src/ci/scripts/install-clang.sh
<<: *step
- name: install tidy
run: src/ci/scripts/install-tidy.sh
<<: *step
- name: install WIX
run: src/ci/scripts/install-wix.sh
<<: *step

24
src/ci/scripts/install-tidy.sh Executable file
View File

@ -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