Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Deny warnings in CI #296

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>"]
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;