Skip to content

Commit d34331b

Browse files
authored
Merge pull request #1249 from o1-labs/dw/test-macos
CI: Support multi-platform builds and standardize test execution on ubuntu-latest
2 parents 808144d + 8375e98 commit d34331b

File tree

4 files changed

+140
-48
lines changed

4 files changed

+140
-48
lines changed

.github/workflows/ci.yaml

Lines changed: 91 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717

1818
jobs:
1919
ledger-tests:
20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121
steps:
2222
- name: Git checkout
2323
uses: actions/checkout@v4
@@ -40,7 +40,7 @@ jobs:
4040
make test-ledger
4141
4242
ledger-32x9-tests:
43-
runs-on: ubuntu-22.04
43+
runs-on: ubuntu-24.04
4444
steps:
4545
- name: Git checkout
4646
uses: actions/checkout@v4
@@ -70,7 +70,7 @@ jobs:
7070
make test-ledger
7171
7272
vrf-tests:
73-
runs-on: ubuntu-22.04
73+
runs-on: ubuntu-24.04
7474
steps:
7575
- name: Git checkout
7676
uses: actions/checkout@v4
@@ -90,7 +90,7 @@ jobs:
9090
make test-vrf
9191
9292
p2p-tests:
93-
runs-on: ubuntu-22.04
93+
runs-on: ubuntu-24.04
9494
steps:
9595
- name: Git checkout
9696
uses: actions/checkout@v4
@@ -116,16 +116,27 @@ jobs:
116116
make test-p2p
117117
118118
build:
119-
runs-on: ubuntu-22.04
119+
# NOTE: If you add or remove platforms from this matrix, make sure to update
120+
# the documentation at website/docs/developers/getting-started.mdx
121+
strategy:
122+
matrix:
123+
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
124+
runs-on: ${{ matrix.os }}
120125
steps:
121126
- name: Git checkout
122127
uses: actions/checkout@v4
123128

124-
- name: Setup build dependencies
129+
- name: Setup build dependencies (Ubuntu)
130+
if: startsWith(matrix.os, 'ubuntu')
125131
run: |
126132
sudo apt update
127133
sudo apt install -y protobuf-compiler
128134
135+
- name: Setup build dependencies (macOS)
136+
if: startsWith(matrix.os, 'macos')
137+
run: |
138+
brew install protobuf
139+
129140
- name: Setup Rust
130141
uses: dtolnay/rust-toolchain@stable
131142
with:
@@ -142,53 +153,76 @@ jobs:
142153
make build-release
143154
144155
- name: Upload binaries
156+
if: matrix.os == 'ubuntu-22.04'
145157
uses: actions/upload-artifact@v4
146158
with:
147159
name: bin
148160
path: target/release/openmina
149161

150-
build_wasm:
151-
runs-on: ubuntu-22.04
152-
steps:
153-
- name: Git checkout
154-
uses: actions/checkout@v4
155-
156-
- name: Setup build dependencies
157-
run: |
158-
sudo apt update
159-
sudo apt install -y protobuf-compiler
160-
161-
- name: Setup Rust
162-
uses: dtolnay/rust-toolchain@stable
163-
with:
164-
components: rustfmt, rust-src
165-
toolchain: nightly
166-
167-
- name: Install wasm32 and wasm-bindgen-cli
168-
run: |
169-
rustup target add wasm32-unknown-unknown
170-
cargo install -f wasm-bindgen-cli --version 0.2.99
171-
172-
- name: Setup Rust Cache
173-
uses: Swatinem/rust-cache@v2
174-
with:
175-
prefix-key: "v0"
176-
177-
- name: Release build
178-
run: |
179-
make build-wasm
162+
build-wasm:
163+
# NOTE: If you add or remove platforms from this matrix, make sure to update
164+
# the documentation at website/docs/developers/getting-started.mdx
165+
strategy:
166+
matrix:
167+
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
168+
runs-on: ${{ matrix.os }}
169+
steps:
170+
- name: Git checkout
171+
uses: actions/checkout@v4
172+
173+
- name: Setup build dependencies (Ubuntu)
174+
if: startsWith(matrix.os, 'ubuntu')
175+
run: |
176+
sudo apt update
177+
sudo apt install -y protobuf-compiler
178+
179+
- name: Setup build dependencies (macOS)
180+
if: startsWith(matrix.os, 'macos')
181+
run: |
182+
brew install protobuf
183+
184+
- name: Setup Rust
185+
uses: dtolnay/rust-toolchain@stable
186+
with:
187+
components: rustfmt, rust-src
188+
toolchain: nightly
189+
190+
- name: Install wasm32 and wasm-bindgen-cli
191+
run: |
192+
rustup target add wasm32-unknown-unknown
193+
cargo install -f wasm-bindgen-cli --version 0.2.99
194+
195+
- name: Setup Rust Cache
196+
uses: Swatinem/rust-cache@v2
197+
with:
198+
prefix-key: "v0"
199+
200+
- name: Release build
201+
run: |
202+
make build-wasm
180203
181204
build-tests:
182-
runs-on: ubuntu-22.04
205+
# NOTE: If you add or remove platforms from this matrix, make sure to update
206+
# the documentation at website/docs/developers/getting-started.mdx
207+
strategy:
208+
matrix:
209+
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
210+
runs-on: ${{ matrix.os }}
183211
steps:
184212
- name: Git checkout
185213
uses: actions/checkout@v4
186214

187-
- name: Setup build dependencies
215+
- name: Setup build dependencies (Ubuntu)
216+
if: startsWith(matrix.os, 'ubuntu')
188217
run: |
189218
sudo apt update
190219
sudo apt install -y protobuf-compiler
191220
221+
- name: Setup build dependencies (macOS)
222+
if: startsWith(matrix.os, 'macos')
223+
run: |
224+
brew install protobuf
225+
192226
- name: Setup Rust
193227
uses: dtolnay/rust-toolchain@stable
194228
with:
@@ -210,22 +244,34 @@ jobs:
210244
while read NAME FILE; do cp -a $FILE target/release/tests/$NAME; done < tests.tsv
211245
212246
- name: Upload tests
247+
if: matrix.os == 'ubuntu-22.04'
213248
uses: actions/upload-artifact@v4
214249
with:
215250
name: tests
216251
path: target/release/tests
217252

218253
build-tests-webrtc:
219-
runs-on: ubuntu-22.04
254+
# NOTE: If you add or remove platforms from this matrix, make sure to update
255+
# the documentation at website/docs/developers/getting-started.mdx
256+
strategy:
257+
matrix:
258+
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
259+
runs-on: ${{ matrix.os }}
220260
steps:
221261
- name: Git checkout
222262
uses: actions/checkout@v4
223263

224-
- name: Setup build dependencies
264+
- name: Setup build dependencies (Ubuntu)
265+
if: startsWith(matrix.os, 'ubuntu')
225266
run: |
226267
sudo apt update
227268
sudo apt install -y protobuf-compiler
228269
270+
- name: Setup build dependencies (macOS)
271+
if: startsWith(matrix.os, 'macos')
272+
run: |
273+
brew install protobuf
274+
229275
- name: Setup Rust
230276
uses: dtolnay/rust-toolchain@stable
231277
with:
@@ -242,14 +288,15 @@ jobs:
242288
make build-tests-webrtc
243289
244290
- name: Upload tests
291+
if: matrix.os == 'ubuntu-22.04'
245292
uses: actions/upload-artifact@v4
246293
with:
247294
name: tests-webrtc
248295
path: target/release/tests
249296

250297
p2p-scenario-tests:
251298
needs: [ build-tests, build-tests-webrtc ]
252-
runs-on: ubuntu-22.04
299+
runs-on: ubuntu-24.04
253300
container:
254301
image: gcr.io/o1labs-192920/mina-daemon:3.2.0-beta1-978866c-bullseye-devnet
255302
options: --volume debugger_data:/tmp/db
@@ -312,7 +359,7 @@ jobs:
312359
needs:
313360
- build-tests
314361
- build-tests-webrtc
315-
runs-on: ubuntu-22.04
362+
runs-on: ubuntu-24.04
316363
container:
317364
image: gcr.io/o1labs-192920/mina-daemon:3.2.0-beta1-978866c-bullseye-devnet
318365
options: --volume debugger_data:/tmp/db
@@ -398,7 +445,7 @@ jobs:
398445
needs:
399446
- build-tests
400447
- build-tests-webrtc
401-
runs-on: ubuntu-22.04
448+
runs-on: ubuntu-24.04
402449
container:
403450
image: gcr.io/o1labs-192920/mina-daemon:3.2.0-beta1-978866c-bullseye-devnet
404451
env:
@@ -435,7 +482,7 @@ jobs:
435482
436483
bootstrap-test:
437484
needs: [ build, build-tests ]
438-
runs-on: ubuntu-22.04
485+
runs-on: ubuntu-24.04
439486
env:
440487
OPENMINA_HOME: data
441488
BPF_ALIAS: /coda/0.0.1/29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6-0.0.0.0

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4343

4444
### Changed
4545

46+
- **CI**: Generalized build jobs to support multiple platforms (Ubuntu 22.04,
47+
Ubuntu 24.04, Ubuntu 24.04 ARM, macOS latest), updated test execution to
48+
ubuntu-latest, and fixed GLIBC compatibility for scenario tests by using
49+
Ubuntu 22.04 for test binary artifacts to ensure compatibility with Debian
50+
Bullseye container environment ([#1249](https://github.com/o1-labs/openmina/pull/1249))
4651
- **Build System**: Enhanced Makefile with documentation-related targets and comprehensive formatting commands ([#1234](https://github.com/o1-labs/openmina/pull/1234))
4752
### Fixed
4853

CLAUDE.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,43 @@ encountering broken installation instructions.
267267
The tests are designed to run on-demand via labels to avoid slowing down regular
268268
development workflow, as they can take significant time to complete.
269269

270+
### CHANGELOG Guidelines
271+
272+
When making significant changes that affect users or developers, update the
273+
CHANGELOG.md file:
274+
275+
#### CHANGELOG Structure
276+
277+
The CHANGELOG follows [Keep a Changelog](https://keepachangelog.com/) format
278+
with these sections under `## [Unreleased]`:
279+
280+
- **OCaml node** - Changes related to OCaml node compatibility
281+
- **Added** - New features and functionality
282+
- **Changed** - Changes to existing functionality
283+
- **Fixed** - Bug fixes
284+
- **Dependencies** - Dependency updates
285+
286+
#### Entry Format
287+
288+
- Use this format: `- **Category**: Description ([#PR](github-link))`
289+
- Wrap entries at 80 characters with proper indentation
290+
- Categories include: CI, Build System, Documentation, Development Tools, etc.
291+
- Always reference the PR number
292+
293+
#### CHANGELOG Commit Pattern
294+
295+
- Commit message: `CHANGELOG: add entry for patch XXXX`
296+
- Where XXXX is the PR number
297+
- Keep the commit message simple and consistent with existing pattern
298+
299+
Example entry:
300+
301+
```markdown
302+
- **CI**: Generalized build jobs to support multiple platforms (Ubuntu 22.04,
303+
Ubuntu 24.04, Ubuntu 24.04 ARM, macOS latest) and updated test execution to
304+
ubuntu-latest ([#1249](https://github.com/o1-labs/openmina/pull/1249))
305+
```
306+
270307
### Critical Pre-Commit Requirements
271308

272309
- **MANDATORY**: Run `make fix-trailing-whitespace` before every commit

website/docs/developers/getting-started.mdx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ development environment and build OpenMina from source.
2626

2727
### System Requirements
2828

29-
- **Operating System**:
30-
- **Linux**: Ubuntu 20.04+ or Debian 11+ (other Linux distributions may work
31-
but are not officially supported)
32-
- **macOS**: macOS 12.0+ (Monterey or later)
29+
- **Operating System**: Officially supported platforms (build tested in CI):
30+
- Ubuntu 22.04 LTS
31+
- Ubuntu 24.04 LTS (x86_64 and ARM64)
32+
- macOS (latest)
33+
- Other Linux distributions may work but are not officially supported
34+
- Note: While we test compilation on all platforms, the full test suite is
35+
only run on ubuntu-22.04 (for GLIBC compatibility with container tests)
3336
- **Memory**: At least 8GB RAM (16GB recommended)
3437
- **Storage**: At least 20GB free space
3538
- **Network**: Stable internet connection for downloading dependencies

0 commit comments

Comments
 (0)