Fix docs build for libafl_qemu (#1495)
* Fix docs build for libafl_qemu * turn around * does this work? * build all-features in CI * fixes * fix ci
This commit is contained in:
parent
7e5a1dba05
commit
f27107c5e4
5
.github/workflows/build_and_test.yml
vendored
5
.github/workflows/build_and_test.yml
vendored
@ -91,10 +91,9 @@ jobs:
|
|||||||
|
|
||||||
# ---- doc check ----
|
# ---- doc check ----
|
||||||
- name: Build Docs
|
- name: Build Docs
|
||||||
run: cargo +nightly doc --all-features
|
run: RUSTFLAGS="--cfg docsrs" cargo +nightly doc --all-features
|
||||||
- name: Test Docs
|
- name: Test Docs
|
||||||
run: cargo +nightly test --doc --all-features
|
run: RUSTFLAGS="--cfg docsrs" cargo +nightly test --doc --all-features
|
||||||
|
|
||||||
# ---- build normal and examples ----
|
# ---- build normal and examples ----
|
||||||
- name: Run a normal build
|
- name: Run a normal build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
|
@ -5,8 +5,7 @@ macro_rules! assert_unique_feature {
|
|||||||
() => {};
|
() => {};
|
||||||
($first:tt $(,$rest:tt)*) => {
|
($first:tt $(,$rest:tt)*) => {
|
||||||
$(
|
$(
|
||||||
#[cfg(not(feature = "clippy"))] // ignore multiple definition for clippy
|
#[cfg(all(not(any(doc, feature = "clippy")), feature = $first, feature = $rest))]
|
||||||
#[cfg(all(feature = $first, feature = $rest))]
|
|
||||||
compile_error!(concat!("features \"", $first, "\" and \"", $rest, "\" cannot be used together"));
|
compile_error!(concat!("features \"", $first, "\" and \"", $rest, "\" cannot be used together"));
|
||||||
)*
|
)*
|
||||||
assert_unique_feature!($($rest),*);
|
assert_unique_feature!($($rest),*);
|
||||||
|
@ -5,8 +5,7 @@ macro_rules! assert_unique_feature {
|
|||||||
() => {};
|
() => {};
|
||||||
($first:tt $(,$rest:tt)*) => {
|
($first:tt $(,$rest:tt)*) => {
|
||||||
$(
|
$(
|
||||||
#[cfg(not(feature = "clippy"))] // ignore multiple definition for clippy
|
#[cfg(all(not(any(doc, feature = "clippy")), feature = $first, feature = $rest))]
|
||||||
#[cfg(all(feature = $first, feature = $rest))]
|
|
||||||
compile_error!(concat!("features \"", $first, "\" and \"", $rest, "\" cannot be used together"));
|
compile_error!(concat!("features \"", $first, "\" and \"", $rest, "\" cannot be used together"));
|
||||||
)*
|
)*
|
||||||
assert_unique_feature!($($rest),*);
|
assert_unique_feature!($($rest),*);
|
||||||
|
@ -14,6 +14,7 @@ categories = ["development-tools::testing", "emulators", "embedded", "os", "no-s
|
|||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["document-features"]
|
features = ["document-features"]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
rustc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std", "derive", "llmp_compression", "llmp_small_maps", "llmp_broker_timeouts", "rand_trait", "fork", "prelude", "gzip", "regex", "serdeany_autoreg", "tui_monitor", "libafl_bolts/xxh3"]
|
default = ["std", "derive", "llmp_compression", "llmp_small_maps", "llmp_broker_timeouts", "rand_trait", "fork", "prelude", "gzip", "regex", "serdeany_autoreg", "tui_monitor", "libafl_bolts/xxh3"]
|
||||||
|
@ -8,7 +8,7 @@ fn main() {
|
|||||||
fn main() {
|
fn main() {
|
||||||
println!("cargo:rerun-if-changed=build.rs");
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
assert!(
|
assert!(
|
||||||
cfg!(not(feature = "nautilus")),
|
cfg!(all(not(docrs), not(feature = "nautilus"))),
|
||||||
"The 'nautilus' feature of libafl requires a nightly compiler"
|
"The 'nautilus' feature of libafl requires a nightly compiler"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ categories = ["development-tools::testing", "emulators", "embedded", "os", "no-s
|
|||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["fork", "build_libqasan", "serdeany_autoreg"]
|
default = ["fork", "build_libqasan", "serdeany_autoreg"]
|
||||||
|
@ -13,6 +13,7 @@ categories = ["development-tools::testing", "emulators", "embedded", "os", "no-s
|
|||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# The following architecture features are mutually exclusive.
|
# The following architecture features are mutually exclusive.
|
||||||
|
@ -7,8 +7,7 @@ macro_rules! assert_unique_feature {
|
|||||||
() => {};
|
() => {};
|
||||||
($first:tt $(,$rest:tt)*) => {
|
($first:tt $(,$rest:tt)*) => {
|
||||||
$(
|
$(
|
||||||
#[cfg(not(feature = "clippy"))] // ignore multiple definition for clippy
|
#[cfg(all(not(any(docsrs, feature = "clippy")), feature = $first, feature = $rest))]
|
||||||
#[cfg(all(feature = $first, feature = $rest))]
|
|
||||||
compile_error!(concat!("features \"", $first, "\" and \"", $rest, "\" cannot be used together"));
|
compile_error!(concat!("features \"", $first, "\" and \"", $rest, "\" cannot be used together"));
|
||||||
)*
|
)*
|
||||||
assert_unique_feature!($($rest),*);
|
assert_unique_feature!($($rest),*);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user