Skip to content

ci: use reusable workflows #36

ci: use reusable workflows

ci: use reusable workflows #36

Workflow file for this run

name: Rust
on:
merge_group:
push:
branches: [dev, main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [dev, main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: [ubuntu-latest]
strategy:
fail-fast: false
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
with:
repository: lurk-lab/ci-workflows
- uses: ./.github/actions/ci-env
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
# make sure benches don't bit-rot
- name: build benches & examples
run: cargo build --benches --examples --release
- name: cargo test
run: |
cargo nextest run --release --profile ci
- name: Doctests
run: |
cargo test --doc
check-lurk-compiles:
if: github.event_name == 'pull_request'
runs-on: [ubuntu-latest]
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/bellpepper
- uses: actions/checkout@v4
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/grumpkin-msm']" >> Cargo.toml
echo "grumpkin-msm = { path='../grumpkin-msm' }" >> Cargo.toml
- name: Check Lurk-rs types don't break spectacularly
working-directory: ${{ github.workspace }}/lurk
run: cargo check --all --tests --benches --examples
# Wasm build, rustfmt, clippy, doctests, and MSRV
code-quality:
uses: lurk-lab/ci-workflows/.github/workflows/lints.yml@main
# Check documentation links aren't broken
link-checker:
uses: lurk-lab/ci-workflows/.github/workflows/links-check.yml@main
with:
fail-fast: true
# Lint dependencies for licensing and auditing issues as per https://github.com/lurk-lab/bellpepper/blob/main/deny.toml
licenses-audits:
uses: lurk-lab/ci-workflows/.github/workflows/licenses-audits.yml@main