From fd5da170ae2f0523b017b481379a6396645f3b5c Mon Sep 17 00:00:00 2001 From: SCool62 <79726681+SCool62@users.noreply.github.com> Date: Sat, 15 Mar 2025 19:12:59 -0700 Subject: [PATCH 1/9] Create rust.yml --- .github/workflows/rust.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..4b852e0 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,28 @@ +name: Rust + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install nightly rust + run: rustup update nightly + - name: Install build target + run: rustup target add thumbv7em-none-eabi + - name: Build + run: cargo build --release + - name: Install test target + run: rustup target add aarch64-apple-darwin + - name: Run tests + run: cargo test -Zbuild-std --target aarch64-apple-darwin From 05452e404ec67e955d59db315f9c443a190bbb0e Mon Sep 17 00:00:00 2001 From: SCool62 <79726681+SCool62@users.noreply.github.com> Date: Sat, 15 Mar 2025 19:17:05 -0700 Subject: [PATCH 2/9] Hopefully make CI pass --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4b852e0..796ca03 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,7 +21,7 @@ jobs: - name: Install build target run: rustup target add thumbv7em-none-eabi - name: Build - run: cargo build --release + run: cargo +nightly build --release --target thumbv7em-none-eabi - name: Install test target run: rustup target add aarch64-apple-darwin - name: Run tests From 4698a27c2ea81c312e74133e0b03b37a5cbccfda Mon Sep 17 00:00:00 2001 From: SCool62 <79726681+SCool62@users.noreply.github.com> Date: Sat, 15 Mar 2025 19:18:42 -0700 Subject: [PATCH 3/9] Try again --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 796ca03..27a9e33 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,7 +21,7 @@ jobs: - name: Install build target run: rustup target add thumbv7em-none-eabi - name: Build - run: cargo +nightly build --release --target thumbv7em-none-eabi + run: cargo +nightly build --release - name: Install test target run: rustup target add aarch64-apple-darwin - name: Run tests From 337a08c35408c30855d898f488d242732332bfc3 Mon Sep 17 00:00:00 2001 From: SCool62 <79726681+SCool62@users.noreply.github.com> Date: Sat, 15 Mar 2025 19:21:49 -0700 Subject: [PATCH 4/9] Try again --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 27a9e33..fb6d598 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,6 +20,8 @@ jobs: run: rustup update nightly - name: Install build target run: rustup target add thumbv7em-none-eabi + - name: Print installed toolchains + run: rustup show - name: Build run: cargo +nightly build --release - name: Install test target From a9fc1b93c5991176948d78f08e0efdd9bf8bb2ae Mon Sep 17 00:00:00 2001 From: SCool62 <79726681+SCool62@users.noreply.github.com> Date: Sat, 15 Mar 2025 19:22:58 -0700 Subject: [PATCH 5/9] Another time --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fb6d598..b5561a3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install nightly rust - run: rustup update nightly - name: Install build target run: rustup target add thumbv7em-none-eabi + - name: Install nightly rust + run: rustup update nightly - name: Print installed toolchains run: rustup show - name: Build From a9a94a3056f1a1d57830424f3d0d579e59c7da03 Mon Sep 17 00:00:00 2001 From: SCool62 <79726681+SCool62@users.noreply.github.com> Date: Sat, 15 Mar 2025 19:32:52 -0700 Subject: [PATCH 6/9] Another try --- .github/workflows/rust.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b5561a3..10c5f62 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,11 +19,13 @@ jobs: - name: Install build target run: rustup target add thumbv7em-none-eabi - name: Install nightly rust - run: rustup update nightly + run: rustup toolchain install nightly + - name: Make nightly default + run: rustup default nightly - name: Print installed toolchains run: rustup show - name: Build - run: cargo +nightly build --release + run: cargo build --release --target thumbv7em-none-eabi - name: Install test target run: rustup target add aarch64-apple-darwin - name: Run tests From 6249447a410fad1e094e7a53dbdcbfdd3ce8c30b Mon Sep 17 00:00:00 2001 From: SCool62 <79726681+SCool62@users.noreply.github.com> Date: Sat, 15 Mar 2025 19:33:52 -0700 Subject: [PATCH 7/9] Again --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 10c5f62..a8414ce 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,12 +16,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install build target - run: rustup target add thumbv7em-none-eabi - name: Install nightly rust run: rustup toolchain install nightly - name: Make nightly default run: rustup default nightly + - name: Install build target + run: rustup target add thumbv7em-none-eabi - name: Print installed toolchains run: rustup show - name: Build From 5d9cda63f75f9a933921d8a159cb8d800d5137a6 Mon Sep 17 00:00:00 2001 From: SCool62 <79726681+SCool62@users.noreply.github.com> Date: Sat, 15 Mar 2025 19:35:57 -0700 Subject: [PATCH 8/9] and again --- .github/workflows/rust.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a8414ce..dbea474 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -28,5 +28,7 @@ jobs: run: cargo build --release --target thumbv7em-none-eabi - name: Install test target run: rustup target add aarch64-apple-darwin + - name: Add rust src + run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu - name: Run tests - run: cargo test -Zbuild-std --target aarch64-apple-darwin + run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu From e6529c6c6163e41063002ad5a4631ab259870aa5 Mon Sep 17 00:00:00 2001 From: SCool62 Date: Sat, 15 Mar 2025 19:39:00 -0700 Subject: [PATCH 9/9] Remove compiler warnings from lib --- shared/src/communication/eps.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared/src/communication/eps.rs b/shared/src/communication/eps.rs index 14ebd95..e834907 100644 --- a/shared/src/communication/eps.rs +++ b/shared/src/communication/eps.rs @@ -75,8 +75,6 @@ impl CommandParseError { #[cfg(test)] mod tests { - use core::num::ParseIntError; - use crate::communication::eps::CommandParseError::*; #[test] @@ -102,6 +100,7 @@ mod tests { #[test] fn utf_8_error_as_bytes() { + #[allow(invalid_from_utf8)] let error = core::str::from_utf8(&[0xC0]).err().unwrap(); assert_eq!(b"err;504", Utf8Error(error).as_bytes()); }