From fd1c1635419f8281edda3892f08a91f0e315667a Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 22 Sep 2025 00:32:50 +0200 Subject: ci: add cargo manifest check --- .github/ci/build-nightly.sh | 2 +- .github/ci/build-xtensa.sh | 2 +- .github/ci/build.sh | 2 +- .github/ci/crlf.sh | 17 ----------------- .github/ci/janitor.sh | 15 +++++++++++++++ 5 files changed, 18 insertions(+), 20 deletions(-) delete mode 100755 .github/ci/crlf.sh create mode 100755 .github/ci/janitor.sh (limited to '.github') diff --git a/.github/ci/build-nightly.sh b/.github/ci/build-nightly.sh index 2d7c4db3f..801d470a1 100755 --- a/.github/ci/build-nightly.sh +++ b/.github/ci/build-nightly.sh @@ -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 2357881abb81a0a3672ff992e199963f9f63bb10 ./ci-nightly.sh diff --git a/.github/ci/build-xtensa.sh b/.github/ci/build-xtensa.sh index b6626639d..1a97b21b1 100755 --- a/.github/ci/build-xtensa.sh +++ b/.github/ci/build-xtensa.sh @@ -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 2357881abb81a0a3672ff992e199963f9f63bb10 ./ci-xtensa.sh diff --git a/.github/ci/build.sh b/.github/ci/build.sh index 59bcefed6..72ffa9f1b 100755 --- a/.github/ci/build.sh +++ b/.github/ci/build.sh @@ -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 2357881abb81a0a3672ff992e199963f9f63bb10 ./ci.sh diff --git a/.github/ci/crlf.sh b/.github/ci/crlf.sh deleted file mode 100755 index 69838ce88..000000000 --- a/.github/ci/crlf.sh +++ /dev/null @@ -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 diff --git a/.github/ci/janitor.sh b/.github/ci/janitor.sh new file mode 100755 index 000000000..58ecb8475 --- /dev/null +++ b/.github/ci/janitor.sh @@ -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 2357881abb81a0a3672ff992e199963f9f63bb10 + +cargo embassy-devtool check-crlf +cargo embassy-devtool check-manifest -- cgit From 27df9288f343c2855d1daec00d127541826d664f Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 22 Sep 2025 00:56:14 +0200 Subject: aaaaaa --- .github/ci/build-nightly.sh | 2 +- .github/ci/build-xtensa.sh | 2 +- .github/ci/build.sh | 2 +- .github/ci/janitor.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/ci/build-nightly.sh b/.github/ci/build-nightly.sh index 801d470a1..257d7ebd3 100755 --- a/.github/ci/build-nightly.sh +++ b/.github/ci/build-nightly.sh @@ -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 2357881abb81a0a3672ff992e199963f9f63bb10 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 ./ci-nightly.sh diff --git a/.github/ci/build-xtensa.sh b/.github/ci/build-xtensa.sh index 1a97b21b1..339e28467 100755 --- a/.github/ci/build-xtensa.sh +++ b/.github/ci/build-xtensa.sh @@ -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 2357881abb81a0a3672ff992e199963f9f63bb10 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 ./ci-xtensa.sh diff --git a/.github/ci/build.sh b/.github/ci/build.sh index 72ffa9f1b..d7201aedb 100755 --- a/.github/ci/build.sh +++ b/.github/ci/build.sh @@ -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 2357881abb81a0a3672ff992e199963f9f63bb10 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 ./ci.sh diff --git a/.github/ci/janitor.sh b/.github/ci/janitor.sh index 58ecb8475..bd04f47fc 100755 --- a/.github/ci/janitor.sh +++ b/.github/ci/janitor.sh @@ -9,7 +9,7 @@ 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 2357881abb81a0a3672ff992e199963f9f63bb10 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 cargo embassy-devtool check-crlf cargo embassy-devtool check-manifest -- cgit From 54a95927f054dd7229fd5e26c3acee509f71c82f Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 22 Sep 2025 00:56:34 +0200 Subject: ci: use devtool to build docs. --- .github/ci/doc.sh | 54 +++--------------------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) (limited to '.github') diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh index 876c261a1..70ce110d1 100755 --- a/.github/ci/doc.sh +++ b/.github/ci/doc.sh @@ -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 -- cgit From 34911c581c1066a9650ac2103d125d5bbb9a229c Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 26 Sep 2025 21:49:40 +0200 Subject: Fix docs build. --- .github/ci/build-nightly.sh | 2 +- .github/ci/build-xtensa.sh | 2 +- .github/ci/build.sh | 2 +- .github/ci/doc.sh | 2 +- .github/ci/janitor.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/ci/build-nightly.sh b/.github/ci/build-nightly.sh index 257d7ebd3..8cca1b445 100755 --- a/.github/ci/build-nightly.sh +++ b/.github/ci/build-nightly.sh @@ -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 3ca80f7065acbe0b69b7da463fab60e744f9de79 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 ./ci-nightly.sh diff --git a/.github/ci/build-xtensa.sh b/.github/ci/build-xtensa.sh index 339e28467..dbd2f7ffc 100755 --- a/.github/ci/build-xtensa.sh +++ b/.github/ci/build-xtensa.sh @@ -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 3ca80f7065acbe0b69b7da463fab60e744f9de79 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 ./ci-xtensa.sh diff --git a/.github/ci/build.sh b/.github/ci/build.sh index d7201aedb..d5e0e0bd2 100755 --- a/.github/ci/build.sh +++ b/.github/ci/build.sh @@ -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 3ca80f7065acbe0b69b7da463fab60e744f9de79 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 ./ci.sh diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh index 70ce110d1..dab47e86d 100755 --- a/.github/ci/doc.sh +++ b/.github/ci/doc.sh @@ -12,7 +12,7 @@ export CARGO_TARGET_DIR=/ci/cache/target export PATH=$CARGO_HOME/bin:$PATH mv rust-toolchain-nightly.toml rust-toolchain.toml -cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 cargo embassy-devtool doc -o webroot diff --git a/.github/ci/janitor.sh b/.github/ci/janitor.sh index bd04f47fc..305c6b227 100755 --- a/.github/ci/janitor.sh +++ b/.github/ci/janitor.sh @@ -9,7 +9,7 @@ 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 install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 cargo embassy-devtool check-crlf cargo embassy-devtool check-manifest -- cgit