Skip to content

Commit 4a81789

Browse files
Add Homebrew bin directory to path on GHA macOS workers (#41)
GCC is no longer installed in `/usr/local/bin` on the macOS 14 GitHub runners, which is what `macos-latest` now points to. Look for it in `/opt/homebrew/bin` instead. It's also becoming harder to maintain a `.plzconfig` that works on both macOS and Ubuntu runners at the same time, so have separate configurations for each platform and compiler.
1 parent 6c95eec commit 4a81789

5 files changed

+26
-6
lines changed

Diff for: .github/workflows/plugin.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ on:
44
- pull_request
55
jobs:
66
test:
7-
runs-on: ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}-latest
88
steps:
99
- name: Checkout code
1010
uses: actions/checkout@v2
1111
- name: Install nasm
12-
if: ${{ matrix.os == 'macos-latest' }}
12+
if: ${{ matrix.os == 'macos' }}
1313
run: brew install nasm
1414
- name: Run tests
15-
run: ./pleasew test -e e2e --profile ${{ matrix.compiler }} --log_file plz-out/log/test.log
15+
run: ./pleasew test -e e2e --profile gha_${{ matrix.os }}_${{ matrix.compiler }} --log_file plz-out/log/test.log
1616
- name: Run e2e test
17-
run: ./pleasew test -i e2e --profile ${{ matrix.compiler }} --log_file plz-out/log/e2e.log
17+
run: ./pleasew test -i e2e --profile gha_${{ matrix.os }}_${{ matrix.compiler }} --log_file plz-out/log/e2e.log
1818
- name: Archive logs
1919
if: always()
2020
uses: actions/upload-artifact@v4
@@ -25,8 +25,8 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os:
28-
- ubuntu-latest
29-
- macos-latest
28+
- ubuntu
29+
- macos
3030
compiler:
3131
- gcc
3232
- clang

Diff for: .plzconfig.gha_macos_clang

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[build]
2+
path = /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
3+
4+
[plugin "cc"]
5+
cctool = clang
6+
cpptool = clang++
7+
ldtool = lld
8+
defaultdbgcppflags = --std=c++1z -g3 -DDEBUG -Wall -Wextra -Werror -Wno-unused-parameter
9+
defaultoptcppflags = --std=c++1z -O2 -DNDEBUG -Wall -Wextra -Werror -Wno-unused-parameter
10+
clangmodules = true

Diff for: .plzconfig.gha_macos_gcc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[build]
2+
path = /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
3+
4+
[plugin "cc"]
5+
cctool = gcc-12
6+
cpptool = g++-12
7+
ldtool = gold
8+
defaultdbgcppflags = --std=c++1z -g3 -DDEBUG -Wall -Wextra -Werror -Wno-unused-parameter
9+
defaultoptcppflags = --std=c++1z -O2 -DNDEBUG -Wall -Wextra -Werror -Wno-unused-parameter
10+
clangmodules = false
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)