Skip to content

Commit 6409053

Browse files
committed
Install tidy for aarch64-apple-darwin
The GitHub Actions image has this preinstalled for x86_64 but not M1.
1 parent 469d34b commit 6409053

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.github/workflows/ci.yml

+9
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ jobs:
106106
- name: install clang
107107
run: src/ci/scripts/install-clang.sh
108108
if: success() && !env.SKIP_JOB
109+
- name: install tidy
110+
run: src/ci/scripts/install-tidy.sh
111+
if: success() && !env.SKIP_JOB
109112
- name: install WIX
110113
run: src/ci/scripts/install-wix.sh
111114
if: success() && !env.SKIP_JOB
@@ -483,6 +486,9 @@ jobs:
483486
- name: install clang
484487
run: src/ci/scripts/install-clang.sh
485488
if: success() && !env.SKIP_JOB
489+
- name: install tidy
490+
run: src/ci/scripts/install-tidy.sh
491+
if: success() && !env.SKIP_JOB
486492
- name: install WIX
487493
run: src/ci/scripts/install-wix.sh
488494
if: success() && !env.SKIP_JOB
@@ -607,6 +613,9 @@ jobs:
607613
- name: install clang
608614
run: src/ci/scripts/install-clang.sh
609615
if: success() && !env.SKIP_JOB
616+
- name: install tidy
617+
run: src/ci/scripts/install-tidy.sh
618+
if: success() && !env.SKIP_JOB
610619
- name: install WIX
611620
run: src/ci/scripts/install-wix.sh
612621
if: success() && !env.SKIP_JOB

src/ci/github-actions/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ x--expand-yaml-anchors--remove:
173173
run: src/ci/scripts/install-clang.sh
174174
<<: *step
175175

176+
- name: install tidy
177+
run: src/ci/scripts/install-tidy.sh
178+
<<: *step
179+
176180
- name: install WIX
177181
run: src/ci/scripts/install-wix.sh
178182
<<: *step

src/ci/scripts/install-tidy.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
# This script downloads and installs the tidy binary from Homebrew.
3+
4+
set -euo pipefail
5+
IFS=$'\n\t'
6+
7+
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
8+
9+
# Only the macOS arm64/aarch64 GitHub Actions runner needs to have tidy
10+
# installed; other platforms have it preinstalled.
11+
12+
if isMacOS; then
13+
platform=$(uname -m)
14+
case $platform in
15+
x86_64)
16+
;;
17+
arm64)
18+
brew install tidy-html5
19+
;;
20+
*)
21+
echo "unsupported architecture: ${platform}"
22+
exit 1
23+
esac
24+
fi

0 commit comments

Comments
 (0)