From 0e94428c1b9f03e509d7bae8be46493e037c7802 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Wed, 15 Oct 2025 17:11:45 +0200 Subject: [PATCH 1/4] CI/lint: formatting with new lines --- .github/workflows/lint.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index f3617672b..ec6eeaf91 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -17,27 +17,33 @@ jobs: toolchain: [1.84] steps: - uses: actions/checkout@v5 + - name: Setup build dependencies uses: ./.github/actions/setup-build-deps with: include-sqlite: true + - name: Use shared OCaml setting up steps uses: ./.github/actions/setup-ocaml with: ocaml_version: ${{ matrix.ocaml_version }} + - name: Setup SQLite database for SQLx run: | sqlite3 /tmp/heartbeats.db < tools/heartbeats-processor/schema.sql + - name: Setup Rust uses: ./.github/actions/setup-rust with: toolchain: ${{ matrix.toolchain }} components: clippy, rustfmt cache-prefix: lint-${{ matrix.toolchain }}-v0 + - name: Run make check run: make check env: DATABASE_URL: "sqlite:///tmp/heartbeats.db" + - name: Run make lint run: make lint env: @@ -59,18 +65,22 @@ jobs: ocaml_version: [4.14.2] steps: - uses: actions/checkout@v5 + - name: Setup build dependencies uses: ./.github/actions/setup-build-deps + - name: Use shared OCaml setting up steps uses: ./.github/actions/setup-ocaml with: ocaml_version: ${{ matrix.ocaml_version }} + - name: Setup Rust uses: ./.github/actions/setup-rust with: toolchain: ${{ matrix.toolchain }} components: clippy, rustfmt cache-prefix: lint-tx-fuzzing-${{ matrix.toolchain }}-v0 + - name: Run transaction Fuzzing check run: make check-tx-fuzzing @@ -83,10 +93,12 @@ jobs: os: [ubuntu-24.04] steps: - uses: actions/checkout@v5 + - name: Install shellcheck run: | sudo apt update || true sudo apt install -y shellcheck || true + - name: Run shellcheck run: make lint-bash @@ -99,10 +111,12 @@ jobs: os: [ubuntu-24.04] steps: - uses: actions/checkout@v5 + - name: Install hadolint run: | wget -O /tmp/hadolint https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 chmod +x /tmp/hadolint sudo mv /tmp/hadolint /usr/local/bin/hadolint + - name: Run hadolint run: make lint-dockerfiles From 51f0d7aa7271621d69cf5414299c53f7074174b6 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Wed, 15 Oct 2025 17:12:11 +0200 Subject: [PATCH 2/4] CI/workflow: build-reusable - setup SQLite for SQLx --- .github/workflows/build-reusable.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-reusable.yaml b/.github/workflows/build-reusable.yaml index 96b34170e..3413bd900 100644 --- a/.github/workflows/build-reusable.yaml +++ b/.github/workflows/build-reusable.yaml @@ -143,6 +143,8 @@ jobs: - name: Setup build dependencies uses: ./.github/actions/setup-build-deps + with: + include-sqlite: true - name: Use shared OCaml setting up steps uses: ./.github/actions/setup-ocaml @@ -155,8 +157,14 @@ jobs: toolchain: 1.84 cache-prefix: build-${{ inputs.os }}-${{ inputs.cache-prefix }}v0 + - name: Setup SQLite database for SQLx + run: | + sqlite3 /tmp/heartbeats.db < tools/heartbeats-processor/schema.sql + - name: Build benchmarks run: make build-benches + env: + DATABASE_URL: "sqlite:///tmp/heartbeats.db" build-wasm: if: ${{ inputs.build-wasm }} From f5a2ced6bbb61d44f0f949029bb9c9cf798e6425 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Wed, 15 Oct 2025 17:12:34 +0200 Subject: [PATCH 3/4] CI/tests: run build-benches on ubuntu-22.04 --- .github/workflows/tests.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 58216fafd..f0286128d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -371,6 +371,41 @@ jobs: - name: Build WebAssembly node run: make build-wasm + build-benches: + needs: [build] + timeout-minutes: 60 + runs-on: ubuntu-22.04 + env: + RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ inputs.rustflags }}" + steps: + - name: Git checkout + uses: actions/checkout@v5 + + - name: Setup build dependencies + uses: ./.github/actions/setup-build-deps + with: + include-sqlite: true + + - name: Use shared OCaml setting up steps + uses: ./.github/actions/setup-ocaml + with: + ocaml_version: ${{ env.OCAML_VERSION }} + + - name: Setup Rust + uses: ./.github/actions/setup-rust + with: + toolchain: 1.84 + cache-prefix: build-${{ inputs.os }}-${{ inputs.cache-prefix }}v0 + + - name: Setup SQLite database for SQLx + run: | + sqlite3 /tmp/heartbeats.db < tools/heartbeats-processor/schema.sql + + - name: Build benchmarks + run: make build-benches + env: + DATABASE_URL: "sqlite:///tmp/heartbeats.db" + p2p-scenario-tests: needs: [build-tests, build-tests-webrtc] runs-on: ubuntu-24.04 From ad409107df2dc9b5ba6c6de3b4eb0e7ea8dd0394 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Wed, 15 Oct 2025 17:15:11 +0200 Subject: [PATCH 4/4] CHANGELOG: add description for patch 1548 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 348e54a8e..487e5b436 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,11 +99,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 reusing build caches for efficiency ([#1539](https://github.com/o1-labs/mina-rust/pull/1539)) - **Ledger**: document, clean and add tests for the crate `mina-tree` - ([#1531](https://github.com/o1-labs/mina-rust/pull/1531)). + ([#1531](https://github.com/o1-labs/mina-rust/pull/1531). - **GraphQL**: fixed parsing when neither signature nor proof is given. See issue [#1464](https://github.com/o1-labs/mina-rust/issues/1464). Fixed in [#1546](https://github.com/o1-labs/mina-rust/pull/1546/) ([#1546](https://github.com/o1-labs/mina-rust/pull/1546)) +- **CI**: build benches for each PR with the workflow `tests`, and fix the step + in the workflow `build` by adding the missing SQLx/SQLite setup + ([#1548](https://github.com/o1-labs/mina-rust/pull/1548)) ## v0.17.0