-
Notifications
You must be signed in to change notification settings - Fork 358
98 lines (89 loc) · 2.21 KB
/
build_rust.yml
File metadata and controls
98 lines (89 loc) · 2.21 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: rust CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy,rustfmt
- run: cargo clippy --all-targets -- -D warnings
- run: cargo fmt -- --check
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- run: cargo build --verbose --release
test:
name: Test
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macOS-latest
toolchain:
- stable
- nightly
runs-on: ${{ matrix.os }}
needs: [compile]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
- name: Run integration tests
run: |
cargo build --verbose
cargo test --verbose
env:
BEAR_TEST_VERBOSE: 1
doc:
name: Generate Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- run: cargo doc --no-deps
spellcheck:
name: Spell Check Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Codespell
run: pip install codespell
- name: Run Codespell
run: codespell
copyright:
name: Generate Copyright Notes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Cargo License
run: cargo install cargo-license
- name: Generate License Report
run: cargo license
security-audit:
name: Security Audit
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v6
- name: Install Cargo Audit
run: cargo install cargo-audit
- name: Run Cargo Audit
run: cargo audit