aboutsummaryrefslogtreecommitdiff
path: root/.github/ci
diff options
context:
space:
mode:
Diffstat (limited to '.github/ci')
-rwxr-xr-x.github/ci/build-nightly.sh (renamed from .github/ci/build-stable.sh)7
-rwxr-xr-x.github/ci/build.sh2
-rwxr-xr-x.github/ci/crlf.sh2
-rwxr-xr-x.github/ci/doc.sh1
-rwxr-xr-x.github/ci/rustfmt.sh12
-rwxr-xr-x.github/ci/test-nightly.sh13
-rwxr-xr-x.github/ci/test.sh5
7 files changed, 34 insertions, 8 deletions
diff --git a/.github/ci/build-stable.sh b/.github/ci/build-nightly.sh
index 9160a2be2..95cb4100c 100755
--- a/.github/ci/build-stable.sh
+++ b/.github/ci/build-nightly.sh
@@ -7,6 +7,7 @@ set -euo pipefail
7export RUSTUP_HOME=/ci/cache/rustup 7export RUSTUP_HOME=/ci/cache/rustup
8export CARGO_HOME=/ci/cache/cargo 8export CARGO_HOME=/ci/cache/cargo
9export CARGO_TARGET_DIR=/ci/cache/target 9export CARGO_TARGET_DIR=/ci/cache/target
10mv rust-toolchain-nightly.toml rust-toolchain.toml
10 11
11# needed for "dumb HTTP" transport support 12# needed for "dumb HTTP" transport support
12# used when pointing stm32-metapac to a CI-built one. 13# used when pointing stm32-metapac to a CI-built one.
@@ -21,10 +22,8 @@ fi
21hashtime restore /ci/cache/filetime.json || true 22hashtime restore /ci/cache/filetime.json || true
22hashtime save /ci/cache/filetime.json 23hashtime save /ci/cache/filetime.json
23 24
24sed -i 's/channel.*/channel = "beta"/g' rust-toolchain.toml 25./ci-nightly.sh
25
26./ci_stable.sh
27 26
28# Save lockfiles 27# Save lockfiles
29echo Saving lockfiles... 28echo Saving lockfiles...
30find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+ \ No newline at end of file 29find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+
diff --git a/.github/ci/build.sh b/.github/ci/build.sh
index e7a6c0d86..77d2b3cab 100755
--- a/.github/ci/build.sh
+++ b/.github/ci/build.sh
@@ -31,4 +31,4 @@ hashtime save /ci/cache/filetime.json
31 31
32# Save lockfiles 32# Save lockfiles
33echo Saving lockfiles... 33echo Saving lockfiles...
34find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+ \ No newline at end of file 34find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+
diff --git a/.github/ci/crlf.sh b/.github/ci/crlf.sh
index 457510407..69838ce88 100755
--- a/.github/ci/crlf.sh
+++ b/.github/ci/crlf.sh
@@ -14,4 +14,4 @@ else
14 echo -e "ERROR: Found ${NR_FILES} files with CRLF endings." 14 echo -e "ERROR: Found ${NR_FILES} files with CRLF endings."
15 echo "$FILES_WITH_CRLF" 15 echo "$FILES_WITH_CRLF"
16 exit "$NR_FILES" 16 exit "$NR_FILES"
17fi \ No newline at end of file 17fi
diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh
index ed3036f2f..fbed2752a 100755
--- a/.github/ci/doc.sh
+++ b/.github/ci/doc.sh
@@ -8,6 +8,7 @@ export CARGO_HOME=/ci/cache/cargo
8export CARGO_TARGET_DIR=/ci/cache/target 8export CARGO_TARGET_DIR=/ci/cache/target
9export BUILDER_THREADS=4 9export BUILDER_THREADS=4
10export BUILDER_COMPRESS=true 10export BUILDER_COMPRESS=true
11mv rust-toolchain-nightly.toml rust-toolchain.toml
11 12
12# force rustup to download the toolchain before starting building. 13# force rustup to download the toolchain before starting building.
13# Otherwise, the docs builder is running multiple instances of cargo rustdoc concurrently. 14# Otherwise, the docs builder is running multiple instances of cargo rustdoc concurrently.
diff --git a/.github/ci/rustfmt.sh b/.github/ci/rustfmt.sh
new file mode 100755
index 000000000..369239cfe
--- /dev/null
+++ b/.github/ci/rustfmt.sh
@@ -0,0 +1,12 @@
1#!/bin/bash
2## on push branch~=gh-readonly-queue/main/.*
3## on pull_request
4
5set -euo pipefail
6
7export RUSTUP_HOME=/ci/cache/rustup
8export CARGO_HOME=/ci/cache/cargo
9export CARGO_TARGET_DIR=/ci/cache/target
10mv rust-toolchain-nightly.toml rust-toolchain.toml
11
12find . -name '*.rs' -not -path '*target*' | xargs rustfmt --check --skip-children --unstable-features --edition 2021
diff --git a/.github/ci/test-nightly.sh b/.github/ci/test-nightly.sh
new file mode 100755
index 000000000..d6e5dc574
--- /dev/null
+++ b/.github/ci/test-nightly.sh
@@ -0,0 +1,13 @@
1#!/bin/bash
2## on push branch~=gh-readonly-queue/main/.*
3## on pull_request
4
5set -euo pipefail
6
7export RUSTUP_HOME=/ci/cache/rustup
8export CARGO_HOME=/ci/cache/cargo
9export CARGO_TARGET_DIR=/ci/cache/target
10mv rust-toolchain-nightly.toml rust-toolchain.toml
11
12MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test --manifest-path ./embassy-executor/Cargo.toml
13MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test --manifest-path ./embassy-executor/Cargo.toml --features nightly
diff --git a/.github/ci/test.sh b/.github/ci/test.sh
index 1ee760d31..369f6d221 100755
--- a/.github/ci/test.sh
+++ b/.github/ci/test.sh
@@ -4,8 +4,9 @@
4 4
5set -euo pipefail 5set -euo pipefail
6 6
7MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test --manifest-path ./embassy-executor/Cargo.toml 7export RUSTUP_HOME=/ci/cache/rustup
8MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test --manifest-path ./embassy-executor/Cargo.toml --features nightly 8export CARGO_HOME=/ci/cache/cargo
9export CARGO_TARGET_DIR=/ci/cache/target
9 10
10cargo test --manifest-path ./embassy-sync/Cargo.toml 11cargo test --manifest-path ./embassy-sync/Cargo.toml
11cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml 12cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml