Skip to content

Commit

Permalink
Fix no_std build, add to CI. (#325)
Browse files Browse the repository at this point in the history
This had been broken in b0e2960.
  • Loading branch information
waywardmonkeys authored Oct 21, 2023
1 parent 3c93c07 commit ca352c7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,25 @@ jobs:
working-directory: fuzz
run: ./travis_fuzz.sh

no-std:
name: no_std
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: thumbv7m-none-eabi
- name: Cargo build
run: cargo build --verbose

build_result:
name: homu build finished
runs-on: ubuntu-latest
needs:
- "linux-ci"
- "no-std"

steps:
- name: Mark the job as successful
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#[doc(hidden)]
pub extern crate alloc;

// #[cfg(any(test, feature = "write"))]
#[cfg(any(test, feature = "write"))]
extern crate std;

#[cfg(test)]
Expand Down

0 comments on commit ca352c7

Please sign in to comment.