diff --git a/.github/actions/setup-build-deps/action.yml b/.github/actions/setup-build-deps/action.yml index bb8b15e2c..17128baa4 100644 --- a/.github/actions/setup-build-deps/action.yml +++ b/.github/actions/setup-build-deps/action.yml @@ -13,13 +13,13 @@ runs: shell: bash run: | sudo apt update || true - sudo apt install -y protobuf-compiler || true + sudo apt install -y protobuf-compiler libpcap-dev || true - name: Setup build dependencies (macOS) if: runner.os == 'macOS' shell: bash run: | - brew install protobuf ocaml opam + brew install protobuf ocaml opam libpcap - name: Install cargo-nextest if: inputs.install-nextest == 'true' diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 2a136d736..7981f52ec 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,18 +21,22 @@ jobs: - 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: ${{ env.OCAML_VERSION }} + - name: Setup Rust uses: ./.github/actions/setup-rust with: toolchain: ${{ env.RUST_STABLE_VERSION }} components: clippy, rustfmt cache-prefix: lint-${{ env.RUST_STABLE_VERSION }}-v0 + - name: Run make check run: make check + - name: Run make lint run: make lint @@ -51,16 +55,19 @@ jobs: - 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: ${{ env.OCAML_VERSION }} + - name: Setup Rust uses: ./.github/actions/setup-rust with: toolchain: ${{ env.RUST_NIGHTLY_VERSION }} components: clippy, rustfmt cache-prefix: lint-tx-fuzzing-${{ env.RUST_NIGHTLY_VERSION }}-v0 + - name: Run transaction Fuzzing check run: make check-tx-fuzzing @@ -73,10 +80,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 @@ -89,10 +98,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 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 38809ed22..6149a8dd3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -409,6 +409,36 @@ 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: Load versions + uses: ./.github/actions/load-versions + + - 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: ${{ env.OCAML_VERSION }} + + - name: Setup Rust + uses: ./.github/actions/setup-rust + with: + toolchain: ${{ env.RUST_STABLE_VERSION }} + cache-prefix: build-${{ inputs.os }}-${{ inputs.cache-prefix }}v0 + + - name: Build benchmarks + run: make build-benches + p2p-scenario-tests: needs: [build-tests, build-tests-webrtc] runs-on: ubuntu-24.04 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fd59a1f5..733bca60d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -140,7 +140,7 @@ 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/) @@ -151,6 +151,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#1577](https://github.com/o1-labs/mina-rust/pull/1577)) - **tools**: remove producer-dashboard ([#1578](https://github.com/o1-labs/mina-rust/pull/1578)) +- **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)) ### Fixed