Skip to content

Commit

Permalink
Deny warnings in CI
Browse files Browse the repository at this point in the history
The main crate already has `#![deny(warnings)]`. Set RUSTFLAGS in CI to
enforce this for other crates in the workspace.
  • Loading branch information
tgross35 committed May 6, 2024
1 parent a1e8a5b commit b9f81ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
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
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ fn main() {
#[cfg(feature = "musl-reference-tests")]
musl_reference_tests::generate();

println!("cargo::rustc-check-cfg=cfg(assert_no_panic)");
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=${RUSTFLAGS:-}" \
-e CARGO_HOME=/cargo \
-e CARGO_TARGET_DIR=/target \
-v "${HOME}/.cargo":/cargo \
Expand Down

0 comments on commit b9f81ee

Please sign in to comment.