Skip to content

Commit bdb2e8c

Browse files
authored
Merge pull request #197 from thejpster/clean-up-ci
Clean up CI
2 parents d3d4be2 + b567a49 commit bdb2e8c

10 files changed

Lines changed: 246 additions & 402 deletions

File tree

.github/workflows/build.yml

Lines changed: 134 additions & 345 deletions
Large diffs are not rendered by default.

aarch32-cpu/src/register/dfsr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub enum DfsrStatus {
134134
Debug = 0b00010,
135135
/// Access Flag fault on Section
136136
AccessFlagFaultFirstLevel = 0b00011,
137-
/// Cache maintenance operation fault[2]
137+
/// Cache maintenance operation fault
138138
CacheMaintenance = 0b00100,
139139
/// Translation fault on Section
140140
TranslationFaultFirstLevel = 0b00101,

aarch32-rt-macros/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ version = "0.3.0"
1616

1717
[lib]
1818
proc-macro = true
19+
doc = false
1920

2021
[dependencies]
2122
quote = "1.0"

aarch32-rt/src/sections.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ impl Section {
120120
}
121121
}
122122

123-
/// Iterator over all the [`Region`] variants
123+
/// Iterator over all the [`Section`] variants
124124
pub struct SectionIter {
125125
next: Option<Section>,
126126
}
127127

128128
impl SectionIter {
129-
/// Create a new [`RegionIter`]
129+
/// Create a new [`SectionIter`]
130130
pub fn new() -> Self {
131131
Self {
132132
next: Some(Section::VectorTable),

arm-targets/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,18 @@ impl TargetInfo {
143143
println!(r#"cargo:rustc-cfg=armv7_or_lower"#);
144144
println!(r#"cargo:rustc-cfg=armv8_or_lower"#);
145145
}
146-
Arch::Armv8R | Arch::Armv8A => {
146+
Arch::Armv8R | Arch::Armv8A
147+
if self.isa() == Some(Isa::A32) || self.isa() == Some(Isa::T32) =>
148+
{
147149
println!(r#"cargo:rustc-cfg=armv4t_or_higher"#);
148150
println!(r#"cargo:rustc-cfg=armv5te_or_higher"#);
149151
println!(r#"cargo:rustc-cfg=armv6_or_higher"#);
150152
println!(r#"cargo:rustc-cfg=armv7_or_higher"#);
151153
println!(r#"cargo:rustc-cfg=armv8_or_higher"#);
152154
println!(r#"cargo:rustc-cfg=armv8_or_lower"#);
153155
}
154-
Arch::Armv7M | Arch::Armv7EM | Arch::Armv8MBase | Arch::Armv8MMain => {
155-
// don't claim M-profile architectures are compatible with full Armv7 or similar
156+
_ => {
157+
// don't claim M-profile or AArch64 architectures are compatible with full Armv7 or similar
156158
}
157159
}
158160
}

examples/mps3-an536-el2/rust-toolchain.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/mps3-an536-smp/rust-toolchain.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/mps3-an536/rust-toolchain.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

justfile

Lines changed: 97 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
# You need to install `just` from https://github.com/casey/just to use
44
# this file
55

6-
# We only need this for some targets but we set it globally to avoid
7-
# dependencies like proc-macro2 from being rebuilt
8-
export RUSTC_BOOTSTRAP := "1"
9-
10-
116
# If you run with `just --set v 1` then we make cargo run in verbose mode
127
v := "0"
138
verbose := if v == "1" { "--verbose" } else { "" }
149

1510
# Our default target. It does everything that you might want to do pre-checkin.
16-
check: build-all build-all-examples fmt-check clippy-examples clippy-targets clippy-host test
11+
check: build-all build-all-examples doc-all fmt-check clippy-all test
12+
13+
github_info:
14+
echo 'msrv_targets=["armv7a-none-eabi","armv7r-none-eabi","armv7r-none-eabihf"]'
15+
echo 'stable_targets=["armv7a-none-eabi","armv7a-none-eabihf","armv7r-none-eabi","armv7r-none-eabihf","armv8r-none-eabihf"]'
16+
echo 'nightly_tier2_targets=["armv7r-none-eabi","thumbv7r-none-eabi","armv7r-none-eabihf","thumbv7r-none-eabihf","armv7a-none-eabi","thumbv7a-none-eabi","armv7a-none-eabihf","thumbv7a-none-eabihf","armv8r-none-eabihf","thumbv8r-none-eabihf"]'
17+
echo 'nightly_tier3_targets=["armv6-none-eabi","thumbv6-none-eabi","armv6-none-eabihf"]'
18+
echo 'nightly_tier3_noatomic_targets=["armv4t-none-eabi","thumbv4t-none-eabi","armv5te-none-eabi","thumbv5te-none-eabi"]'
1719

1820
# Cleans up all the target folders
1921
clean:
@@ -36,9 +38,9 @@ build-all: \
3638
(build-tier3-no-atomics "thumbv4t-none-eabi") \
3739
(build-tier3-no-atomics "armv5te-none-eabi") \
3840
(build-tier3-no-atomics "thumbv5te-none-eabi") \
39-
(build-tier3-no-atomics "armv6-none-eabi") \
40-
(build-tier3-no-atomics "thumbv6-none-eabi") \
41-
(build-tier3-no-atomics "armv6-none-eabihf") \
41+
(build-tier3 "armv6-none-eabi") \
42+
(build-tier3 "thumbv6-none-eabi") \
43+
(build-tier3 "armv6-none-eabihf") \
4244
(build-tier2 "armv7r-none-eabi") \
4345
(build-tier2 "thumbv7r-none-eabi") \
4446
(build-tier2 "armv7r-none-eabihf") \
@@ -52,7 +54,7 @@ build-all: \
5254

5355
# Build the arm-targets library
5456
build-arm-targets:
55-
cd arm-targets && cargo build {{verbose}}
57+
cd arm-targets && cargo build {{verbose}}
5658

5759
# Builds our workspace with various features, building core from source, but skipping anything that requires atomics
5860
build-tier3-no-atomics target:
@@ -111,6 +113,48 @@ build-mps3-tier2 target:
111113
cd examples/mps3-an536-smp && cargo build --target={{target}} {{verbose}}
112114
cd examples/mps3-an536-el2 && cargo build --target={{target}} {{verbose}}
113115

116+
# Documents our workspace for all targets
117+
doc-all: \
118+
doc-arm-targets \
119+
(doc-tier3-no-atomics "armv4t-none-eabi") \
120+
(doc-tier3-no-atomics "thumbv4t-none-eabi") \
121+
(doc-tier3-no-atomics "armv5te-none-eabi") \
122+
(doc-tier3-no-atomics "thumbv5te-none-eabi") \
123+
(doc-tier3 "armv6-none-eabi") \
124+
(doc-tier3 "thumbv6-none-eabi") \
125+
(doc-tier3 "armv6-none-eabihf") \
126+
(doc-tier2 "armv7r-none-eabi") \
127+
(doc-tier2 "thumbv7r-none-eabi") \
128+
(doc-tier2 "armv7r-none-eabihf") \
129+
(doc-tier2 "thumbv7r-none-eabihf") \
130+
(doc-tier2 "armv7a-none-eabi") \
131+
(doc-tier2 "thumbv7a-none-eabi") \
132+
(doc-tier2 "armv7a-none-eabihf") \
133+
(doc-tier2 "thumbv7a-none-eabihf") \
134+
(doc-tier2 "armv8r-none-eabihf") \
135+
(doc-tier2 "thumbv8r-none-eabihf") \
136+
137+
# Document the arm-targets library
138+
doc-arm-targets:
139+
cd arm-targets && RUSTDOCFLAGS=-Dwarnings cargo doc {{verbose}}
140+
141+
# Documents our workspace with various features, building core from source, but skipping anything that requires atomics
142+
doc-tier3-no-atomics target:
143+
RUSTDOCFLAGS=-Dwarnings cargo doc --target {{target}} -Zbuild-std=core {{verbose}}
144+
RUSTDOCFLAGS=-Dwarnings cargo doc --target {{target}} -Zbuild-std=core --features "serde, defmt, critical-section-single-core, check-asm" {{verbose}}
145+
146+
# Documents our workspace with various features, building core from source
147+
doc-tier3 target:
148+
RUSTDOCFLAGS=-Dwarnings cargo doc --target {{target}} -Zbuild-std=core {{verbose}}
149+
RUSTDOCFLAGS=-Dwarnings cargo doc --target {{target}} -Zbuild-std=core --features "serde, defmt, critical-section-multi-core, check-asm" {{verbose}}
150+
RUSTDOCFLAGS=-Dwarnings cargo doc --target {{target}} -Zbuild-std=core --features "serde, defmt, critical-section-single-core, check-asm" {{verbose}}
151+
152+
# Documents our workspace with various features
153+
doc-tier2 target:
154+
RUSTDOCFLAGS=-Dwarnings cargo doc --target {{target}} {{verbose}}
155+
RUSTDOCFLAGS=-Dwarnings cargo doc --target {{target}} --features "serde, defmt, critical-section-multi-core, check-asm" {{verbose}}
156+
RUSTDOCFLAGS=-Dwarnings cargo doc --target {{target}} --features "serde, defmt, critical-section-single-core, check-asm" {{verbose}}
157+
114158
# Formats all the code
115159
fmt:
116160
# The cross-compiled workspace
@@ -136,16 +180,33 @@ fmt-check:
136180
cd examples/mps3-an536-el2 && cargo fmt --check {{verbose}}
137181

138182
# Checks all the cross-compiled workspace passes the clippy lints
139-
clippy-targets: \
140-
(clippy-target "armv7r-none-eabi") \
141-
(clippy-target "armv7r-none-eabihf") \
142-
(clippy-target "armv7a-none-eabi") \
143-
(clippy-target "armv7a-none-eabihf") \
144-
(clippy-target "armv8r-none-eabihf") \
145-
146-
# Checks all the cross-compiled workspace passes the clippy lints
147-
clippy-target target:
148-
cargo clippy --target={{target}} {{verbose}}
183+
clippy-all: \
184+
clippy-arm-targets \
185+
clippy-examples \
186+
(clippy-tier3-no-atomics "armv4t-none-eabi") \
187+
(clippy-tier3-no-atomics "thumbv4t-none-eabi") \
188+
(clippy-tier3-no-atomics "armv5te-none-eabi") \
189+
(clippy-tier3-no-atomics "thumbv5te-none-eabi") \
190+
(clippy-tier3 "armv6-none-eabi") \
191+
(clippy-tier3 "thumbv6-none-eabi") \
192+
(clippy-tier3 "armv6-none-eabihf") \
193+
(clippy-tier2 "armv7r-none-eabi") \
194+
(clippy-tier2 "thumbv7r-none-eabi") \
195+
(clippy-tier2 "armv7r-none-eabihf") \
196+
(clippy-tier2 "thumbv7r-none-eabihf") \
197+
(clippy-tier2 "armv7a-none-eabi") \
198+
(clippy-tier2 "thumbv7a-none-eabi") \
199+
(clippy-tier2 "armv7a-none-eabihf") \
200+
(clippy-tier2 "thumbv7a-none-eabihf") \
201+
(clippy-tier2 "armv8r-none-eabihf") \
202+
(clippy-tier2 "thumbv8r-none-eabihf") \
203+
204+
# Checks the arm-targets code passes the clippy lints
205+
clippy-arm-targets:
206+
# The cross-compiled workspace
207+
cargo clippy {{verbose}}
208+
# The host-compiled helper library
209+
cd arm-targets && cargo clippy {{verbose}}
149210

150211
# Checks the examples pass the clippy lints
151212
clippy-examples:
@@ -154,12 +215,22 @@ clippy-examples:
154215
cd examples/mps3-an536-smp && cargo clippy --target=armv8r-none-eabihf {{verbose}}
155216
cd examples/mps3-an536-el2 && cargo clippy --target=armv8r-none-eabihf {{verbose}}
156217

157-
# Checks the host code passes the clippy lints
158-
clippy-host:
159-
# The cross-compiled workspace
160-
cargo clippy {{verbose}}
161-
# The host-compiled helper library
162-
cd arm-targets && cargo clippy {{verbose}}
218+
# Checks all the cross-compiled workspace passes the clippy lints
219+
clippy-tier3-no-atomics target:
220+
cargo clippy --target {{target}} -Zbuild-std=core {{verbose}}
221+
cargo clippy --target {{target}} -Zbuild-std=core --features "serde, defmt, critical-section-single-core, check-asm" {{verbose}}
222+
223+
# Checks all the cross-compiled workspace passes the clippy lints
224+
clippy-tier3 target:
225+
cargo clippy --target {{target}} -Zbuild-std=core {{verbose}}
226+
cargo clippy --target {{target}} -Zbuild-std=core --features "serde, defmt, critical-section-multi-core, check-asm" {{verbose}}
227+
cargo clippy --target {{target}} -Zbuild-std=core --features "serde, defmt, critical-section-single-core, check-asm" {{verbose}}
228+
229+
# Checks all the cross-compiled workspace passes the clippy lints
230+
clippy-tier2 target:
231+
cargo build --target {{target}} {{verbose}}
232+
cargo build --target {{target}} --features "serde, defmt, critical-section-multi-core, check-asm" {{verbose}}
233+
cargo build --target {{target}} --features "serde, defmt, critical-section-single-core, check-asm" {{verbose}}
163234

164235
# Run all the tests
165236
test: test-cargo test-qemu
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
[toolchain]
22
channel = "nightly-2026-06-04"
33
targets = [
4-
"armv7r-none-eabi",
5-
"armv7r-none-eabihf",
64
"armv7a-none-eabi",
75
"armv7a-none-eabihf",
8-
"thumbv7r-none-eabi",
9-
"thumbv7r-none-eabihf",
6+
"armv7r-none-eabi",
7+
"armv7r-none-eabihf",
8+
"armv8r-none-eabihf",
109
"thumbv7a-none-eabi",
1110
"thumbv7a-none-eabihf",
11+
"thumbv7r-none-eabi",
12+
"thumbv7r-none-eabihf",
13+
"thumbv8r-none-eabihf",
1214
]
1315
components = ["rust-src", "clippy", "rustfmt"]

0 commit comments

Comments
 (0)