From 37847628c38a039e3ea67e1f61649101c97ae0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Fri, 16 Jan 2026 19:03:38 -0300 Subject: [PATCH 1/4] ci: add linter and tests check --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++ rust-toolchain.toml | 3 ++ 2 files changed, 62 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0b2b56f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: ["**"] + workflow_dispatch: + +# Cancel in-progress runs when a new commit is pushed to the same PR or branch +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + CARGO_NET_RETRY: "10" + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.92.0" + components: rustfmt, clippy + + - name: Setup cache + uses: Swatinem/rust-cache@v2 + + - name: Check formatting + run: cargo fmt --all -- --check + + - name: Cargo check + run: cargo check --workspace --all-targets + + - name: Clippy + run: cargo clippy --workspace --all-targets -- -D warnings + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.92.0" + + - name: Setup cache + uses: Swatinem/rust-cache@v2 + + - name: Run tests + run: cargo test --workspace diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..1a21655 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.92.0" +components = ["rustfmt", "clippy"] From 62ad4152d5d61fcc860fea59d0e8e61cbf765504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Fri, 16 Jan 2026 19:34:14 -0300 Subject: [PATCH 2/4] ci: add leanSpec fixtures generation for tests Checkout leanSpec repository and generate test fixtures before running Rust tests. The stf_spectests require fixtures that are generated by running `uv run fill --clean --fork=devnet` in leanSpec. --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b2b56f..5ed4f95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,19 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Checkout leanSpec + uses: actions/checkout@v4 + with: + repository: leanEthereum/leanSpec + path: ../leanSpec + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + - name: Generate test fixtures + working-directory: ../leanSpec + run: uv run fill --clean --fork=devnet + - name: Setup Rust uses: dtolnay/rust-toolchain@master with: From 5a40a19777ff3a7b516f8ffb77853075d8cf5e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Fri, 16 Jan 2026 19:40:50 -0300 Subject: [PATCH 3/4] ci: use current dir for leanSpec --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ed4f95..1a8b9ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,13 +51,13 @@ jobs: uses: actions/checkout@v4 with: repository: leanEthereum/leanSpec - path: ../leanSpec + path: ./leanSpec - name: Install uv uses: astral-sh/setup-uv@v5 - name: Generate test fixtures - working-directory: ../leanSpec + working-directory: ./leanSpec run: uv run fill --clean --fork=devnet - name: Setup Rust From a1a51155abca7fcbaefa1fb953db2b73021ce5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Sat, 17 Jan 2026 00:16:24 -0300 Subject: [PATCH 4/4] fix: pin leanSpec version --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a8b9ab..b2df54e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,7 @@ jobs: uses: actions/checkout@v4 with: repository: leanEthereum/leanSpec + ref: bf0f606a75095cf1853529bc770516b1464d9716 path: ./leanSpec - name: Install uv