Skip to content

Commit

Permalink
Install tidy for aarch64-apple-darwin
Browse files Browse the repository at this point in the history
The GitHub Actions image has this preinstalled for x86_64 but not M1.
  • Loading branch information
shepmaster committed Nov 8, 2023
1 parent 469d34b commit 6409053
Show file tree
Hide file tree
Showing 3 changed files with 37 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 @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
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 @@ -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
Expand Down
24 changes: 24 additions & 0 deletions src/ci/scripts/install-tidy.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6409053

Please sign in to comment.