Skip to content

Commit

Permalink
update CI ubuntu (#2187)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardoalt authored Dec 3, 2024
1 parent b2c0812 commit a124dc6
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dead-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -43,22 +43,25 @@ 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

steps:
- 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:
Expand All @@ -74,18 +77,16 @@ 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
run: cargo check --all --no-default-features
- 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
18 changes: 9 additions & 9 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
test_quick:
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
test:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -191,7 +191,7 @@ jobs:
- "7"
- "8"
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand All @@ -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
Expand Down
21 changes: 1 addition & 20 deletions riscv/benches/executor_benchmark.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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::<T>::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();
}

Expand Down

0 comments on commit a124dc6

Please sign in to comment.