Skip to content

Commit c5ec15d

Browse files
authored
Check on CI whether library compiles for no_std (#431)
* Check on CI whether library compiles for no_std * Update checkout action * Missing -Z unstable-options * Also compile smoldot-light * Update action a bit * Overwrite ruzstd to try it out * Forgot default-features = false * Change target * Use a specific nightly * Fix toolchain name * Fix toolchain name again * Try simplify the build * --keep-going is unstable * Only check the smoldot library for now
1 parent 704b01d commit c5ec15d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ jobs:
9797
- run: RUSTFLAGS=-Dwarnings cargo check --target x86_64-unknown-linux-gnu --package smoldot-light --locked --no-default-features --features std --features wasmtime
9898
- run: RUSTFLAGS=-Dwarnings cargo check --target i686-unknown-linux-gnu --package smoldot-light --locked --no-default-features --features std --features wasmtime
9999

100+
check-no-std:
101+
runs-on: ubuntu-latest
102+
container:
103+
image: rust:1.72
104+
steps:
105+
- uses: actions/checkout@v4
106+
- run: rustup target add thumbv7m-none-eabi
107+
- uses: Swatinem/rust-cache@v2
108+
# We use `thumbv7m-none-eabi` as this target seems to generally work fine and doesn't support `std`. Many targets unfortunately have Rust/LLVM bugs preventing compilation.
109+
- run: RUSTFLAGS=-Dwarnings cargo build --package smoldot --locked --no-default-features --target=thumbv7m-none-eabi
110+
100111
fuzzing-binaries-compile:
101112
runs-on: ubuntu-latest
102113
container:
@@ -206,7 +217,7 @@ jobs:
206217
all-ci:
207218
# This dummy job depends on all the mandatory checks. It succeeds if and only if CI is
208219
# considered successful.
209-
needs: [test-64bits, test-32bits, wasm-node-check, check-features, fuzzing-binaries-compile, check-rustdoc-links, fmt, clippy, cargo-deny, cargo-spellcheck, wasm-node-versions-match]
220+
needs: [test-64bits, test-32bits, wasm-node-check, check-features, check-no-std, fuzzing-binaries-compile, check-rustdoc-links, fmt, clippy, cargo-deny, cargo-spellcheck, wasm-node-versions-match]
210221
runs-on: ubuntu-latest
211222
steps:
212223
- run: echo Success

0 commit comments

Comments
 (0)