Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce no-std compatibility in CI #1791

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ jobs:
- run: RUSTFLAGS=-Dwarnings cargo check --package smoldot --locked --no-default-features --features std
- run: RUSTFLAGS=-Dwarnings cargo check --package smoldot --locked --no-default-features --features database-sqlite --features std

check-no-std:
runs-on: ubuntu-latest
container:
image: rust
steps:
- uses: actions/checkout@v2.4.0
- uses: Swatinem/rust-cache@v1
- run: rustup default nightly
- run: RUSTFLAGS=-Dwarnings cargo +nightly build --lib --no-default-features -Z build-std=core,alloc --target=x86_64-unknown-uefi

check-rustdoc-links:
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -174,7 +184,7 @@ jobs:
all-ci:
# This dummy job depends on all the mandatory checks. It succeeds if and only if CI is
# considered successful.
needs: [test-64bits, test-32bits, wasm-node-check, wasm-node-size-diff, check-features, check-rustdoc-links, fmt, clippy, cargo-deny, wasm-node-versions-match]
needs: [test-64bits, test-32bits, wasm-node-check, wasm-node-size-diff, check-features, check-no-std, check-rustdoc-links, fmt, clippy, cargo-deny, wasm-node-versions-match]
runs-on: ubuntu-latest
steps:
- run: echo Success
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ soketto = { version = "0.7.1", optional = true }
# TODO:
parity-scale-codec = { version = "2.3.1", features = ["derive"] } # TODO: a lot of unnecessary overhead in terms of memory allocations

[target.'cfg(target_arch = "x86_64")'.dependencies]
[target.'cfg(target_arch = "x86_63")'.dependencies]
tomaka marked this conversation as resolved.
Show resolved Hide resolved
# `std` feature
wasmtime = { version = "0.27.0", default-features = false, features = ["async"], optional = true }

Expand Down