-
Notifications
You must be signed in to change notification settings - Fork 64
65 lines (63 loc) · 2.03 KB
/
build.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: build
on: pull_request
jobs:
cargo-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable rust
run: rustup update stable
- name: Check formatting with cargofmt
run: cargo fmt --all -- --check --config imports_granularity=Crate
clippy:
runs-on: ubuntu-latest
needs: cargo-fmt
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable rust
run: rustup update stable
- name: Lint code for quality and style with Clippy
run: cargo clippy --workspace --tests --all-features -- -D warnings
release-tests-ubuntu:
runs-on: ubuntu-latest
needs: cargo-fmt
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable rust
run: rustup update stable
- name: Run tests in release
run: cargo test --all --release
test-all-features:
runs-on: ubuntu-latest
container:
image: rust
needs: cargo-fmt
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable rust
run: rustup update stable
- name: Run tests in release
run: cargo test --all --release --all-features
check-rustdoc-links:
name: Check rustdoc intra-doc links
runs-on: ubuntu-latest
container:
image: rust
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable rust
run: rustup update stable
- name: Check rustdoc links
run: RUSTDOCFLAGS="--deny broken_intra_doc_links" cargo doc --verbose --workspace --no-deps --document-private-items
cargo-udeps:
name: cargo-udeps
runs-on: ubuntu-latest
needs: cargo-fmt
steps:
- uses: actions/checkout@v4
- name: Install Rust nightly
run: rustup toolchain install nightly
- name: Install cargo-udeps
run: cargo install cargo-udeps --locked --force
- name: Run cargo udeps to identify unused crates in the dependency graph
run: cargo +nightly udeps --tests --all-targets --release