diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9c41734..fee2073a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,22 +21,41 @@ jobs: working-directory: "halo2-base" run: | cargo test - - name: Run halo2-ecc tests MockProver + - name: Run halo2-ecc tests (mock prover) working-directory: "halo2-ecc" run: | - cargo test -- --skip bench + cargo test --lib --release --jobs=1 -- --skip bench - name: Run halo2-ecc tests (real prover) working-directory: "halo2-ecc" run: | - cargo test --release -- bench_secp256k1_ecdsa - cargo test --release -- bench_ec_add mv configs/bn254/bench_fixed_msm.t.config configs/bn254/bench_fixed_msm.config - cargo test --release -- bench_fixed_base_msm mv configs/bn254/bench_msm.t.config configs/bn254/bench_msm.config - cargo test --release -- bench_msm mv configs/bn254/bench_pairing.t.config configs/bn254/bench_pairing.config - cargo test --release -- bench_pairing + cargo test --lib --release --jobs=1 -- bench - name: Run zkevm-keccak tests working-directory: "hashes/zkevm-keccak" run: | - cargo test + cargo test --jobs=1 + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: false + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v1 + with: + cache-on-failure: true + + - name: Run fmt + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --all -- -D warnings