From 9d1036730fa0f287f3bfd35983f5d14f2f930d73 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Thu, 15 Aug 2024 14:57:38 +0400 Subject: [PATCH] Add basic CI --- .github/workflows/ci.yaml | 58 +++++++++++++++++++ .github/workflows/deny.yaml | 8 +++ crates/zkevm_opcode_defs/src/lib.rs | 2 +- .../zkevm_test_harness/deny.toml => deny.toml | 0 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/deny.yaml rename crates/zkevm_test_harness/deny.toml => deny.toml (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..37671d1 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,58 @@ +name: "Rust CI" +on: + pull_request: + +jobs: + build: + name: cargo build + runs-on: [ubuntu-22.04-github-hosted-32core] + steps: + - uses: actions/checkout@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + rustflags: "" + - name: Setup rust + run: | + rustup set profile minimal + rustup toolchain install nightly-2023-08-23 + rustup default nightly-2023-08-23 + cargo install cargo-nextest + - name: Compile + run: cargo build + + test: + name: cargo test + runs-on: [ubuntu-22.04-github-hosted-32core] + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + rustflags: "" + - name: Setup rust + run: | + rustup set profile minimal + rustup toolchain install nightly-2023-08-23 + rustup default nightly-2023-08-23 + cargo install cargo-nextest + - name: zkevm_test_harness - Main test + run: cargo nextest run --release --manifest-path crates/zkevm_test_harness/Cargo.toml --test-threads 2 + - name: Encodings test + run: cargo nextest run --release --manifest-path crates/circuit_encodings/Cargo.toml + - name: Api tests + run: cargo nextest run --release --manifest-path crates/circuit_sequencer_api/Cargo.toml + - name: Definitions test + run: cargo nextest run --release --manifest-path crates/circuit_definitions/Cargo.toml + - name: Kzg tests + run: cargo nextest run --release --manifest-path crates/kzg/Cargo.toml + + formatting: + name: cargo fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - name: Rustfmt Check + uses: actions-rust-lang/rustfmt@v1 diff --git a/.github/workflows/deny.yaml b/.github/workflows/deny.yaml new file mode 100644 index 0000000..2d93581 --- /dev/null +++ b/.github/workflows/deny.yaml @@ -0,0 +1,8 @@ +name: Cargo deny check +on: pull_request +jobs: + cargo-deny: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: EmbarkStudios/cargo-deny-action@v1 diff --git a/crates/zkevm_opcode_defs/src/lib.rs b/crates/zkevm_opcode_defs/src/lib.rs index 9b2eab3..a9bee78 100644 --- a/crates/zkevm_opcode_defs/src/lib.rs +++ b/crates/zkevm_opcode_defs/src/lib.rs @@ -27,8 +27,8 @@ pub use sha3; pub use self::definitions::*; pub use self::imm_mem_modifiers::*; pub use self::opcode::*; -pub use self::utils::*; pub use self::system_params::*; +pub use self::utils::*; use lazy_static::lazy_static; diff --git a/crates/zkevm_test_harness/deny.toml b/deny.toml similarity index 100% rename from crates/zkevm_test_harness/deny.toml rename to deny.toml