arecibo 0.1.1

Recursive zkSNARKs without trusted setup
Documentation
name: Build and Test Nova

on:
  merge_group:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
    branches:
      - dev
      - 'feat/**'
      - release-candidate

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0
  CARGO_NET_RETRY: 10
  RUSTUP_MAX_RETRIES: 10
  RUST_BACKTRACE: short

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: buildjet-8vcpu-ubuntu-2204
    env:
      RUSTFLAGS: -D warnings
    steps:
    - uses: actions/checkout@v2
    - name: Setup Rust
      uses: actions-rs/toolchain@v1
    - uses: taiki-e/install-action@nextest
    - uses: Swatinem/rust-cache@v2
    - name: Check the minroot example compiles under the abomonate feature
      run: cargo check --profile dev-ci --features "abomonate" --examples 
    - name: Build, with benches & examples
      run: cargo build --profile dev-ci --benches --examples 
    - name: Linux Tests in parallel, with nextest profile ci and cargo profile dev-ci
      run: |
        cargo nextest run --profile ci --workspace --cargo-profile dev-ci
    - name: Run test_pp_digest with the asm feature
      run: |
        cargo nextest run --profile ci --workspace --cargo-profile dev-ci --features "asm" -E 'test(test_pp_digest)'

  check-lurk-compiles:
    if: github.event_name == 'pull_request'
    runs-on: buildjet-8vcpu-ubuntu-2204
    env:
      RUSTFLAGS: -D warnings
    steps:
    - uses: actions/checkout@v2
      with:
        path: ${{ github.workspace }}/arecibo
    - uses: actions/checkout@v2
      with:
        repository: lurk-lab/lurk-rs
        path: ${{ github.workspace }}/lurk
        submodules: recursive
    - uses: dtolnay/rust-toolchain@stable
    - uses: Swatinem/rust-cache@v2
    - name: Patch Cargo.toml
      working-directory: ${{ github.workspace }}/lurk
      run: |
        echo "[patch.'https://github.com/lurk-lab/arecibo']" >> Cargo.toml
        echo "nova = { path='../arecibo', package='nova-snark' }" >> Cargo.toml
    - name: Check Lurk-rs types don't break spectacularly
      working-directory: ${{ github.workspace }}/lurk
      run: cargo check --all --tests --benches --examples

  misc:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
    env:
      RUSTFLAGS: -D warnings
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: rustup target add wasm32-unknown-unknown
      - name: Wasm build 
        run: cargo build --target wasm32-unknown-unknown
      - name: Check Rustfmt Code Style
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check
      - name: Check clippy warnings
        run: cargo xclippy -D warnings
      - name: Check benches compile under the flamegraph feature
        run: cargo check --profile dev-ci --features "flamegraph" --benches
      - name: Doctests
        run: cargo test --doc --workspace

  msrv:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Install rustup
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        override: true
    - uses: Swatinem/rust-cache@v2
    - name: Install cargo-msrv
      run: cargo install cargo-msrv
    - name: Check Rust MSRV
      run: cargo msrv verify