From 7ea23d47f5b7842616a797dc23052edc170468b0 Mon Sep 17 00:00:00 2001 From: soham Date: Fri, 13 Dec 2024 14:23:02 +0530 Subject: [PATCH 1/2] Fix InsnKind in SLT (#750) Closes #746 --- ceno_zkvm/src/instructions/riscv/slt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ceno_zkvm/src/instructions/riscv/slt.rs b/ceno_zkvm/src/instructions/riscv/slt.rs index 08ceff8b3..a3e477350 100644 --- a/ceno_zkvm/src/instructions/riscv/slt.rs +++ b/ceno_zkvm/src/instructions/riscv/slt.rs @@ -83,7 +83,7 @@ impl Instruction for SetLessThanInstruc let r_insn = RInstructionConfig::::construct_circuit( cb, - InsnKind::SLT, + I::INST_KIND, rs1_read.register_expr(), rs2_read.register_expr(), rd_written.register_expr(), @@ -159,7 +159,7 @@ mod test { .unwrap() .unwrap(); - let insn_code = encode_rv32(InsnKind::SLT, 2, 3, 4, 0); + let insn_code = encode_rv32(I::INST_KIND, 2, 3, 4, 0); let (raw_witin, lkm) = SetLessThanInstruction::<_, I>::assign_instances( &config, cb.cs.num_witin as usize, From 0a6437171760190836fd7221181fb2e4f1bb5313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20G=C3=B6rgens?= Date: Fri, 13 Dec 2024 17:36:14 +0800 Subject: [PATCH 2/2] Speed up CI (#752) We are spending a lot of time restoring our cache on our self-hosted runners. So let's try offloading some of the CI work back to GitHub, specifically hand back lints and tests, but keep integration tests with our runner. Also: - upgrade our actions - cancel previous runs, when new commits are pushed --- .github/workflows/integration.yml | 8 ++++++-- .github/workflows/lints.yml | 29 ++++++++--------------------- .github/workflows/tests.yml | 28 ++++++++-------------------- 3 files changed, 22 insertions(+), 43 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 934fe3f3e..8bcc5dfed 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -8,6 +8,10 @@ on: branches: - master +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + jobs: skip_check: runs-on: [self-hosted, Linux, X64] @@ -33,9 +37,9 @@ jobs: runs-on: [self-hosted, Linux, X64] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cargo cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 207769aa8..1f8d41b0b 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -8,32 +8,18 @@ on: branches: - master -jobs: - skip_check: - runs-on: [self-hosted, Linux, X64] - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@v5 - with: - cancel_others: 'true' - concurrent_skipping: 'same_content_newer' - paths_ignore: '["**/README.md"]' - do_not_skip: '["pull_request", "workflow_dispatch", "schedule", "merge_group"]' +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} +jobs: lints: - needs: [skip_check] - if: | - github.event.pull_request.draft == false && - (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') - name: Various lints timeout-minutes: 30 - runs-on: [self-hosted, Linux, X64] + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: components: rustfmt, clippy @@ -41,7 +27,7 @@ jobs: # TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically? toolchain: nightly-2024-12-06 - name: Cargo cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -51,6 +37,7 @@ jobs: target/ guest/target/ key: lint-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: lint-${{ runner.os }}-cargo- - name: Install cargo make run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e7d224995..0f2ea9df3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,38 +8,25 @@ on: branches: - master -jobs: - skip_check: - runs-on: [self-hosted, Linux, X64] - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@v5 - with: - cancel_others: 'true' - concurrent_skipping: 'same_content_newer' - paths_ignore: '["**/README.md"]' - do_not_skip: '["pull_request", "workflow_dispatch", "schedule", "merge_group"]' +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} +jobs: tests: - needs: [skip_check] - if: | - github.event.pull_request.draft == false && - (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') name: Run Tests timeout-minutes: 30 - runs-on: [self-hosted, Linux, X64] + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: targets: riscv32im-unknown-none-elf # TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically? toolchain: nightly-2024-12-06 - name: Cargo cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -49,6 +36,7 @@ jobs: target/ guest/target/ key: tests-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: tests-${{ runner.os }}-cargo- - name: Install cargo make run: |