diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4430c18195..b335c2eb8b 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-22.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 + 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-22.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-22.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/CHANGELOG.md b/CHANGELOG.md index 59b731ebf8..8cde9e4041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,11 @@ 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), 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/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 diff --git a/website/docs/developers/getting-started.mdx b/website/docs/developers/getting-started.mdx index ee5566fd28..5686c86ac7 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-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