Skip to content

Commit 662c1b2

Browse files
ci: add basic macos CI test
1 parent 112b3b0 commit 662c1b2

1 file changed

Lines changed: 53 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
go-version: ['1.24.x', '1.25.x']
25+
go-version: ["1.24.x", "1.25.x"]
2626
env:
2727
# Needed for the quic-go test
2828
GOEXPERIMENT: ${{ matrix.go-version == '1.24.x' && 'synctest' || '' }}
@@ -47,7 +47,14 @@ jobs:
4747
runs-on: codspeed-macro
4848
strategy:
4949
matrix:
50-
target: [example, example/compat, example/timing, example/very/nested/module, example/external]
50+
target:
51+
[
52+
example,
53+
example/compat,
54+
example/timing,
55+
example/very/nested/module,
56+
example/external,
57+
]
5158
steps:
5259
- uses: actions/checkout@v4
5360
with:
@@ -66,6 +73,48 @@ jobs:
6673
working-directory: example
6774
run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=. ${{ matrix.target }}
6875

76+
example-macos:
77+
runs-on: macos-latest
78+
steps:
79+
- uses: actions/checkout@v4
80+
with:
81+
submodules: true
82+
- uses: actions/setup-go@v6
83+
with:
84+
go-version: '1.25.x'
85+
- uses: moonrepo/setup-rust@v1
86+
with:
87+
cache-target: release
88+
89+
- name: Run the benchmarks
90+
run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=. example -benchtime=500ms
91+
working-directory: example
92+
env:
93+
CODSPEED_GO_PKG_VERSION: ${{ github.head_ref || github.ref_name }}
94+
95+
walltime-macos-test:
96+
runs-on: macos-latest
97+
steps:
98+
- uses: actions/checkout@v4
99+
with:
100+
submodules: true
101+
- uses: actions/setup-go@v6
102+
with:
103+
go-version: "1.25.x"
104+
- uses: ./.github/actions/rust-install
105+
- run: cargo build --release
106+
107+
- name: Run the benchmarks
108+
uses: CodSpeedHQ/action@main
109+
env:
110+
CODSPEED_SKIP_UPLOAD: "true"
111+
with:
112+
run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=. example -benchtime=500ms
113+
working-directory: example
114+
mode: walltime
115+
# TODO: Remove this once the runner has been released with macos support
116+
runner-version: branch:main
117+
69118
go-runner-benchmarks:
70119
runs-on: codspeed-macro
71120
steps:
@@ -82,7 +131,7 @@ jobs:
82131

83132
- uses: actions/setup-go@v5
84133
with:
85-
go-version: '1.25'
134+
go-version: "1.25"
86135

87136
- name: Build the benchmark target(s)
88137
run: cargo codspeed build -m walltime
@@ -100,6 +149,7 @@ jobs:
100149
- lint
101150
- tests
102151
- compat-integration-test-walltime
152+
- example-macos
103153
- go-runner-benchmarks
104154
steps:
105155
- uses: re-actors/alls-green@release/v1

0 commit comments

Comments
 (0)