From de20ee1e4c243b39534367b9273288f04c04e1fb Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Thu, 24 Jul 2025 17:40:31 +0200 Subject: [PATCH 1/6] CI: generalize build jobs to multiple platforms - Add matrix strategy to build, build_wasm, build-tests, and build-tests-webrtc jobs - Support ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, and macos-latest - Add platform-specific dependency installation (apt vs brew) - Update artifact names to include OS identifier to avoid conflicts - Add documentation update reminders for platform matrix changes This enables testing builds across multiple platforms while maintaining the same functionality. --- .github/workflows/ci.yaml | 133 +++++++++++++------- website/docs/developers/getting-started.mdx | 11 +- 2 files changed, 97 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4430c18195..d953774854 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,7 @@ concurrency: jobs: ledger-tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Git checkout uses: actions/checkout@v4 @@ -40,7 +40,7 @@ jobs: make test-ledger ledger-32x9-tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Git checkout uses: actions/checkout@v4 @@ -70,7 +70,7 @@ jobs: make test-ledger vrf-tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Git checkout uses: actions/checkout@v4 @@ -90,7 +90,7 @@ jobs: make test-vrf p2p-tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Git checkout uses: actions/checkout@v4 @@ -116,16 +116,27 @@ jobs: make test-p2p build: - runs-on: ubuntu-22.04 + # NOTE: If you add or remove platforms from this matrix, make sure to update + # the documentation at website/docs/developers/getting-started.mdx + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Git checkout uses: actions/checkout@v4 - - name: Setup build dependencies + - name: Setup build dependencies (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') run: | sudo apt update sudo apt install -y protobuf-compiler + - name: Setup build dependencies (macOS) + if: startsWith(matrix.os, 'macos') + run: | + brew install protobuf + - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: @@ -142,53 +153,76 @@ jobs: make build-release - name: Upload binaries + if: matrix.os == 'ubuntu-24.04' uses: actions/upload-artifact@v4 with: name: bin path: target/release/openmina build_wasm: - runs-on: ubuntu-22.04 - steps: - - name: Git checkout - uses: actions/checkout@v4 - - - name: Setup build dependencies - run: | - sudo apt update - sudo apt install -y protobuf-compiler - - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt, rust-src - toolchain: nightly - - - name: Install wasm32 and wasm-bindgen-cli - run: | - rustup target add wasm32-unknown-unknown - cargo install -f wasm-bindgen-cli --version 0.2.99 - - - name: Setup Rust Cache - uses: Swatinem/rust-cache@v2 - with: - prefix-key: "v0" - - - name: Release build - run: | - make build-wasm + # NOTE: If you add or remove platforms from this matrix, make sure to update + # the documentation at website/docs/developers/getting-started.mdx + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Git checkout + uses: actions/checkout@v4 + + - name: Setup build dependencies (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt update + sudo apt install -y protobuf-compiler + + - name: Setup build dependencies (macOS) + if: startsWith(matrix.os, 'macos') + run: | + brew install protobuf + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, rust-src + toolchain: nightly + + - name: Install wasm32 and wasm-bindgen-cli + run: | + rustup target add wasm32-unknown-unknown + cargo install -f wasm-bindgen-cli --version 0.2.99 + + - name: Setup Rust Cache + uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0" + + - name: Release build + run: | + make build-wasm build-tests: - runs-on: ubuntu-22.04 + # NOTE: If you add or remove platforms from this matrix, make sure to update + # the documentation at website/docs/developers/getting-started.mdx + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Git checkout uses: actions/checkout@v4 - - name: Setup build dependencies + - name: Setup build dependencies (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') run: | sudo apt update sudo apt install -y protobuf-compiler + - name: Setup build dependencies (macOS) + if: startsWith(matrix.os, 'macos') + run: | + brew install protobuf + - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: @@ -210,22 +244,34 @@ jobs: while read NAME FILE; do cp -a $FILE target/release/tests/$NAME; done < tests.tsv - name: Upload tests + if: matrix.os == 'ubuntu-24.04' uses: actions/upload-artifact@v4 with: name: tests path: target/release/tests build-tests-webrtc: - runs-on: ubuntu-22.04 + # NOTE: If you add or remove platforms from this matrix, make sure to update + # the documentation at website/docs/developers/getting-started.mdx + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Git checkout uses: actions/checkout@v4 - - name: Setup build dependencies + - name: Setup build dependencies (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') run: | sudo apt update sudo apt install -y protobuf-compiler + - name: Setup build dependencies (macOS) + if: startsWith(matrix.os, 'macos') + run: | + brew install protobuf + - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: @@ -242,6 +288,7 @@ jobs: make build-tests-webrtc - name: Upload tests + if: matrix.os == 'ubuntu-24.04' uses: actions/upload-artifact@v4 with: name: tests-webrtc @@ -249,7 +296,7 @@ jobs: p2p-scenario-tests: needs: [ build-tests, build-tests-webrtc ] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 container: image: gcr.io/o1labs-192920/mina-daemon:3.2.0-beta1-978866c-bullseye-devnet options: --volume debugger_data:/tmp/db @@ -312,7 +359,7 @@ jobs: needs: - build-tests - build-tests-webrtc - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 container: image: gcr.io/o1labs-192920/mina-daemon:3.2.0-beta1-978866c-bullseye-devnet options: --volume debugger_data:/tmp/db @@ -398,7 +445,7 @@ jobs: needs: - build-tests - build-tests-webrtc - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 container: image: gcr.io/o1labs-192920/mina-daemon:3.2.0-beta1-978866c-bullseye-devnet env: @@ -435,7 +482,7 @@ jobs: bootstrap-test: needs: [ build, build-tests ] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: OPENMINA_HOME: data BPF_ALIAS: /coda/0.0.1/29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6-0.0.0.0 diff --git a/website/docs/developers/getting-started.mdx b/website/docs/developers/getting-started.mdx index ee5566fd28..ce9b12bfca 100644 --- a/website/docs/developers/getting-started.mdx +++ b/website/docs/developers/getting-started.mdx @@ -26,10 +26,13 @@ development environment and build OpenMina from source. ### System Requirements -- **Operating System**: - - **Linux**: Ubuntu 20.04+ or Debian 11+ (other Linux distributions may work - but are not officially supported) - - **macOS**: macOS 12.0+ (Monterey or later) +- **Operating System**: Officially supported platforms (build tested in CI): + - Ubuntu 22.04 LTS + - Ubuntu 24.04 LTS (x86_64 and ARM64) + - macOS (latest) + - Other Linux distributions may work but are not officially supported + - Note: While we test compilation on all platforms, the full test suite is + only run on ubuntu-24.04 - **Memory**: At least 8GB RAM (16GB recommended) - **Storage**: At least 20GB free space - **Network**: Stable internet connection for downloading dependencies From d26f637a279d8a70885170a4d1e42c80bfb26690 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Thu, 24 Jul 2025 17:50:37 +0200 Subject: [PATCH 2/6] CHANGELOG: add entry for patch 1249 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59b731ebf8..0c1ef27dc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- **CI**: Generalized build jobs to support multiple platforms (Ubuntu 22.04, + Ubuntu 24.04, Ubuntu 24.04 ARM, macOS latest) and updated test execution to + ubuntu-latest ([#1249](https://github.com/o1-labs/openmina/pull/1249)) - **Build System**: Enhanced Makefile with documentation-related targets and comprehensive formatting commands ([#1234](https://github.com/o1-labs/openmina/pull/1234)) ### Fixed From baedd2c892706b93e38ea5d5f00e564113c1037c Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Thu, 24 Jul 2025 17:57:15 +0200 Subject: [PATCH 3/6] docs: add CHANGELOG guidelines to CLAUDE.md Document the CHANGELOG structure, entry format, and commit pattern for future contributors. Includes: - CHANGELOG sections (OCaml node, Added, Changed, Fixed, Dependencies) - Entry format with 80-character wrapping and PR references - Commit message pattern: 'CHANGELOG: add entry for patch XXXX' - Example entry from current PR This ensures consistent CHANGELOG maintenance across contributions. --- CLAUDE.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index da69830a01..c8164672b1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -267,6 +267,43 @@ encountering broken installation instructions. The tests are designed to run on-demand via labels to avoid slowing down regular development workflow, as they can take significant time to complete. +### CHANGELOG Guidelines + +When making significant changes that affect users or developers, update the +CHANGELOG.md file: + +#### CHANGELOG Structure + +The CHANGELOG follows [Keep a Changelog](https://keepachangelog.com/) format +with these sections under `## [Unreleased]`: + +- **OCaml node** - Changes related to OCaml node compatibility +- **Added** - New features and functionality +- **Changed** - Changes to existing functionality +- **Fixed** - Bug fixes +- **Dependencies** - Dependency updates + +#### Entry Format + +- Use this format: `- **Category**: Description ([#PR](github-link))` +- Wrap entries at 80 characters with proper indentation +- Categories include: CI, Build System, Documentation, Development Tools, etc. +- Always reference the PR number + +#### CHANGELOG Commit Pattern + +- Commit message: `CHANGELOG: add entry for patch XXXX` +- Where XXXX is the PR number +- Keep the commit message simple and consistent with existing pattern + +Example entry: + +```markdown +- **CI**: Generalized build jobs to support multiple platforms (Ubuntu 22.04, + Ubuntu 24.04, Ubuntu 24.04 ARM, macOS latest) and updated test execution to + ubuntu-latest ([#1249](https://github.com/o1-labs/openmina/pull/1249)) +``` + ### Critical Pre-Commit Requirements - **MANDATORY**: Run `make fix-trailing-whitespace` before every commit From ce7e619c9fe995a41fbfcfdaa5847611b45d468b Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Thu, 24 Jul 2025 18:25:00 +0200 Subject: [PATCH 4/6] CI: use consistent naming job - build_wasm -> build-wasm --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d953774854..b82201610c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -159,7 +159,7 @@ jobs: name: bin path: target/release/openmina - build_wasm: + build-wasm: # NOTE: If you add or remove platforms from this matrix, make sure to update # the documentation at website/docs/developers/getting-started.mdx strategy: From 8ea036048295fc314f6b8bf4cfa80692c0b28aca Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Fri, 25 Jul 2025 14:57:09 +0200 Subject: [PATCH 5/6] CI: fix GLIBC compatibility for scenario tests by using ubuntu-22.04 Change test binary artifacts to be built on ubuntu-22.04 instead of ubuntu-24.04 to ensure GLIBC compatibility with the Debian Bullseye container used in scenario tests. This fixes "GLIBC_2.38/2.39 not found" errors when running scenario tests. --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b82201610c..b335c2eb8b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -153,7 +153,7 @@ jobs: make build-release - name: Upload binaries - if: matrix.os == 'ubuntu-24.04' + if: matrix.os == 'ubuntu-22.04' uses: actions/upload-artifact@v4 with: name: bin @@ -244,7 +244,7 @@ jobs: while read NAME FILE; do cp -a $FILE target/release/tests/$NAME; done < tests.tsv - name: Upload tests - if: matrix.os == 'ubuntu-24.04' + if: matrix.os == 'ubuntu-22.04' uses: actions/upload-artifact@v4 with: name: tests @@ -288,7 +288,7 @@ jobs: make build-tests-webrtc - name: Upload tests - if: matrix.os == 'ubuntu-24.04' + if: matrix.os == 'ubuntu-22.04' uses: actions/upload-artifact@v4 with: name: tests-webrtc From 8375e985e0d04e7647c1c2ccc2838fa25828b892 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Fri, 25 Jul 2025 15:01:53 +0200 Subject: [PATCH 6/6] docs: update CHANGELOG and documentation for GLIBC compatibility fix Update CHANGELOG entry for PR #1249 to include GLIBC compatibility fix and update getting-started documentation to reflect that full test suite runs on ubuntu-22.04 for container compatibility. --- CHANGELOG.md | 6 ++++-- website/docs/developers/getting-started.mdx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c1ef27dc7..8cde9e4041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,8 +44,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - **CI**: Generalized build jobs to support multiple platforms (Ubuntu 22.04, - Ubuntu 24.04, Ubuntu 24.04 ARM, macOS latest) and updated test execution to - ubuntu-latest ([#1249](https://github.com/o1-labs/openmina/pull/1249)) + Ubuntu 24.04, Ubuntu 24.04 ARM, macOS latest), updated test execution to + ubuntu-latest, and fixed GLIBC compatibility for scenario tests by using + Ubuntu 22.04 for test binary artifacts to ensure compatibility with Debian + Bullseye container environment ([#1249](https://github.com/o1-labs/openmina/pull/1249)) - **Build System**: Enhanced Makefile with documentation-related targets and comprehensive formatting commands ([#1234](https://github.com/o1-labs/openmina/pull/1234)) ### Fixed diff --git a/website/docs/developers/getting-started.mdx b/website/docs/developers/getting-started.mdx index ce9b12bfca..5686c86ac7 100644 --- a/website/docs/developers/getting-started.mdx +++ b/website/docs/developers/getting-started.mdx @@ -32,7 +32,7 @@ development environment and build OpenMina from source. - macOS (latest) - Other Linux distributions may work but are not officially supported - Note: While we test compilation on all platforms, the full test suite is - only run on ubuntu-24.04 + only run on ubuntu-22.04 (for GLIBC compatibility with container tests) - **Memory**: At least 8GB RAM (16GB recommended) - **Storage**: At least 20GB free space - **Network**: Stable internet connection for downloading dependencies