1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: ci
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Lint, build, test, and build benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: rustup component add clippy rustfmt
- run: cargo fmt --all --check
- run: cargo clippy --all-targets --all-features
- run: cargo build
# simple_rooted_tree is optional, so the crate must build without it.
# Nothing else here turns it off: build uses defaults and clippy uses
# --all-features, so both leave it on.
- run: cargo check --no-default-features
- run: cargo test
- run: cargo bench --no-run
msrv:
name: Check MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Keep in step with rust-version in Cargo.toml. `check` rather than
# `test`: rust-version is a promise to consumers, who build the library
# but never compile the dev-dependencies.
#
# Deliberately no lockfile: resolving fresh is what a new consumer gets,
# and it is the only way this job can catch a dependency raising our
# effective MSRV. vers-vecs declares no rust-version, so cargo's
# MSRV-aware resolver cannot filter it and it floats to the newest 1.x.
- run: rustup toolchain install 1.87 --profile minimal && rustup default 1.87
- run: cargo check --all-features