Skip to content

Commit c6b4a33

Browse files
committed
[TODO] Install tidy for macOS
1 parent 76b5e04 commit c6b4a33

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,9 @@ jobs:
482482
- name: install clang
483483
run: src/ci/scripts/install-clang.sh
484484
if: success() && !env.SKIP_JOB
485+
- name: install tidy
486+
run: src/ci/scripts/install-tidy.sh
487+
if: success() && !env.SKIP_JOB
485488
- name: install WIX
486489
run: src/ci/scripts/install-wix.sh
487490
if: success() && !env.SKIP_JOB
@@ -606,6 +609,9 @@ jobs:
606609
- name: install clang
607610
run: src/ci/scripts/install-clang.sh
608611
if: success() && !env.SKIP_JOB
612+
- name: install tidy
613+
run: src/ci/scripts/install-tidy.sh
614+
if: success() && !env.SKIP_JOB
609615
- name: install WIX
610616
run: src/ci/scripts/install-wix.sh
611617
if: success() && !env.SKIP_JOB

src/ci/github-actions/ci.yml

Lines changed: 4 additions & 0 deletions
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

Lines changed: 24 additions & 0 deletions
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)