Skip to content

Commit cd65586

Browse files
Jacob Zhongclaude
andcommitted
ci: add thumbv7em-none-eabi build check
thumbv7em-none-eabi is a 32-bit bare-metal target: it catches both accidental `std` dependencies and 64-bit-only arithmetic (e.g. a `usize` shift that would overflow when `usize` is 32 bits wide). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 9b351bf commit cd65586

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ name: Build
2020
# manually before a release); a compile-guard so it can't silently rot.
2121
# * `build-benchmark`— the `benchmark/` scratchpad (builds with `--features gmp`).
2222
# * `build-aarch64` — an aarch64 cross-build.
23+
# * `build-thumbv7em`— a 32-bit bare-metal cross-build that catches accidental
24+
# `std` dependencies and 64-bit-only arithmetic.
2325
# The sibling `Tests` workflow runs the actual `cargo test` matrix.
2426

2527
jobs:
@@ -122,3 +124,19 @@ jobs:
122124
toolchain: stable
123125
targets: aarch64-unknown-linux-gnu
124126
- run: cargo build --target aarch64-unknown-linux-gnu --all-features --workspace --exclude dashu-python
127+
128+
build-thumbv7em:
129+
name: Build bare metal
130+
runs-on: ubuntu-latest
131+
env:
132+
RUSTFLAGS: -D warnings
133+
steps:
134+
- uses: actions/checkout@v4
135+
- uses: dtolnay/rust-toolchain@master
136+
with:
137+
toolchain: stable
138+
targets: thumbv7em-none-eabi
139+
# thumbv7em-none-eabi is a 32-bit bare-metal target: it catches both
140+
# accidental `std` dependencies and 64-bit-only arithmetic (e.g. a
141+
# `usize` shift that would overflow when `usize` is 32 bits wide).
142+
- run: cargo build --target thumbv7em-none-eabi --no-default-features --features rand,num-order,serde,zeroize,num-traits,rkyv --workspace --exclude dashu-python

0 commit comments

Comments
 (0)