Skip to content

Commit

Permalink
Merge pull request #296 from tgross35/ci-deny-warnings
Browse files Browse the repository at this point in the history
Deny warnings in CI
  • Loading branch information
Amanieu committed May 6, 2024
2 parents a1e8a5b + 32e7d04 commit 279e5f6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI
on: [push, pull_request]

env:
RUSTDOCFLAGS: -Dwarnings
RUSTFLAGS: -Dwarnings

jobs:
docker:
name: Docker
Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
1 change: 1 addition & 0 deletions ci/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 3 additions & 0 deletions crates/compiler-builtins-smoke-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ authors = ["Jorge Aparicio <jorge@japaric.io>"]
test = false
bench = false

[features]
unstable = []
checked = []
3 changes: 3 additions & 0 deletions crates/compiler-builtins-smoke-test/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("cargo::rustc-check-cfg=cfg(assert_no_panic)");
}
2 changes: 1 addition & 1 deletion crates/compiler-builtins-smoke-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#![no_std]

#[path = "../../../src/math/mod.rs"]
mod libm;
pub mod libm;

0 comments on commit 279e5f6

Please sign in to comment.