check each feature in CI and fix introspection on no_std (#143)
* ci: check every feature with cargo-hack * fix introspection on no_std * ci: the dev branch is not a thing anymore * ci: run tests with --all-features
This commit is contained in:
parent
ad9a2faaea
commit
de933fee63
24
.github/workflows/build_and_test.yml
vendored
24
.github/workflows/build_and_test.yml
vendored
@ -2,9 +2,9 @@ name: Build and Test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, dev ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, dev ]
|
branches: [ main ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@ -36,18 +36,16 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Default Build
|
- name: Install cargo-hack
|
||||||
|
run: curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
|
||||||
|
- name: Run a normal build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
- name: Default Test
|
# cargo-hack tests/checks each crate in the workspace
|
||||||
run: cargo test --verbose
|
- name: Run tests
|
||||||
- name: Build all features
|
run: cargo hack test --all-features
|
||||||
run: cd libafl && cargo build --all-features --verbose
|
# cargo-hack's --feature-powerset would be nice here but libafl has a too many knobs
|
||||||
- name: Test all features
|
- name: Check each feature
|
||||||
run: cd libafl && cargo test --all-features --verbose
|
run: cargo hack check --each-feature
|
||||||
- name: Build no_std
|
|
||||||
run: cd libafl && cargo build --no-default-features --verbose
|
|
||||||
- name: Test no_std
|
|
||||||
run: cd libafl && cargo test --no-default-features --verbose
|
|
||||||
- name: Build examples
|
- name: Build examples
|
||||||
run: cargo build --examples --verbose
|
run: cargo build --examples --verbose
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -37,7 +37,7 @@ harness = false
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std", "anymap_debug", "derive", "llmp_compression"]
|
default = ["std", "anymap_debug", "derive", "llmp_compression"]
|
||||||
std = [] # print, env, launcher ... support
|
std = ["serde_json"] # print, env, launcher ... support
|
||||||
anymap_debug = ["serde_json"] # uses serde_json to Debug the anymap trait. Disable for smaller footprint.
|
anymap_debug = ["serde_json"] # uses serde_json to Debug the anymap trait. Disable for smaller footprint.
|
||||||
derive = ["libafl_derive"] # provide derive(SerdeAny) macro.
|
derive = ["libafl_derive"] # provide derive(SerdeAny) macro.
|
||||||
llmp_bind_public = [] # If set, llmp will bind to 0.0.0.0, allowing cross-device communication. Binds to localhost by default.
|
llmp_bind_public = [] # If set, llmp will bind to 0.0.0.0, allowing cross-device communication. Binds to localhost by default.
|
||||||
|
@ -13,6 +13,8 @@ use crate::{inputs::Input, observers::ObserversTuple, stats::UserStats, Error};
|
|||||||
|
|
||||||
#[cfg(feature = "introspection")]
|
#[cfg(feature = "introspection")]
|
||||||
use crate::stats::ClientPerfStats;
|
use crate::stats::ClientPerfStats;
|
||||||
|
#[cfg(feature = "introspection")]
|
||||||
|
use alloc::boxed::Box;
|
||||||
|
|
||||||
/// The log event severity
|
/// The log event severity
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
|
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
|
||||||
|
@ -17,6 +17,8 @@ use crate::{
|
|||||||
|
|
||||||
#[cfg(feature = "introspection")]
|
#[cfg(feature = "introspection")]
|
||||||
use crate::stats::PerfFeature;
|
use crate::stats::PerfFeature;
|
||||||
|
#[cfg(feature = "introspection")]
|
||||||
|
use alloc::boxed::Box;
|
||||||
|
|
||||||
use alloc::string::ToString;
|
use alloc::string::ToString;
|
||||||
use core::{marker::PhantomData, time::Duration};
|
use core::{marker::PhantomData, time::Duration};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user