From 421ee4dfbfbbdc007265498d4f529687c16d89af Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 29 May 2023 19:46:46 +0200 Subject: ci: add stable build, add tests. --- .github/ci/build-stable.sh | 16 ++++++++++++++++ .github/ci/build.sh | 18 ++++++++++++++++++ .github/ci/rust.sh | 20 -------------------- .github/ci/test.sh | 28 ++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 20 deletions(-) create mode 100755 .github/ci/build-stable.sh create mode 100755 .github/ci/build.sh delete mode 100755 .github/ci/rust.sh create mode 100755 .github/ci/test.sh (limited to '.github') diff --git a/.github/ci/build-stable.sh b/.github/ci/build-stable.sh new file mode 100755 index 000000000..0dadd6102 --- /dev/null +++ b/.github/ci/build-stable.sh @@ -0,0 +1,16 @@ +#!/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 + +hashtime restore /ci/cache/filetime.json || true +hashtime save /ci/cache/filetime.json + +sed -i 's/channel.*/channel = "stable"/g' rust-toolchain.toml + +./ci_stable.sh diff --git a/.github/ci/build.sh b/.github/ci/build.sh new file mode 100755 index 000000000..1c3a7f3b0 --- /dev/null +++ b/.github/ci/build.sh @@ -0,0 +1,18 @@ +#!/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 +if [ -f /ci/secrets/teleprobe-token.txt ]; then + echo Got teleprobe token! + export TELEPROBE_TOKEN=$(cat /ci/secrets/teleprobe-token.txt) +fi + +hashtime restore /ci/cache/filetime.json || true +hashtime save /ci/cache/filetime.json + +./ci.sh diff --git a/.github/ci/rust.sh b/.github/ci/rust.sh deleted file mode 100755 index db1fc8538..000000000 --- a/.github/ci/rust.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -## on push branch~=gh-readonly-queue/main/.* -## on pull_request - -set -euo pipefail - -echo Hello World! - -export RUSTUP_HOME=/ci/cache/rustup -export CARGO_HOME=/ci/cache/cargo -export CARGO_TARGET_DIR=/ci/cache/target -if [ -f /ci/secrets/teleprobe-token.txt ]; then - echo Got teleprobe token! - export TELEPROBE_TOKEN=$(cat /ci/secrets/teleprobe-token.txt) -fi - -hashtime restore /ci/cache/filetime.json || true -hashtime save /ci/cache/filetime.json - -./ci.sh diff --git a/.github/ci/test.sh b/.github/ci/test.sh new file mode 100755 index 000000000..a7140cfd9 --- /dev/null +++ b/.github/ci/test.sh @@ -0,0 +1,28 @@ +#!/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 + +hashtime restore /ci/cache/filetime.json || true +hashtime save /ci/cache/filetime.json + +cargo test --manifest-path ./embassy-sync/Cargo.toml +cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml +cargo test --manifest-path ./embassy-hal-common/Cargo.toml +cargo test --manifest-path ./embassy-time/Cargo.toml --features generic-queue + +cargo test --manifest-path ./embassy-boot/boot/Cargo.toml +cargo test --manifest-path ./embassy-boot/boot/Cargo.toml --features nightly +cargo test --manifest-path ./embassy-boot/boot/Cargo.toml --features nightly,ed25519-dalek +cargo test --manifest-path ./embassy-boot/boot/Cargo.toml --features nightly,ed25519-salty + +#cargo test --manifest-path ./embassy-nrf/Cargo.toml --no-default-features --features nightly,nrf52840,time-driver-rtc1 ## broken doctests + +cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features nightly,stm32f429vg,exti,time-driver-any,exti +cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features nightly,stm32f732ze,exti,time-driver-any,exti +cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features nightly,stm32f769ni,exti,time-driver-any,exti -- cgit