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
127v := " 0"
138verbose := 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
1921clean :
@@ -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
5456build-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
5860build-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
115159fmt :
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
151212clippy-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
165236test : test-cargo test-qemu
0 commit comments