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
name: CI
on:
push:
branches:
pull_request:
branches:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Quality Gate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# Honour rust-toolchain.toml: installs the pinned channel (1.95.0)
# with declared components and targets.
- name: Install Rust toolchain (from rust-toolchain.toml)
run: rustup show
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all --check
- name: Clippy (all targets, all features)
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test (default features)
run: cargo test
- name: Test (no default features)
run: cargo test --no-default-features
- name: Doc
run: cargo doc --no-deps --all-features
- name: Deny
uses: EmbarkStudios/cargo-deny-action@v2
wasm:
name: WASM build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Rust toolchain (from rust-toolchain.toml)
run: rustup show
- uses: Swatinem/rust-cache@v2
- name: Build for wasm32-unknown-unknown
run: cargo build --target wasm32-unknown-unknown --release
no-std:
name: no_std build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# rust-toolchain.toml declares targets = [..., "thumbv7em-none-eabi"];
# thumbv7em-none-eabi has no `std` at all, so a successful build is a
# proof the crate is genuinely no_std.
- name: Install Rust toolchain (from rust-toolchain.toml)
run: rustup show
- uses: Swatinem/rust-cache@v2
- name: Build for thumbv7em-none-eabi (no default features)
run: cargo build --target thumbv7em-none-eabi --no-default-features
- name: Build for thumbv7em-none-eabi (with mic-registry)
run: cargo build --target thumbv7em-none-eabi