Merge pull request #4693 from embassy-rs/janitor

ci: add cargo manifest check
This commit is contained in:
Dario Nieuwenhuis 2025-09-21 23:01:13 +00:00 committed by GitHub
commit 0eaf5bc1ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 94 additions and 76 deletions

View File

@ -23,7 +23,7 @@ fi
hashtime restore /ci/cache/filetime.json || true
hashtime save /ci/cache/filetime.json
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 280829ad163f1444999468a57d28fb7c412babbe
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79
./ci-nightly.sh

View File

@ -25,7 +25,7 @@ fi
hashtime restore /ci/cache/filetime.json || true
hashtime save /ci/cache/filetime.json
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 280829ad163f1444999468a57d28fb7c412babbe
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79
./ci-xtensa.sh

2
.github/ci/build.sh vendored
View File

@ -28,7 +28,7 @@ fi
hashtime restore /ci/cache/filetime.json || true
hashtime save /ci/cache/filetime.json
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 280829ad163f1444999468a57d28fb7c412babbe
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79
./ci.sh

17
.github/ci/crlf.sh vendored
View File

@ -1,17 +0,0 @@
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
FILES_WITH_CRLF=$(find ! -path "./.git/*" -not -type d | xargs file -N | (grep " CRLF " || true))
if [ -z "$FILES_WITH_CRLF" ]; then
echo -e "No files with CRLF endings found."
exit 0
else
NR_FILES=$(echo "$FILES_WITH_CRLF" | wc -l)
echo -e "ERROR: Found ${NR_FILES} files with CRLF endings."
echo "$FILES_WITH_CRLF"
exit "$NR_FILES"
fi

54
.github/ci/doc.sh vendored
View File

@ -9,62 +9,14 @@ set -euxo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
export BUILDER_THREADS=4
export BUILDER_COMPRESS=true
export PATH=$CARGO_HOME/bin:$PATH
mv rust-toolchain-nightly.toml rust-toolchain.toml
# force rustup to download the toolchain before starting building.
# Otherwise, the docs builder is running multiple instances of cargo rustdoc concurrently.
# They all see the toolchain is not installed and try to install it in parallel
# which makes rustup very sad
rustc --version > /dev/null
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79
docserver build -i ./embassy-boot -o webroot/crates/embassy-boot/git.zup
docserver build -i ./embassy-boot-nrf -o webroot/crates/embassy-boot-nrf/git.zup
docserver build -i ./embassy-boot-rp -o webroot/crates/embassy-boot-rp/git.zup
docserver build -i ./embassy-boot-stm32 -o webroot/crates/embassy-boot-stm32/git.zup
docserver build -i ./embassy-embedded-hal -o webroot/crates/embassy-embedded-hal/git.zup
docserver build -i ./embassy-executor -o webroot/crates/embassy-executor/git.zup
docserver build -i ./embassy-futures -o webroot/crates/embassy-futures/git.zup
docserver build -i ./embassy-nrf -o webroot/crates/embassy-nrf/git.zup
docserver build -i ./embassy-rp -o webroot/crates/embassy-rp/git.zup
docserver build -i ./embassy-mspm0 -o webroot/crates/embassy-mspm0/git.zup
docserver build -i ./embassy-nxp -o webroot/crates/embassy-nxp/git.zup
docserver build -i ./embassy-sync -o webroot/crates/embassy-sync/git.zup
docserver build -i ./cyw43 -o webroot/crates/cyw43/git.zup
docserver build -i ./cyw43-pio -o webroot/crates/cyw43-pio/git.zup
docserver build -i ./embassy-stm32-wpan -o webroot/crates/embassy-stm32-wpan/git.zup --output-static webroot/static
docserver build -i ./embassy-time -o webroot/crates/embassy-time/git.zup
docserver build -i ./embassy-time-driver -o webroot/crates/embassy-time-driver/git.zup
docserver build -i ./embassy-time-queue-utils -o webroot/crates/embassy-time-queue-utils/git.zup
docserver build -i ./embassy-usb -o webroot/crates/embassy-usb/git.zup
docserver build -i ./embassy-usb-dfu -o webroot/crates/embassy-usb-dfu/git.zup
docserver build -i ./embassy-usb-driver -o webroot/crates/embassy-usb-driver/git.zup
docserver build -i ./embassy-usb-logger -o webroot/crates/embassy-usb-logger/git.zup
docserver build -i ./embassy-usb-synopsys-otg -o webroot/crates/embassy-usb-synopsys-otg/git.zup
docserver build -i ./embassy-net -o webroot/crates/embassy-net/git.zup
docserver build -i ./embassy-net-nrf91 -o webroot/crates/embassy-net-nrf91/git.zup
docserver build -i ./embassy-net-driver -o webroot/crates/embassy-net-driver/git.zup
docserver build -i ./embassy-net-driver-channel -o webroot/crates/embassy-net-driver-channel/git.zup
docserver build -i ./embassy-net-wiznet -o webroot/crates/embassy-net-wiznet/git.zup
docserver build -i ./embassy-net-ppp -o webroot/crates/embassy-net-ppp/git.zup
docserver build -i ./embassy-net-tuntap -o webroot/crates/embassy-net-tuntap/git.zup
docserver build -i ./embassy-net-enc28j60 -o webroot/crates/embassy-net-enc28j60/git.zup
docserver build -i ./embassy-net-esp-hosted -o webroot/crates/embassy-net-esp-hosted/git.zup
docserver build -i ./embassy-net-adin1110 -o webroot/crates/embassy-net-adin1110/git.zup
cargo embassy-devtool doc -o webroot
export KUBECONFIG=/ci/secrets/kubeconfig.yml
POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name})
kubectl cp webroot/crates $POD:/data
kubectl cp webroot/static $POD:/data
# build and upload stm32 last
# so that it doesn't prevent other crates from getting docs updates when it breaks.
rm -rf webroot
docserver build -i ./embassy-stm32 -o webroot/crates/embassy-stm32/git.zup
POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name})
kubectl cp webroot/crates $POD:/data

15
.github/ci/janitor.sh vendored Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
export PATH=$CARGO_HOME/bin:$PATH
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79
cargo embassy-devtool check-crlf
cargo embassy-devtool check-manifest

View File

@ -15,6 +15,9 @@ embassy-rp = { version = "0.8.0", path = "../embassy-rp" }
fixed = "1.23.1"
defmt = { version = "1.0.1", optional = true }
[features]
defmt = ["dep:defmt"]
[package.metadata.embassy]
build = [
{target = "thumbv6m-none-eabi", features = ["embassy-rp/rp2040"]},

View File

@ -52,6 +52,7 @@ defmt = [
"embassy-boot/defmt",
"embassy-nrf/defmt",
]
log = ["dep:log"]
softdevice = [
"nrf-softdevice-mbr",
"dep:nrf-softdevice-mbr",
]

View File

@ -45,6 +45,8 @@ critical-section = { version = "1.1.1", features = ["std"] }
ed25519-dalek = { version = "2", default-features = false, features = ["std", "rand_core", "digest"] }
[features]
defmt = ["dep:defmt"]
log = ["dep:log"]
ed25519-dalek = ["dep:ed25519-dalek", "_verify"]
ed25519-salty = ["dep:salty", "_verify"]
flash-erase-zero = []

View File

@ -25,6 +25,7 @@ src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-embed
target = "x86_64-unknown-linux-gnu"
[features]
defmt = ["dep:defmt"]
time = ["dep:embassy-time"]
[dependencies]

View File

@ -123,6 +123,12 @@ rustversion = "1.0.21"
## Enable nightly-only features
nightly = ["embassy-executor-macros/nightly"]
## Enable defmt logging
defmt = ["dep:defmt"]
## Enable log logging
log = ["dep:log"]
# Enables turbo wakers, which requires patching core. Not surfaced in the docs by default due to
# being an complicated advanced and undocumented feature.
# See: https://github.com/embassy-rs/embassy/pull/1263

View File

@ -26,3 +26,7 @@ features = ["defmt"]
[dependencies]
defmt = { version = "1.0.1", optional = true }
log = { version = "0.4.14", optional = true }
[features]
defmt = ["dep:defmt"]
log = ["dep:log"]

View File

@ -14,6 +14,9 @@ categories = [
[features]
defmt = ["dep:defmt"]
log = ["dep:log"]
# Define the number of NVIC priority bits.
prio-bits-0 = []
prio-bits-1 = []

View File

@ -2,7 +2,7 @@
name = "embassy-imxrt"
version = "0.1.0"
edition = "2021"
license = "MIT"
license = "MIT OR Apache-2.0"
description = "Embassy Hardware Abstraction Layer (HAL) for the IMXRT microcontroller"
keywords = ["embedded", "async", "imxrt", "rt600", "embedded-hal"]
categories = ["embedded", "hardware-support", "no-std", "asynchronous"]

View File

@ -28,3 +28,7 @@ log = { version = "0.4.14", optional = true }
embassy-sync = { version = "0.7.2", path = "../embassy-sync" }
embassy-futures = { version = "0.1.2", path = "../embassy-futures" }
embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" }
[features]
defmt = ["dep:defmt"]
log = ["dep:log"]

View File

@ -23,3 +23,6 @@ features = ["defmt"]
[dependencies]
defmt = { version = "1.0.1", optional = true }
[features]
defmt = ["dep:defmt"]

View File

@ -19,6 +19,10 @@ embassy-futures = { version = "0.1.2", path = "../embassy-futures" }
defmt = { version = "1.0.1", optional = true }
log = { version = "0.4.14", optional = true }
[features]
defmt = ["dep:defmt", "embassy-net-driver/defmt"]
log = ["dep:log"]
[package.metadata.embassy_docs]
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-enc28j60-v$VERSION/embassy-net-enc28j60/src/"
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net-enc28j60/src/"

View File

@ -17,6 +17,9 @@ embassy-time = { version = "0.5.0", path = "../embassy-time" }
embassy-futures = { version = "0.1.2", path = "../embassy-futures" }
defmt = { version = "1.0.1", optional = true }
[features]
defmt = ["dep:defmt", "embassy-net-driver-channel/defmt"]
[package.metadata.embassy_docs]
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-wiznet-v$VERSION/embassy-net-wiznet/src/"
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net-wiznet/src/"

View File

@ -53,6 +53,8 @@ features = ["defmt", "tcp", "udp", "raw", "dns", "icmp", "dhcpv4", "proto-ipv6",
[features]
## Enable defmt
defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt", "embassy-time/defmt", "heapless/defmt-03", "defmt?/ip_in_core"]
## Enable log
log = ["dep:log"]
## Trace all raw received and transmitted packets using defmt or log.
packet-trace = []

View File

@ -66,6 +66,8 @@ time = ["dep:embassy-time", "embassy-embedded-hal/time"]
## Enable defmt
defmt = ["dep:defmt", "embassy-hal-internal/defmt", "embassy-sync/defmt", "embassy-usb-driver/defmt", "embassy-embedded-hal/defmt"]
## Enable log
log = ["dep:log"]
## Reexport the PAC for the currently enabled chip at `embassy_nrf::pac` (unstable)
unstable-pac = []

View File

@ -2,6 +2,7 @@
name = "embassy-nxp"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
publish = false

View File

@ -45,6 +45,10 @@ rt = [ "rp-pac/rt" ]
## Enable [defmt support](https://docs.rs/defmt) and enables `defmt` debug-log messages and formatting in embassy drivers.
defmt = ["dep:defmt", "embassy-usb-driver/defmt", "embassy-hal-internal/defmt"]
## Enable log support
log = ["dep:log"]
## Enable chrono support
chrono = ["dep:chrono"]
## Configure the [`critical-section`](https://docs.rs/critical-section) crate to use an implementation that is safe for multicore use on rp2040.
critical-section-impl = ["critical-section/restore-state-u8"]

View File

@ -225,6 +225,10 @@ defmt = [
"embassy-usb-synopsys-otg/defmt",
"stm32-metapac/defmt"
]
## Use log for logging
log = ["dep:log"]
## Enable chrono support
chrono = ["dep:chrono"]
exti = []
low-power = [ "dep:embassy-executor", "embassy-executor?/arch-cortex-m", "time" ]

View File

@ -27,6 +27,8 @@ src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-sync/
target = "thumbv7em-none-eabi"
[features]
defmt = ["dep:defmt"]
log = ["dep:log"]
std = []
turbowakers = []

View File

@ -31,6 +31,11 @@ target = "x86_64-unknown-linux-gnu"
features = ["defmt", "std"]
[features]
## Enable defmt
defmt = ["dep:defmt"]
## Enable log
log = ["dep:log"]
## Display the time since startup next to defmt log messages.
## At most 1 `defmt-timestamp-uptime-*` feature can be used.
## `defmt-timestamp-uptime` is provided for backwards compatibility (provides the same format as `uptime-us`).

View File

@ -49,6 +49,9 @@ esp32c3-hal = { version = "0.13.0", optional = true, default-features = false }
dfu = []
application = []
defmt = ["dep:defmt", "embassy-boot/defmt", "embassy-usb/defmt"]
log = ["dep:log"]
cortex-m = ["dep:cortex-m"]
esp32c3-hal = ["dep:esp32c3-hal"]
ed25519-dalek = ["embassy-boot/ed25519-dalek", "_verify"]
ed25519-salty = ["embassy-boot/ed25519-salty", "_verify"]

View File

@ -21,3 +21,6 @@ features = ["defmt"]
[dependencies]
embedded-io-async = "0.6.1"
defmt = { version = "1", optional = true }
[features]
defmt = ["dep:defmt"]

View File

@ -23,3 +23,7 @@ embassy-usb-driver = { version = "0.2.0", path = "../embassy-usb-driver" }
defmt = { version = "1.0.1", optional = true }
log = { version = "0.4.14", optional = true }
[features]
defmt = ["dep:defmt", "embassy-usb-driver/defmt"]
log = ["dep:log"]

View File

@ -31,6 +31,7 @@ features = ["defmt", "usbd-hid"]
[features]
defmt = ["dep:defmt", "embassy-usb-driver/defmt"]
log = ["dep:log"]
usbd-hid = ["dep:usbd-hid", "dep:ssmarshal"]
default = ["usbd-hid"]

View File

@ -2,7 +2,7 @@
name = "embassy-imxrt1011-examples"
version = "0.1.0"
edition = "2021"
license = "MIT or Apache-2.0"
license = "MIT OR Apache-2.0"
publish = false
[dependencies]

View File

@ -2,7 +2,7 @@
name = "embassy-imxrt1062-evk-examples"
version = "0.1.0"
edition = "2021"
license = "MIT or Apache-2.0"
license = "MIT OR Apache-2.0"
publish = false
[dependencies]

View File

@ -2,7 +2,7 @@
name = "embassy-imxrt-examples"
version = "0.1.0"
edition = "2021"
license = "MIT or Apache-2.0"
license = "MIT OR Apache-2.0"
publish = false
[dependencies]

View File

@ -2,6 +2,7 @@
name = "perf-client"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
publish = false
[dependencies]

View File

@ -2,6 +2,7 @@
name = "perf-server"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
publish = false
[dependencies]

View File

@ -2,6 +2,7 @@
name = "test-utils"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
publish = false
[dependencies]