Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into matthias/remove-cli…
Browse files Browse the repository at this point in the history
…ppy-all
  • Loading branch information
matthiasgoergens committed Dec 13, 2024
2 parents e06879a + 0a64371 commit 0b01913
Show file tree
Hide file tree
Showing 32 changed files with 97 additions and 157 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -33,28 +37,27 @@ 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/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
guest/target/
key: integration-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@nightly

- name: Run example
env:
RAYON_NUM_THREADS: 2
RUSTFLAGS: "-C opt-level=3"
run: cargo run --package ceno_zkvm --example riscv_opcodes -- --start 10 --end 11

- name: Run fibonacci
env:
RAYON_NUM_THREADS: 8
RUST_LOG: debug
RUSTFLAGS: "-C opt-level=3"
run: cargo run --package ceno_zkvm --bin e2e -- --platform=sp1 ceno_zkvm/examples/fibonacci.elf
37 changes: 12 additions & 25 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,36 @@ 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
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/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
examples/target/
guest/target/
key: lint-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: lint-${{ runner.os }}-cargo-

- name: Install cargo make
run: |
Expand All @@ -62,13 +49,13 @@ jobs:
env:
RUSTFLAGS: "-Dwarnings"
run: |
cargo check --workspace --all-targets --exclude ceno_rt
cargo check --workspace --all-targets
# We have a lot of code under #[cfg(not(debug_assertions))] and similar,
# so we need to run cargo check in release mode, too:
cargo check --workspace --all-targets --exclude ceno_rt --release
cargo check --workspace --all-targets --release
cargo make clippy
# Same for clippy:
cargo clippy --workspace --all-targets --exclude ceno_rt --release
cargo clippy --workspace --all-targets --release
- name: Install taplo
run: taplo --version || cargo install taplo-cli
Expand Down
30 changes: 9 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,35 @@ 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/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
examples/target/
guest/target/
key: tests-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: tests-${{ runner.os }}-cargo-

- name: Install cargo make
run: |
Expand Down
87 changes: 19 additions & 68 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[workspace]
exclude = ["examples"]
exclude = ["guest"]
members = [
"ceno_emul",
"examples-builder",
"ceno_rt",
"mpcs",
"multilinear_extensions",
"sumcheck",
Expand Down Expand Up @@ -54,6 +53,13 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[profile.dev]
lto = "thin"
# We are running our tests with optimizations turned on to make them faster.
# Please turn optimizations off, when you want accurate stack traces for debugging.
opt-level = 2

[profile.dev.package."*"]
# Set the default for dependencies in Development mode.
opt-level = 3

[profile.release]
lto = "thin"
Loading

0 comments on commit 0b01913

Please sign in to comment.