Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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 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
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 x86_64-unknown-linux-gnu
3 changes: 1 addition & 2 deletions shared/src/communication/eps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ impl CommandParseError {

#[cfg(test)]
mod tests {
use core::num::ParseIntError;

use crate::communication::eps::CommandParseError::*;

#[test]
Expand All @@ -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());
}
Expand Down