From 90f9d6e67ceb3ccac780407f8100d6a7cb7f1d86 Mon Sep 17 00:00:00 2001 From: Clyde Gerber Date: Sun, 19 Apr 2026 16:44:20 -0500 Subject: [PATCH] ci: enforce warnings as errors in test entrypoints Add RUSTFLAGS="-D warnings" to cargo test and cargo doc invocations in both entrypoint.sh and entrypoint-test-current.sh so that any newly introduced compiler warning causes CI to fail. This commit was created by an automated coding assistant, with human supervision. --- build/entrypoint-test-current.sh | 2 ++ build/entrypoint.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/entrypoint-test-current.sh b/build/entrypoint-test-current.sh index 004e9cc4..e8bf32b2 100755 --- a/build/entrypoint-test-current.sh +++ b/build/entrypoint-test-current.sh @@ -25,6 +25,7 @@ env function run_cargo_test() { env LD_LIBRARY_PATH="${ICU_LIBRARY_PATH}/lib" \ PKG_CONFIG_LIBDIR="${ICU_LIBRARY_PATH}/lib/pkgconfig" \ + RUSTFLAGS="-D warnings" \ cargo test \ ${_local_cargo_options} \ ${CARGO_TEST_ARGS} @@ -33,6 +34,7 @@ function run_cargo_test() { function run_cargo_doc() { env LD_LIBRARY_PATH="${ICU_LIBRARY_PATH}/lib" \ PKG_CONFIG_LIBDIR="${ICU_LIBRARY_PATH}/lib/pkgconfig" \ + RUSTFLAGS="-D warnings" \ cargo doc ${_local_cargo_options} ${CARGO_TEST_ARGS} } diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 489d46ce..f827c836 100755 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -11,11 +11,11 @@ readonly __all_dirs="$(ls -d rust_icu_*)" env function run_cargo_test() { - env LD_LIBRARY_PATH="/usr/local/lib" cargo test ${CARGO_TEST_ARGS} + env LD_LIBRARY_PATH="/usr/local/lib" RUSTFLAGS="-D warnings" cargo test ${CARGO_TEST_ARGS} } function run_cargo_doc() { - env LD_LIBRARY_PATH="/usr/local/lib" cargo doc ${CARGO_TEST_ARGS} + env LD_LIBRARY_PATH="/usr/local/lib" RUSTFLAGS="-D warnings" cargo doc ${CARGO_TEST_ARGS} } # Running cargo test or doc in the top level directory actually does nothing.