diff options
Diffstat (limited to '.github/ci')
| -rwxr-xr-x | .github/ci/build-nightly.sh | 2 | ||||
| -rwxr-xr-x | .github/ci/build-xtensa.sh | 2 | ||||
| -rwxr-xr-x | .github/ci/build.sh | 2 | ||||
| -rwxr-xr-x | .github/ci/crlf.sh | 17 | ||||
| -rwxr-xr-x | .github/ci/doc.sh | 54 | ||||
| -rwxr-xr-x | .github/ci/janitor.sh | 15 |
6 files changed, 21 insertions, 71 deletions
diff --git a/.github/ci/build-nightly.sh b/.github/ci/build-nightly.sh index 2d7c4db3f..257d7ebd3 100755 --- a/.github/ci/build-nightly.sh +++ b/.github/ci/build-nightly.sh | |||
| @@ -23,7 +23,7 @@ fi | |||
| 23 | hashtime restore /ci/cache/filetime.json || true | 23 | hashtime restore /ci/cache/filetime.json || true |
| 24 | hashtime save /ci/cache/filetime.json | 24 | hashtime save /ci/cache/filetime.json |
| 25 | 25 | ||
| 26 | cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 280829ad163f1444999468a57d28fb7c412babbe | 26 | cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 |
| 27 | 27 | ||
| 28 | ./ci-nightly.sh | 28 | ./ci-nightly.sh |
| 29 | 29 | ||
diff --git a/.github/ci/build-xtensa.sh b/.github/ci/build-xtensa.sh index b6626639d..339e28467 100755 --- a/.github/ci/build-xtensa.sh +++ b/.github/ci/build-xtensa.sh | |||
| @@ -25,7 +25,7 @@ fi | |||
| 25 | hashtime restore /ci/cache/filetime.json || true | 25 | hashtime restore /ci/cache/filetime.json || true |
| 26 | hashtime save /ci/cache/filetime.json | 26 | hashtime save /ci/cache/filetime.json |
| 27 | 27 | ||
| 28 | cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 280829ad163f1444999468a57d28fb7c412babbe | 28 | cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 |
| 29 | 29 | ||
| 30 | ./ci-xtensa.sh | 30 | ./ci-xtensa.sh |
| 31 | 31 | ||
diff --git a/.github/ci/build.sh b/.github/ci/build.sh index 59bcefed6..d7201aedb 100755 --- a/.github/ci/build.sh +++ b/.github/ci/build.sh | |||
| @@ -28,7 +28,7 @@ fi | |||
| 28 | hashtime restore /ci/cache/filetime.json || true | 28 | hashtime restore /ci/cache/filetime.json || true |
| 29 | hashtime save /ci/cache/filetime.json | 29 | hashtime save /ci/cache/filetime.json |
| 30 | 30 | ||
| 31 | cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 280829ad163f1444999468a57d28fb7c412babbe | 31 | cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 |
| 32 | 32 | ||
| 33 | ./ci.sh | 33 | ./ci.sh |
| 34 | 34 | ||
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 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | ## on push branch~=gh-readonly-queue/main/.* | ||
| 3 | ## on pull_request | ||
| 4 | |||
| 5 | set -euo pipefail | ||
| 6 | |||
| 7 | FILES_WITH_CRLF=$(find ! -path "./.git/*" -not -type d | xargs file -N | (grep " CRLF " || true)) | ||
| 8 | |||
| 9 | if [ -z "$FILES_WITH_CRLF" ]; then | ||
| 10 | echo -e "No files with CRLF endings found." | ||
| 11 | exit 0 | ||
| 12 | else | ||
| 13 | NR_FILES=$(echo "$FILES_WITH_CRLF" | wc -l) | ||
| 14 | echo -e "ERROR: Found ${NR_FILES} files with CRLF endings." | ||
| 15 | echo "$FILES_WITH_CRLF" | ||
| 16 | exit "$NR_FILES" | ||
| 17 | fi | ||
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 | |||
| 9 | export RUSTUP_HOME=/ci/cache/rustup | 9 | export RUSTUP_HOME=/ci/cache/rustup |
| 10 | export CARGO_HOME=/ci/cache/cargo | 10 | export CARGO_HOME=/ci/cache/cargo |
| 11 | export CARGO_TARGET_DIR=/ci/cache/target | 11 | export CARGO_TARGET_DIR=/ci/cache/target |
| 12 | export BUILDER_THREADS=4 | 12 | export PATH=$CARGO_HOME/bin:$PATH |
| 13 | export BUILDER_COMPRESS=true | ||
| 14 | mv rust-toolchain-nightly.toml rust-toolchain.toml | 13 | mv rust-toolchain-nightly.toml rust-toolchain.toml |
| 15 | 14 | ||
| 16 | # force rustup to download the toolchain before starting building. | 15 | cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 |
| 17 | # Otherwise, the docs builder is running multiple instances of cargo rustdoc concurrently. | ||
| 18 | # They all see the toolchain is not installed and try to install it in parallel | ||
| 19 | # which makes rustup very sad | ||
| 20 | rustc --version > /dev/null | ||
| 21 | 16 | ||
| 22 | docserver build -i ./embassy-boot -o webroot/crates/embassy-boot/git.zup | 17 | cargo embassy-devtool doc -o webroot |
| 23 | docserver build -i ./embassy-boot-nrf -o webroot/crates/embassy-boot-nrf/git.zup | ||
| 24 | docserver build -i ./embassy-boot-rp -o webroot/crates/embassy-boot-rp/git.zup | ||
| 25 | docserver build -i ./embassy-boot-stm32 -o webroot/crates/embassy-boot-stm32/git.zup | ||
| 26 | docserver build -i ./embassy-embedded-hal -o webroot/crates/embassy-embedded-hal/git.zup | ||
| 27 | docserver build -i ./embassy-executor -o webroot/crates/embassy-executor/git.zup | ||
| 28 | docserver build -i ./embassy-futures -o webroot/crates/embassy-futures/git.zup | ||
| 29 | docserver build -i ./embassy-nrf -o webroot/crates/embassy-nrf/git.zup | ||
| 30 | docserver build -i ./embassy-rp -o webroot/crates/embassy-rp/git.zup | ||
| 31 | docserver build -i ./embassy-mspm0 -o webroot/crates/embassy-mspm0/git.zup | ||
| 32 | docserver build -i ./embassy-nxp -o webroot/crates/embassy-nxp/git.zup | ||
| 33 | docserver build -i ./embassy-sync -o webroot/crates/embassy-sync/git.zup | ||
| 34 | docserver build -i ./cyw43 -o webroot/crates/cyw43/git.zup | ||
| 35 | docserver build -i ./cyw43-pio -o webroot/crates/cyw43-pio/git.zup | ||
| 36 | docserver build -i ./embassy-stm32-wpan -o webroot/crates/embassy-stm32-wpan/git.zup --output-static webroot/static | ||
| 37 | |||
| 38 | docserver build -i ./embassy-time -o webroot/crates/embassy-time/git.zup | ||
| 39 | docserver build -i ./embassy-time-driver -o webroot/crates/embassy-time-driver/git.zup | ||
| 40 | docserver build -i ./embassy-time-queue-utils -o webroot/crates/embassy-time-queue-utils/git.zup | ||
| 41 | |||
| 42 | docserver build -i ./embassy-usb -o webroot/crates/embassy-usb/git.zup | ||
| 43 | docserver build -i ./embassy-usb-dfu -o webroot/crates/embassy-usb-dfu/git.zup | ||
| 44 | docserver build -i ./embassy-usb-driver -o webroot/crates/embassy-usb-driver/git.zup | ||
| 45 | docserver build -i ./embassy-usb-logger -o webroot/crates/embassy-usb-logger/git.zup | ||
| 46 | docserver build -i ./embassy-usb-synopsys-otg -o webroot/crates/embassy-usb-synopsys-otg/git.zup | ||
| 47 | |||
| 48 | docserver build -i ./embassy-net -o webroot/crates/embassy-net/git.zup | ||
| 49 | docserver build -i ./embassy-net-nrf91 -o webroot/crates/embassy-net-nrf91/git.zup | ||
| 50 | docserver build -i ./embassy-net-driver -o webroot/crates/embassy-net-driver/git.zup | ||
| 51 | docserver build -i ./embassy-net-driver-channel -o webroot/crates/embassy-net-driver-channel/git.zup | ||
| 52 | docserver build -i ./embassy-net-wiznet -o webroot/crates/embassy-net-wiznet/git.zup | ||
| 53 | docserver build -i ./embassy-net-ppp -o webroot/crates/embassy-net-ppp/git.zup | ||
| 54 | docserver build -i ./embassy-net-tuntap -o webroot/crates/embassy-net-tuntap/git.zup | ||
| 55 | docserver build -i ./embassy-net-enc28j60 -o webroot/crates/embassy-net-enc28j60/git.zup | ||
| 56 | docserver build -i ./embassy-net-esp-hosted -o webroot/crates/embassy-net-esp-hosted/git.zup | ||
| 57 | docserver build -i ./embassy-net-adin1110 -o webroot/crates/embassy-net-adin1110/git.zup | ||
| 58 | 18 | ||
| 59 | export KUBECONFIG=/ci/secrets/kubeconfig.yml | 19 | export KUBECONFIG=/ci/secrets/kubeconfig.yml |
| 60 | POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name}) | 20 | POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name}) |
| 61 | kubectl cp webroot/crates $POD:/data | 21 | kubectl cp webroot/crates $POD:/data |
| 62 | kubectl cp webroot/static $POD:/data | 22 | kubectl cp webroot/static $POD:/data |
| 63 | |||
| 64 | # build and upload stm32 last | ||
| 65 | # so that it doesn't prevent other crates from getting docs updates when it breaks. | ||
| 66 | |||
| 67 | rm -rf webroot | ||
| 68 | docserver build -i ./embassy-stm32 -o webroot/crates/embassy-stm32/git.zup | ||
| 69 | POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name}) | ||
| 70 | kubectl cp webroot/crates $POD:/data | ||
diff --git a/.github/ci/janitor.sh b/.github/ci/janitor.sh new file mode 100755 index 000000000..bd04f47fc --- /dev/null +++ b/.github/ci/janitor.sh | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | ## on push branch~=gh-readonly-queue/main/.* | ||
| 3 | ## on pull_request | ||
| 4 | |||
| 5 | set -euo pipefail | ||
| 6 | |||
| 7 | export RUSTUP_HOME=/ci/cache/rustup | ||
| 8 | export CARGO_HOME=/ci/cache/cargo | ||
| 9 | export CARGO_TARGET_DIR=/ci/cache/target | ||
| 10 | export PATH=$CARGO_HOME/bin:$PATH | ||
| 11 | |||
| 12 | cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 3ca80f7065acbe0b69b7da463fab60e744f9de79 | ||
| 13 | |||
| 14 | cargo embassy-devtool check-crlf | ||
| 15 | cargo embassy-devtool check-manifest | ||
