Skip to content

Compression Circuit: snark-verifier-ce #8033

Compression Circuit: snark-verifier-ce

Compression Circuit: snark-verifier-ce #8033

Workflow file for this run

name: CI checks
on:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
# Ignore when target branch is `main` and source branch is develop.
# It could avoid running twice. Since develop is set as `push` below.
branches-ignore:
- main
push:
branches:
- develop
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git
RUST_MIN_STACK: 16777216
jobs:
skip_check:
runs-on: ubuntu-latest
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"]'
runner:
needs: [skip_check]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
uses: ./.github/workflows/select-runner.yml
test-default:
name: Test Default
needs: [runner]
runs-on: ${{ matrix.os }}
concurrency: ${{ needs.runner.outputs.concurrency-group2 }}
strategy:
matrix:
os: ${{ fromJSON(needs.runner.outputs.runner-matrix2) }}
steps:
- uses: actions/checkout@v4
- name: set HOME env
run: |
echo "HOME=/home/CI" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-12-03
- name: Setup golang
uses: actions/setup-go@v3
with:
cache: false
go-version: ~1.21
# Go cache for building geth-utils
- name: Go cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: Run light tests # light tests are run in parallel
run: cargo test --verbose --release --all --exclude prover --exclude integration-tests --exclude circuit-benchmarks -- -Zunstable-options --report-time
- name: Run heavy tests # heavy tests are run serially to avoid OOM
if: false
run: cargo test --verbose --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --test-threads 1
test-scroll:
name: Test Scroll
needs: [runner]
runs-on: ${{ matrix.os }}
concurrency: ${{ needs.runner.outputs.concurrency-group1 }}
strategy:
matrix:
os: ${{ fromJSON(needs.runner.outputs.runner-matrix1) }}
steps:
- uses: actions/checkout@v4
- name: set HOME env
run: |
echo "HOME=/home/CI" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-12-03
- name: Setup golang
uses: actions/setup-go@v3
with:
cache: false
go-version: ~1.21
# Go cache for building geth-utils
- name: Go cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: Run light tests # light tests are run in parallel
run: cargo test --verbose --release --all --features scroll --exclude integration-tests --exclude circuit-benchmarks --exclude testool -- -Zunstable-options --report-time
- name: Run heavy tests
run: cargo test --verbose --release --features scroll --all --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --skip max_tx -Zunstable-options --report-time
- name: Run parallel assignment tests(bytecode)
if: false
run: cargo test --release --package zkevm-circuits --lib bytecode_circuit::test --features scroll,parallel_syn -- --nocapture
- name: Run parallel assignment tests(state)
if: false
run: cargo test --release --package zkevm-circuits --lib state_circuit::test --features scroll,parallel_syn -- --nocapture
build:
needs: [skip_check]
if: |
false &&
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: Build target ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
target:
- wasm32-unknown-unknown
- wasm32-wasi
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-12-03
- name: Add target
run: rustup target add ${{ matrix.target }}
# Go cache for building geth-utils
- name: Go cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: cargo build
run: cargo build --all-features
# Make sure benchmarks compile.
- name: cargo build benchmarks no-run
run: cargo test --verbose --release --all-features -p circuit-benchmarks --no-run
bitrot:
needs: [skip_check]
if: |
false && github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: Bitrot check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-12-03
# Go cache for building geth-utils
- name: Go cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: Swatinem/rust-cache@v2
# Build benchmarks to prevent bitrot
- name: Build benchmarks
run: cargo build --benches --examples --all-features
doc-links:
needs: [skip_check]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: Intra-doc links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-12-03
# Go cache for building geth-utils
- name: Go cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: cargo fetch
run: cargo fetch
# Ensure intra-documentation links all resolve correctly
# Requires #![deny(intra_doc_link_resolution_failure)] in crates.
- name: Check intra-doc links
run: cargo doc --no-deps --all --document-private-items
fmt:
needs: [skip_check]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: Rustfmt
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-12-03
components: rustfmt
# Go cache for building geth-utils
- name: Go cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: Cargo check
run: cargo check --all-features
- name: Cargo fmt
run: cargo fmt --all -- --check
typos-check:
needs: [skip_check]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: TyposCheck
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/[email protected]
with:
config: ./typos.toml
isolated: true