diff --git a/.github/workflows/build-cache.yml b/.github/workflows/build-cache.yml index ba8f78e3cb..bde8459c9c 100644 --- a/.github/workflows/build-cache.yml +++ b/.github/workflows/build-cache.yml @@ -9,7 +9,7 @@ env: jobs: build: - runs-on: warp-ubuntu-2204-x64-4x + runs-on: warp-ubuntu-2404-x64-4x steps: - uses: actions/checkout@v4 @@ -18,7 +18,7 @@ jobs: ##### The block below is shared between cache build and PR build workflows ##### - name: Install EStarkPolygon prover dependencies - run: sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm + run: sudo apt-get update && sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm - name: Install Rust toolchain nightly-2024-09-21 (with clippy and rustfmt) run: rustup toolchain install nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu - name: Install Rust toolchain 1.81 (stable) diff --git a/.github/workflows/dead-links.yml b/.github/workflows/dead-links.yml index 72175f93d8..13d248eeda 100644 --- a/.github/workflows/dead-links.yml +++ b/.github/workflows/dead-links.yml @@ -2,7 +2,7 @@ name: Check markdown links on: [pull_request, merge_group] jobs: markdown-link-check: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: gaurav-nelson/github-action-markdown-link-check@v1 diff --git a/.github/workflows/deploy-book.yml b/.github/workflows/deploy-book.yml index 548e32dc8d..12e577e754 100644 --- a/.github/workflows/deploy-book.yml +++ b/.github/workflows/deploy-book.yml @@ -8,7 +8,7 @@ on: jobs: deploy: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: contents: write # To push a branch pull-requests: write # To create a PR from that branch diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 7295bf4583..fca02ec059 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -11,7 +11,7 @@ env: jobs: check_if_needs_running: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: status: ${{ steps.count.outputs.status }} @@ -43,7 +43,7 @@ jobs: args: '--all-targets' test_release: - runs-on: ubuntu-22.04 + runs-on: warp-ubuntu-2404-x64-4x needs: check_if_needs_running if: needs.check_if_needs_running.outputs.status > 0 @@ -51,14 +51,17 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: ⚡ Cache rust - uses: actions/cache@v4 + - name: ⚡ Restore rust cache + id: cache + uses: WarpBuilds/cache/restore@v1 with: path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.toml') }} + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Cargo.lock + key: ${{ runner.os }}-cargo-nightly-tests - name: ⚡ Cache nodejs uses: actions/cache@v4 with: @@ -74,9 +77,9 @@ jobs: - name: Install riscv target run: rustup target add riscv32imac-unknown-none-elf --toolchain nightly-2024-08-01-x86_64-unknown-linux-gnu - name: Install test dependencies - run: sudo apt-get install -y binutils-riscv64-unknown-elf lld + run: sudo apt-get update && sudo apt-get install -y binutils-riscv64-unknown-elf lld - name: Install EStarkPolygon prover dependencies - run: sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm + run: sudo apt-get update && sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc uuid-dev build-essential cmake pkg-config git - name: Install pilcom run: git clone https://github.com/0xPolygonHermez/pilcom.git && cd pilcom && npm install - name: Check without Halo2 @@ -84,8 +87,6 @@ jobs: - name: Build run: cargo build --all --release --all-features - name: Run tests - # Number threads is set to 1 because the runner does not have enough memeory for more. - run: PILCOM=$(pwd)/pilcom/ cargo test --all --release --verbose --all-features -- --include-ignored --nocapture --test-threads=1 + run: PILCOM=$(pwd)/pilcom/ cargo test --all --release --verbose --all-features -- --include-ignored --nocapture - name: Run benchmarks - run: cargo bench - working-directory: compiler + run: cargo bench --workspace --all-features diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index a3f5760b34..537ed488bd 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -20,7 +20,7 @@ env: jobs: build: - runs-on: warp-ubuntu-2204-x64-8x + runs-on: warp-ubuntu-2404-x64-8x steps: - uses: actions/checkout@v4 @@ -43,7 +43,7 @@ jobs: ##### The block below is shared between cache build and PR build workflows ##### - name: Install EStarkPolygon prover dependencies - run: sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm + run: sudo apt-get update && sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm - name: Install Rust toolchain nightly-2024-09-21 (with clippy and rustfmt) run: rustup toolchain install nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu - name: Install Rust toolchain 1.81 (stable) @@ -77,7 +77,7 @@ jobs: test_quick: needs: build - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: test: @@ -107,7 +107,7 @@ jobs: - name: Install riscv target run: rustup target add riscv32imac-unknown-none-elf --toolchain nightly-2024-08-01-x86_64-unknown-linux-gnu - name: Install test dependencies - run: sudo apt-get install -y binutils-riscv64-unknown-elf lld + run: sudo apt-get update && sudo apt-get install -y binutils-riscv64-unknown-elf lld - name: Install pilcom run: git clone https://github.com/0xPolygonHermez/pilcom.git && cd pilcom && npm install - uses: taiki-e/install-action@nextest @@ -118,7 +118,7 @@ jobs: POWDR_STD: ${{ github.workspace }}/std/ run_examples: - runs-on: warp-ubuntu-2204-x64-4x + runs-on: warp-ubuntu-2404-x64-4x steps: - uses: actions/checkout@v4 @@ -142,7 +142,7 @@ jobs: test_estark_polygon: needs: build - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: @@ -168,7 +168,7 @@ jobs: - name: Install pilcom run: git clone https://github.com/0xPolygonHermez/pilcom.git && cd pilcom && npm install - name: Install EStarkPolygon prover system dependency - run: sudo apt-get install -y nlohmann-json3-dev + run: sudo apt-get update && sudo apt-get install -y nlohmann-json3-dev - uses: taiki-e/install-action@nextest - name: Unpack EStarkPolygon built dependencies run: tar --zstd -xf pil-stark-prover-deps.tar.zst @@ -191,7 +191,7 @@ jobs: - "7" - "8" needs: build - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -210,7 +210,7 @@ jobs: - name: Install Rust toolchain nightly-2024-09-21 (with clippy and rustfmt) run: rustup toolchain install nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu - name: Install test dependencies - run: sudo apt-get install -y binutils-riscv64-unknown-elf lld + run: sudo apt-get update && sudo apt-get install -y binutils-riscv64-unknown-elf lld - name: Install nightly-2024-08-01 run: rustup toolchain install nightly-2024-08-01-x86_64-unknown-linux-gnu - name: Install std source diff --git a/riscv/benches/executor_benchmark.rs b/riscv/benches/executor_benchmark.rs index 593f2b861b..7d690c04ee 100644 --- a/riscv/benches/executor_benchmark.rs +++ b/riscv/benches/executor_benchmark.rs @@ -1,9 +1,7 @@ use ::powdr_pipeline::Pipeline; use powdr_number::GoldilocksField; -use powdr_riscv::{ - compile_rust_crate_to_riscv, continuations::bootloader::default_input, elf, CompilerOptions, -}; +use powdr_riscv::{compile_rust_crate_to_riscv, elf, CompilerOptions}; use criterion::{criterion_group, criterion_main, Criterion}; use mktemp::Temp; @@ -27,23 +25,6 @@ fn executor_benchmark(c: &mut Criterion) { group.bench_function("keccak", |b| { b.iter(|| pipeline.clone().compute_witness().unwrap()) }); - - // The first chunk of `many_chunks` with bootloader - let executable = - compile_rust_crate_to_riscv("./tests/riscv_data/many_chunks/Cargo.toml", &tmp_dir, None); - let options = options.with_continuations(); - let contents = elf::translate(&executable, options); - let mut pipeline = Pipeline::::default().from_asm_string(contents, None); - pipeline.compute_optimized_pil().unwrap(); - pipeline.compute_fixed_cols().unwrap(); - - let pipeline = pipeline.add_external_witness_values(vec![( - "main_bootloader_inputs::value".to_string(), - default_input(&[63, 64, 65]), - )]); - group.bench_function("many_chunks_chunk_0", |b| { - b.iter(|| pipeline.clone().compute_witness().unwrap()) - }); group.finish(); }