mirror of
https://github.com/eth-act/ere.git
synced 2026-04-03 03:00:17 -04:00
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
name: Rust Checks
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
check-fmt:
|
|
name: Lints
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
components: rustfmt
|
|
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --check --all
|
|
|
|
check-tests:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
zkvm: [sp1, risc0]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
components: clippy
|
|
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check clippy
|
|
run: cargo clippy --bins --lib --examples --tests --benches -p ere-${{ matrix.zkvm }}
|
|
|
|
- name: Run tests
|
|
run: cargo test --release -p ere-dockerized -- ${{ matrix.zkvm }}
|