Merge pull request rust-lang/libm#296 from tgross35/ci-deny-warnings

Deny warnings in CI
This commit is contained in:
Amanieu d'Antras 2024-05-06 11:55:48 +02:00 committed by GitHub
commit 088794e045
6 changed files with 16 additions and 1 deletions

View file

@ -1,6 +1,10 @@
name: CI
on: [push, pull_request]
env:
RUSTDOCFLAGS: -Dwarnings
RUSTFLAGS: -Dwarnings
jobs:
docker:
name: Docker

View file

@ -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" {

View file

@ -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 \

View file

@ -7,3 +7,6 @@ authors = ["Jorge Aparicio <jorge@japaric.io>"]
test = false
bench = false
[features]
unstable = []
checked = []

View file

@ -0,0 +1,3 @@
fn main() {
println!("cargo::rustc-check-cfg=cfg(assert_no_panic)");
}

View file

@ -6,4 +6,4 @@
#![no_std]
#[path = "../../../src/math/mod.rs"]
mod libm;
pub mod libm;