-
Notifications
You must be signed in to change notification settings - Fork 186
116 lines (111 loc) · 4.22 KB
/
workspace.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
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
113
114
115
116
name: Workspace
on:
push:
branches: master
pull_request:
branches: master
permissions:
contents: read
jobs:
clippy:
name: Clippy
runs-on: ubuntu-24.04
env:
RUSTFLAGS: "-Dwarnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
# We need Nightly for -Zbuild-std.
# Fixed Nigthly version is used to prevent
# CI failures which are not relevant to PR changes
# on introduction of new Clippy lints.
toolchain: nightly-2024-10-08
components: clippy,rust-src
- name: std feature
run: cargo clippy --features std
- name: custom backend
env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="custom"
run: cargo clippy -Zbuild-std=core --target riscv32i-unknown-none-elf
- name: iOS (apple-other.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-apple-ios
- name: ESP-IDF (espidf.rs)
env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="esp_idf"
run: cargo clippy -Zbuild-std=core --target riscv32imc-esp-espidf
- name: Fuchsia (fuchsia.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-unknown-fuchsia
- name: OpenBSD (getentropy.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-unknown-openbsd
- name: FreeBSD (getrandom.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-unknown-freebsd
- name: Hermit (hermit.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-unknown-hermit
- name: Web WASM (wasm_js.rs)
env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="wasm_js"
run: cargo clippy -Zbuild-std --target wasm32-unknown-unknown
- name: Web WASM with atomics (wasm_js.rs)
env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="wasm_js" -Ctarget-feature=+atomics,+bulk-memory
run: cargo clippy -Zbuild-std --target wasm32-unknown-unknown
- name: Linux (linux_android.rs)
env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_getrandom"
run: cargo clippy --target x86_64-unknown-linux-gnu
- name: Linux (linux_raw.rs)
env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_raw"
run: cargo clippy --target x86_64-unknown-linux-gnu
- name: Linux (linux_android_with_fallback.rs)
run: cargo clippy --target x86_64-unknown-linux-gnu
- name: NetBSD (netbsd.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-unknown-netbsd
- name: Fortranix SGX (rdrand.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-fortanix-unknown-sgx
- name: RNDR (rndr.rs)
env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="rndr"
run: cargo clippy -Zbuild-std=core --target aarch64-unknown-linux-gnu
- name: Solaris (solaris.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-pc-solaris
- name: SOLID (solid.rs)
run: cargo clippy -Zbuild-std=core --target aarch64-kmc-solid_asp3
- name: Redox (use_file.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-unknown-redox
- name: VxWorks (vxworks.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-wrs-vxworks
- name: WASI preview 1 (wasi.rs)
run: cargo clippy -Zbuild-std=core --target wasm32-wasip1
- name: WASI preview 2 (wasi.rs)
run: cargo clippy -Zbuild-std=core,alloc --target wasm32-wasip2
- name: Windows 7 (windows7.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-win7-windows-msvc
- name: Windows (windows.rs)
run: cargo clippy -Zbuild-std=core --target x86_64-pc-windows-msvc
fmt:
name: rustfmt
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: fmt
run: cargo fmt --all -- --check
check-doc:
name: rustdoc
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
# We need Nightly for doc_auto_cfg
toolchain: nightly-2024-09-04
- uses: Swatinem/rust-cache@v2
- name: Generate Docs
env:
RUSTDOCFLAGS: "-Dwarnings --cfg docsrs"
run: cargo doc --no-deps --features std