-
-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (50 loc) · 1.33 KB
/
rust.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
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: '10 14 * * 6'
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --deny warnings
RUSTDOCFLAGS: --deny warnings
jobs:
build:
runs-on: ubuntu-latest
# https://doc.rust-lang.org/cargo/guide/continuous-integration.html
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- '1.74.1' # 2023-12-07, meant to be about 1 year ago
- beta
- nightly
steps:
- uses: actions/checkout@v4
- name: setup ${{ matrix.toolchain }}
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: cargo version
run: cargo --version
- name: Install tools
run: |
rustup component add clippy rustfmt
cargo install cargo-expand
cargo install cargo-bloat
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose --locked --all --all-features
- name: Run clippy
run: cargo clippy --all-targets --locked --all
- name: Check formatting
run: cargo fmt -- --check
- name: Document
run: cargo doc --verbose
- name: cargo expand
run: cargo expand --lib | wc
- name: cargo bloat
run: cargo bloat --release