diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2260f7..70624f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: cross test --target ${{ matrix.target }} --no-default-features darwin: runs-on: ${{ matrix.os }} @@ -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 @@ -112,6 +118,9 @@ jobs: - name: Test with Itanium backend if: matrix.abi == 'gnu' run: set LITHIUM_BACKEND=itanium && cargo test + - name: Test without std + if: matrix.abi == 'msvc' + run: cargo test --no-default-features miri-linux: runs-on: ubuntu-latest @@ -136,6 +145,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 @@ -151,8 +162,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: @@ -180,3 +193,6 @@ jobs: run: LITHIUM_BACKEND=${{ matrix.backend }} cargo fmt -- --check - name: Clippy run: LITHIUM_BACKEND=${{ matrix.backend }} cargo clippy -- -D warnings + - name: Clippy without std + if: matrix.backend != 'panic' + run: LITHIUM_BACKEND=${{ matrix.backend }} cargo clippy --no-default-features -- -D warnings diff --git a/src/lib.rs b/src/lib.rs index 1812eb0..235b2fc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,7 +77,7 @@ //! used by the crate match, all safe user-supplied callbacks are sound to call, because safe //! callbacks can only interact with exceptions in an isolated manner. -#![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(not(any(feature = "std", test)), no_std)] #![cfg_attr(not(feature = "std"), feature(thread_local))] #![cfg_attr( any(backend = "itanium", backend = "seh"),