name: build
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Lint
run: .dev/rs-lint
- name: Test
run: make rs-test
- name: Benchmarks
run: cargo bench --bench arithmetic -- --test
- name: Docs
env:
RUSTDOCFLAGS: -Dwarnings
run: make docs