Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to make cache more useful for PR builds. #1959

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust toolchain 1.81 (with clippy and rustfmt)
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.81-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.81-x86_64-unknown-linux-gnu

##### 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
- name: Lint
run: cargo clippy --all --all-targets --all-features --profile pr-tests -- -D warnings
- name: Lint
- 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)
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu
- name: Cargo check with Rust 1.81 (default features)
run: cargo +1.81-x86_64-unknown-linux-gnu check --all-targets
- name: Lint no default features
run: cargo clippy --all --all-targets --no-default-features --profile pr-tests -- -D warnings
- name: Lint all features
run: cargo clippy --all --all-targets --all-features --profile pr-tests -- -D warnings
- name: Format
run: cargo fmt --all --check --verbose
- name: Build
run: cargo build --all-targets --all --all-features --profile pr-tests
- name: Check without Halo2
run: cargo check --all --no-default-features --profile pr-tests
###############################################################################

- name: Save date of cache build
run: date -R -u > target/cache-build-date.txt
- name: ⚡ Save rust cache
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ jobs:
- name: Date of the restored cache
run: cat target/cache-build-date.txt
continue-on-error: true
- 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

##### 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
- 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)
run: rustup toolchain install 1.81.0-x86_64-unknown-linux-gnu
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu
- name: Cargo check with Rust 1.81 (default features)
run: rustup default 1.81.0-x86_64-unknown-linux-gnu && cargo +1.81.0-x86_64-unknown-linux-gnu check --all-targets --no-default-features
run: cargo +1.81-x86_64-unknown-linux-gnu check --all-targets
- name: Lint no default features
run: cargo clippy --all --all-targets --no-default-features --profile pr-tests -- -D warnings
- name: Lint all features
Expand All @@ -56,6 +58,8 @@ jobs:
run: cargo fmt --all --check --verbose
- name: Build
run: cargo build --all-targets --all --all-features --profile pr-tests
###############################################################################

- uses: taiki-e/install-action@nextest
- name: Archive EStarkPolygon prover built dependencies
run: tar --zstd -cf pil-stark-prover-deps.tar.zst target/pr-tests/build/pil-stark-prover-*/out
Expand Down