Skip to content

Commit

Permalink
Test no-std
Browse files Browse the repository at this point in the history
  • Loading branch information
purplesyringa committed Oct 30, 2024
1 parent c6a0153 commit 6453293
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
run: LITHIUM_BACKEND=panic cargo test --target ${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}
- name: Test with Itanium backend
run: LITHIUM_BACKEND=itanium cargo test --target ${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}
- name: Test without std
run: cargo test --target ${{ matrix.arch }}-unknown-linux-${{ matrix.libc }} --no-default-features

linux-cross:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -69,6 +71,8 @@ jobs:
run: LITHIUM_BACKEND=panic cross test --target ${{ matrix.target }}
- name: Test with Itanium backend
run: LITHIUM_BACKEND=itanium cross test --target ${{ matrix.target }}
- name: Test without std
run: cargo test --target ${{ matrix.target }} --no-default-features

darwin:
runs-on: ${{ matrix.os }}
Expand All @@ -88,6 +92,8 @@ jobs:
run: LITHIUM_BACKEND=panic cargo test
- name: Test with Itanium backend
run: LITHIUM_BACKEND=itanium cargo test
- name: Test without std
run: cargo test

windows:
runs-on: windows-latest
Expand All @@ -112,6 +118,8 @@ jobs:
- name: Test with Itanium backend
if: matrix.abi == 'gnu'
run: set LITHIUM_BACKEND=itanium && cargo test
- name: Test without std
run: cargo test --no-default-features

miri-linux:
runs-on: ubuntu-latest
Expand All @@ -136,6 +144,8 @@ jobs:
run: LITHIUM_BACKEND=panic cargo miri test --target ${{ matrix.target }}
- name: Test with Itanium backend
run: LITHIUM_BACKEND=itanium cargo miri test --target ${{ matrix.target }}
- name: Test without std
run: cargo miri test --target ${{ matrix.target }} --no-default-features

valgrind:
runs-on: ubuntu-latest
Expand All @@ -151,8 +161,10 @@ jobs:
run: LITHIUM_BACKEND=panic cargo valgrind test
- name: Test with Itanium backend
run: LITHIUM_BACKEND=itanium cargo valgrind test
- name: Test without std
run: cargo valgrind test --no-default-features

test_stable:
test-stable:
runs-on: ubuntu-latest
if: success() || failure()
steps:
Expand Down Expand Up @@ -180,3 +192,5 @@ jobs:
run: LITHIUM_BACKEND=${{ matrix.backend }} cargo fmt -- --check
- name: Clippy
run: LITHIUM_BACKEND=${{ matrix.backend }} cargo clippy -- -D warnings
- name: Clippy without std
run: LITHIUM_BACKEND=${{ matrix.backend }} cargo clippy --no-default-features -- -D warnings
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@

extern crate alloc;

#[cfg(test)]
extern crate std;

mod api;
mod backend;

Expand Down

0 comments on commit 6453293

Please sign in to comment.