Deny warnings in CI
The main crate already has `#![deny(warnings)]`. Set RUSTFLAGS in CI to enforce this for other crates in the workspace.
This commit is contained in:
parent
0297889d86
commit
c7eadedd5f
6 changed files with 16 additions and 1 deletions
|
|
@ -1,6 +1,10 @@
|
|||
name: CI
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
RUSTDOCFLAGS: -Dwarnings
|
||||
RUSTFLAGS: -Dwarnings
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Docker
|
||||
|
|
|
|||
|
|
@ -2,10 +2,14 @@ use std::env;
|
|||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo::rustc-check-cfg=cfg(assert_no_panic)");
|
||||
println!("cargo::rustc-check-cfg=cfg(feature, values(\"unstable\"))");
|
||||
|
||||
#[cfg(feature = "musl-reference-tests")]
|
||||
musl_reference_tests::generate();
|
||||
|
||||
println!("cargo::rustc-check-cfg=cfg(feature, values(\"checked\"))");
|
||||
#[allow(unexpected_cfgs)]
|
||||
if !cfg!(feature = "checked") {
|
||||
let lvl = env::var("OPT_LEVEL").unwrap();
|
||||
if lvl != "0" {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ run() {
|
|||
docker run \
|
||||
--rm \
|
||||
--user $(id -u):$(id -g) \
|
||||
-e RUSTFLAGS \
|
||||
-e CARGO_HOME=/cargo \
|
||||
-e CARGO_TARGET_DIR=/target \
|
||||
-v "${HOME}/.cargo":/cargo \
|
||||
|
|
|
|||
|
|
@ -7,3 +7,6 @@ authors = ["Jorge Aparicio <jorge@japaric.io>"]
|
|||
test = false
|
||||
bench = false
|
||||
|
||||
[features]
|
||||
unstable = []
|
||||
checked = []
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("cargo::rustc-check-cfg=cfg(assert_no_panic)");
|
||||
}
|
||||
|
|
@ -6,4 +6,4 @@
|
|||
#![no_std]
|
||||
|
||||
#[path = "../../../src/math/mod.rs"]
|
||||
mod libm;
|
||||
pub mod libm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue