Skip to content

Commit 304eb6f

Browse files
Brandon Williamsbmwill
authored andcommitted
chore(ci): verify no_std build on aarch64-unknown-none
Previously, nothing in CI proved the crate actually works in `no_std` environments — a desktop `cargo build` with `std` omitted from features still resolves `std` through the target's sysroot. With this commit, add a dedicated job that builds against `aarch64-unknown-none`, a bare-metal target without any `std` crate, so any accidental `std` reliance fails to link. The job builds both the default configuration and `--features color` to cover the feature matrix that is expected to work without `std`.
1 parent d88cf23 commit 304eb6f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ jobs:
5454
- uses: taiki-e/install-action@cargo-hack
5555
- run: cargo hack check --feature-powerset --no-dev-deps
5656

57+
no-std:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v6
61+
- run: rustup toolchain install stable --profile minimal
62+
- run: rustup target add aarch64-unknown-none
63+
# Build against a bare-metal target that has no `std` crate,
64+
# so any accidental reliance on `std` fails to link.
65+
- run: cargo build --target aarch64-unknown-none --no-default-features
66+
- run: cargo build --target aarch64-unknown-none --no-default-features --features color
67+
5768
semver:
5869
runs-on: ubuntu-latest
5970
steps:

0 commit comments

Comments
 (0)