-
Notifications
You must be signed in to change notification settings - Fork 23
112 lines (84 loc) · 2.9 KB
/
quality.yml
File metadata and controls
112 lines (84 loc) · 2.9 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Code Quality Checks
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
quality:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
cache: true
- name: Build workspace
run: cargo build --workspace --verbose
- name: Build workspace with all features
run: cargo build --workspace --verbose --all-features
- name: Check workspace
run: cargo check --workspace --verbose --all-features
- name: Install nightly toolchain
run: rustup toolchain install nightly --component rustfmt
- name: Formatting
run: cargo +nightly fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check advisories
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories
continue-on-error: true
- name: Check bans, licenses, and sources
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check bans licenses sources
no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
- name: Check varsig (no default features)
run: cargo check -p varsig --no-default-features
- name: Check varsig (no_std + dag_cbor + ed25519)
run: cargo check -p varsig --no-default-features --features dag_cbor,ed25519
- name: Check ucan (no default features)
run: cargo check -p ucan --no-default-features
# NOTE: Real embedded target (thumbv6m-none-eabi) is blocked by
# upstream `cid` crate pulling in serde_bytes with default features,
# which activates serde/std transitively.
# Uncomment once cid adds default-features = false on serde_bytes.
# - name: Install thumbv6m target
# run: rustup target add thumbv6m-none-eabi
# - name: Check varsig on thumbv6m
# run: cargo check -p varsig --no-default-features --target thumbv6m-none-eabi
# - name: Check ucan on thumbv6m
# run: cargo check -p ucan --no-default-features --target thumbv6m-none-eabi
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSRV toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: "1.90"
cache: true
- name: Check MSRV
run: cargo check --workspace