mirror of
https://github.com/vacp2p/status-rln-prover.git
synced 2026-01-07 20:54:07 -05:00
117 lines
3.1 KiB
YAML
117 lines
3.1 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "!.github/workflows/*.yml"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "!.github/workflows/*.yml"
|
|
|
|
name: CI
|
|
|
|
env:
|
|
PROTOC_VERSION: "3.25.3"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
name: Lint
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
- name: Install stable toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
- name: Install protoc
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: protoc@${{ env.PROTOC_VERSION }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "stable"
|
|
- name: Check formatting
|
|
if: success() || failure()
|
|
run: cargo fmt --all -- --check
|
|
- name: Check clippy
|
|
if: success() || failure()
|
|
run: cargo clippy --all-targets --release -- -D warnings
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
name: Test
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
- name: Install stable toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
- name: Install protoc
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: protoc@${{ env.PROTOC_VERSION }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "stable"
|
|
- name: Install foundry
|
|
uses: foundry-rs/foundry-toolchain@v1
|
|
- name: Test
|
|
run: cargo test --all-features --release
|
|
|
|
unused-deps:
|
|
needs: [lint, test]
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
name: Unused Dependencies
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
- name: Install nightly toolchain
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
- name: Install protoc
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: protoc@${{ env.PROTOC_VERSION }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "nightly"
|
|
- name: Install cargo-udeps
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: cargo-udeps
|
|
- name: Check unused dependencies
|
|
run: cargo +nightly udeps --all-targets --all-features
|
|
|
|
benchmark:
|
|
needs: [lint, test]
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
strategy:
|
|
matrix:
|
|
benchmark: ["generate_proof", "prover_bench"]
|
|
name: Benchmark ${{ matrix.benchmark }}
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install stable toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
- name: Install protoc
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: protoc@${{ env.PROTOC_VERSION }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "stable"
|
|
- name: Run benchmark comparison
|
|
uses: boa-dev/criterion-compare-action@v3
|
|
with:
|
|
branchName: ${{ github.base_ref }}
|
|
benchName: ${{ matrix.benchmark }}
|