mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
dc633e22a3
macOS runners lack GNU toolchain dependencies (bash 4+, GNU getopt, make
4+) required by `scripts/lib.sh`. When any script sources `lib.sh`, it
checks for these dependencies and fails if they're missing.
This caused consistent failures in the `test-go-pg (macos-latest)` job
in `nightly-gauntlet.yaml`, which didn't have the GNU tools setup that
`ci.yaml` had. Commit 9a417df ("ci: add retry logic for Go module
operations") added a macOS GNU tools step to `ci.yaml`, but
`nightly-gauntlet.yaml` was not updated.
This PR adds a reusable `setup-gnu-tools` action and uses it
consistently across all workflows with macOS jobs, replacing the inline
brew install steps.
Closes https://github.com/coder/internal/issues/1133
19 lines
581 B
YAML
19 lines
581 B
YAML
name: "Setup GNU tools (macOS)"
|
|
description: |
|
|
Installs GNU versions of bash, getopt, and make on macOS runners.
|
|
Required because lib.sh needs bash 4+, GNU getopt, and make 4+.
|
|
This is a no-op on non-macOS runners.
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Setup GNU tools (macOS)
|
|
if: runner.os == 'macOS'
|
|
shell: bash
|
|
run: |
|
|
brew install bash gnu-getopt make
|
|
{
|
|
echo "$(brew --prefix bash)/bin"
|
|
echo "$(brew --prefix gnu-getopt)/bin"
|
|
echo "$(brew --prefix make)/libexec/gnubin"
|
|
} >> "$GITHUB_PATH"
|