Repository navigation
81 lines (62 loc) · 1.94 KB
/
Copy pathci.yml
File metadata and controls
81 lines (62 loc) · 1.94 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test ${{ matrix.os }} / ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, beta, nightly]
steps:
- uses: actions/checkout@v7
- name: Install Rust ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- name: Cargo build
run: cargo build --verbose
- name: Cargo build (no default features)
run: cargo build --no-default-features --verbose
- name: Cargo build (alloc only)
run: cargo build --no-default-features --features alloc --verbose
- name: Cargo test
run: cargo test --verbose
- name: Cargo test (no default features)
run: cargo test --no-default-features --verbose
- name: Cargo test (all features)
run: cargo test --all-features --verbose
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cargo fmt check
run: cargo fmt --all -- --check
- name: Cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Cargo clippy (no default features)
run: cargo clippy --no-default-features -- -D warnings
doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cargo doc
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links"