Skip to content

Commit

Permalink
Merge pull request #595 from rgoldberg/594-github-runners-macos-15
Browse files Browse the repository at this point in the history
Improve GitHub runners
  • Loading branch information
rgoldberg authored Oct 24, 2024
2 parents bb67ea5 + cab684b commit 6b27d51
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
# https://github.com/mas-cli/mas/actions/runners
runs-on: macos-14
runs-on: macos-15

steps:
# https://github.com/actions/checkout#usage
Expand Down
6 changes: 2 additions & 4 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ brew "swift-format"
brew "swiftformat"
brew "trash"

# Already installed on GitHub Actions runner.
# brew "swiftlint"

tap "peripheryapp/periphery"
if OS.mac? && MacOS.version >= :ventura
brew "swiftlint"
tap "peripheryapp/periphery"
cask "periphery"
end
5 changes: 0 additions & 5 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,3 @@ printf $'==> πŸ‘’ Bootstrapping (%s)\n' "$(script/version)"
# Install Homebrew tools
rm -f Brewfile.lock.json
brew bundle install --no-upgrade --verbose

# swiftlint is already installed on GitHub Actions runners.
if [[ ! -x "$(command -v swiftlint)" ]]; then
brew install swiftlint
fi
10 changes: 5 additions & 5 deletions script/lint
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ done

exit_code=0
for source in Package.swift Sources Tests; do
printf -- $'--> πŸ•Š %s swift-format\n' "${source}"
printf -- $'--> πŸ¦… %s swift-format\n' "${source}"
swift-format lint --strict --recursive "${source}"
((exit_code |= "${?}"))
printf -- $'--> πŸ•Š %s swiftformat\n' "${source}"
printf -- $'--> πŸ¦… %s swiftformat\n' "${source}"
script -q /dev/null swiftformat --lint --strict "${source}" |
(grep -vxE $'Running SwiftFormat\\.\\.\\.\r|\\(lint mode - no files will be changed\\.\\)\r|Reading (?:config|swift-version) file at .*|\033\[32mSwiftFormat completed in \\d+\\.\\d+s\\.\033\\[0m\r|0/\\d+ files require formatting\\.\r' || true)
(grep -vxE '(?:\^D\x08{2})?Running SwiftFormat\.{3}\r|\(lint mode - no files will be changed\.\)\r|Reading (?:config|swift-version) file at .*|\x1b\[32mSwiftFormat completed in \d+\.\d+s\.\x1b\[0m\r|0/\d+ files require formatting\.\r' || true)
((exit_code |= "${?}"))
printf -- $'--> πŸ•Š %s swiftlint\n' "${source}"
printf -- $'--> πŸ¦… %s swiftlint\n' "${source}"
swiftlint --strict --quiet "${source}" 2> \
>((grep -vxF $'warning: Configuration option \'allow_multiline_func\' in \'opening_brace\' rule is deprecated. Use the option \'ignore_multiline_function_signatures\' instead.' || true) >&2)
((exit_code |= "${?}"))
Expand Down Expand Up @@ -66,7 +66,7 @@ PAGER='cat' git diff --check

printf -- $'--> πŸŒ€ Periphery\n'
script -q /dev/null periphery scan --strict --quiet --disable-update-check |
(grep -vxF $'\033[0;1;32m* \033[0;0m\033[0;1mNo unused code detected.\033[0;0m\r\n' || true)
(grep -vxE '(?:\x1b\[0;1;32m|\^D\x08{2})\* (?:\x1b\[0;0m\x1b\[0;1m)?No unused code detected\.(?:\x1b\[0;0m)?\r' || true)
((exit_code |= "${?}"))

exit "${exit_code}"

0 comments on commit 6b27d51

Please sign in to comment.