From b4221f23d7eb1eee502a7a5188279671da853d2d Mon Sep 17 00:00:00 2001 From: Dzejkop Date: Tue, 15 Apr 2025 13:03:28 +0200 Subject: [PATCH 1/8] reorder CI for a faster feedback loop --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b8c8e6de..ec4e8dbc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,13 +18,13 @@ jobs: steps: - uses: actions/checkout@v4 - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - - run: cargo build --all-targets --all-features --verbose - - run: cargo test --all-targets --all-features --verbose - - run: cargo test --doc --all-features --verbose + - run: cargo fmt --all --check - run: cargo clippy --all-targets --all-features --verbose env: RUSTFLAGS: -Dwarnings - - run: cargo fmt --all --check + - run: cargo build --all-targets --all-features --verbose + - run: cargo test --all-targets --all-features --verbose + - run: cargo test --doc --all-features --verbose - run: cargo doc --workspace --all-features --no-deps --document-private-items env: RUSTDOCFLAGS: "--cfg doc_cfg -D warnings" From e7b765cb9268aed9bdcbc028bf49e0e0e7a93718 Mon Sep 17 00:00:00 2001 From: Dzejkop Date: Tue, 15 Apr 2025 13:04:56 +0200 Subject: [PATCH 2/8] add rustfmt to CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec4e8dbc7..3244bbe35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: rustup component add rustfmt - run: cargo fmt --all --check - run: cargo clippy --all-targets --all-features --verbose env: From edb242d931eede162cd941c83e189e8a62cb120d Mon Sep 17 00:00:00 2001 From: Dzejkop Date: Tue, 15 Apr 2025 13:05:35 +0200 Subject: [PATCH 3/8] add clippy --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3244bbe35..dec445e5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - - run: rustup component add rustfmt + - run: rustup component add rustfmt && rustup component add clippy - run: cargo fmt --all --check - run: cargo clippy --all-targets --all-features --verbose env: From 956964ff81ec439858839a55cc4bca3183a18fbc Mon Sep 17 00:00:00 2001 From: Dzejkop Date: Tue, 15 Apr 2025 13:08:48 +0200 Subject: [PATCH 4/8] no fail-fast --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dec445e5c..f572a811c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,9 @@ jobs: name: Rust project - latest runs-on: ubuntu-latest strategy: + # TODO: Remove this once formatting and clippy lints have been applied + # for now it's useful to see the feedback frmo fmt as well as build failures + fail-fast: false matrix: toolchain: - nightly From cd2c32ae8520f6fbf3e8b50871eb8a9a787fcd3e Mon Sep 17 00:00:00 2001 From: Dzejkop Date: Tue, 15 Apr 2025 13:11:12 +0200 Subject: [PATCH 5/8] continue on style errors --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f572a811c..aa4cb21e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,6 @@ jobs: name: Rust project - latest runs-on: ubuntu-latest strategy: - # TODO: Remove this once formatting and clippy lints have been applied - # for now it's useful to see the feedback frmo fmt as well as build failures - fail-fast: false matrix: toolchain: - nightly @@ -23,9 +20,15 @@ jobs: - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - run: rustup component add rustfmt && rustup component add clippy - run: cargo fmt --all --check + # TODO: Remove this once formatting and clippy lints have been applied + # for now it's useful to see the feedback frmo fmt as well as build failures + continue-on-error: true - run: cargo clippy --all-targets --all-features --verbose env: RUSTFLAGS: -Dwarnings + # TODO: Remove this once formatting and clippy lints have been applied + # for now it's useful to see the feedback frmo fmt as well as build failures + continue-on-error: true - run: cargo build --all-targets --all-features --verbose - run: cargo test --all-targets --all-features --verbose - run: cargo test --doc --all-features --verbose From 6a08714bfb4afcd824932e03cd7cd12ae56a5ade Mon Sep 17 00:00:00 2001 From: Dzejkop Date: Tue, 15 Apr 2025 13:32:59 +0200 Subject: [PATCH 6/8] fix: commit -> rev + autofmt --- merkle-hash-bench/Cargo.toml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/merkle-hash-bench/Cargo.toml b/merkle-hash-bench/Cargo.toml index a5ee5dd2f..0c0334f5a 100644 --- a/merkle-hash-bench/Cargo.toml +++ b/merkle-hash-bench/Cargo.toml @@ -6,21 +6,21 @@ edition = "2021" [features] default = ["plonky3", "zkhash"] plonky3 = [ - "dep:p3-bn254-fr", - "dep:p3-goldilocks", - "dep:p3-mersenne-31", - "dep:p3-field", - "dep:p3-poseidon2", - "dep:p3-symmetric", - "dep:p3-monolith", - "dep:p3-rescue", + "dep:p3-bn254-fr", + "dep:p3-goldilocks", + "dep:p3-mersenne-31", + "dep:p3-field", + "dep:p3-poseidon2", + "dep:p3-symmetric", + "dep:p3-monolith", + "dep:p3-rescue", ] icicle = [ - "dep:icicle-core", - "dep:icicle-runtime", - "dep:icicle-hash", - "dep:icicle-bn254", - "dep:icicle-m31", + "dep:icicle-core", + "dep:icicle-runtime", + "dep:icicle-hash", + "dep:icicle-bn254", + "dep:icicle-m31", ] zkhash = ["dep:zkhash"] stwo = ["dep:stwo-prover"] @@ -49,7 +49,7 @@ gensym = "0.1.1" # Plonky 3 p3-bn254-fr = { git = "https://github.com/Plonky3/Plonky3.git", branch = "main", optional = true, features = [ - "table", + "table", ] } p3-goldilocks = { git = "https://github.com/Plonky3/Plonky3.git", branch = "main", optional = true } p3-mersenne-31 = { git = "https://github.com/Plonky3/Plonky3.git", branch = "main", optional = true } @@ -67,7 +67,7 @@ icicle-bn254 = { git = "https://github.com/ingonyama-zk/icicle.git", branch = "m icicle-m31 = { git = "https://github.com/ingonyama-zk/icicle.git", branch = "main", optional = true } # ZKHash -zkhash = { git = "https://extgit.isec.tugraz.at/krypto/zkfriendlyhashzoo.git", commit = "f252d2b2767bc88659615601ac13e19f52c2c11f", optional = true } +zkhash = { git = "https://extgit.isec.tugraz.at/krypto/zkfriendlyhashzoo.git", rev = "f252d2b2767bc88659615601ac13e19f52c2c11f", optional = true } # Stwo stwo-prover = { git = "https://github.com/starkware-libs/stwo.git", version = "0.1.1", optional = true } From 04150aaa76babb367f70037e0685d16ba739fa9f Mon Sep 17 00:00:00 2001 From: Dzejkop Date: Tue, 15 Apr 2025 13:33:04 +0200 Subject: [PATCH 7/8] enforce nightly --- rust-toolchain.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 rust-toolchain.toml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 000000000..5d56faf9a --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "nightly" From e43d45fb43ac653cba6e59ab63bbe0253df20718 Mon Sep 17 00:00:00 2001 From: Dzejkop Date: Tue, 15 Apr 2025 13:33:13 +0200 Subject: [PATCH 8/8] no verbose on clippy (too much noise) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa4cb21e1..4dc36a15d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: # TODO: Remove this once formatting and clippy lints have been applied # for now it's useful to see the feedback frmo fmt as well as build failures continue-on-error: true - - run: cargo clippy --all-targets --all-features --verbose + - run: cargo clippy --all-targets --all-features env: RUSTFLAGS: -Dwarnings # TODO: Remove this once formatting and clippy lints have been applied