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

CI: check no-std support #56

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 15 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,18 @@ jobs:
version: latest
- name: Fuzz Base w/ RustCrypto
run: cargo fuzz run base -- -runs=10000

no-std-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# we use a target that lacks a pre-compiled libstd to check if any dependency is using libstd
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
default: true
- name: build crates in no-std mode
run: cargo check --target thumbv7em-none-eabihf
working-directory: no-std-support-check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Cargo.lock
**/*.rs.bk
.vscode/
evercrypt_provider/target
no-std-support-check/target
rust_crypto_provider/target
traits/target/
.DS_Store
Expand Down
15 changes: 15 additions & 0 deletions no-std-support-check/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
edition = "2021"
name = "no-std-support-check"
publish = false
version = "0.0.0"

[dependencies]
hpke-rs = { path = ".." }
hpke-rs-crypto = { path = "../traits" }
hpke-rs-rust-crypto = { path = "../rust_crypto_provider" }

# the no-std-support-check CI job uses the `thumbv7em-none-eabihf` target
# `getrandom` does not support that target out of box so this feature needs to be enabled to avoid a compilation error
# (normally this feature should NOT be enabled in a library but this crate is just used for a CI check)
getrandom = { version = "0.2.11", features = ["custom"] }
3 changes: 3 additions & 0 deletions no-std-support-check/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//! used in CI to check that crates are no-std compatible

#![no_std]
Loading