Skip to content

Commit a7763d4

Browse files
committed
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.
1 parent 703baad commit a7763d4

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

build/entrypoint-test-current.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ env
2525
function run_cargo_test() {
2626
env LD_LIBRARY_PATH="${ICU_LIBRARY_PATH}/lib" \
2727
PKG_CONFIG_LIBDIR="${ICU_LIBRARY_PATH}/lib/pkgconfig" \
28+
RUSTFLAGS="-D warnings" \
2829
cargo test \
2930
${_local_cargo_options} \
3031
${CARGO_TEST_ARGS}
@@ -33,6 +34,7 @@ function run_cargo_test() {
3334
function run_cargo_doc() {
3435
env LD_LIBRARY_PATH="${ICU_LIBRARY_PATH}/lib" \
3536
PKG_CONFIG_LIBDIR="${ICU_LIBRARY_PATH}/lib/pkgconfig" \
37+
RUSTFLAGS="-D warnings" \
3638
cargo doc ${_local_cargo_options} ${CARGO_TEST_ARGS}
3739
}
3840

build/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ readonly __all_dirs="$(ls -d rust_icu_*)"
1111
env
1212

1313
function run_cargo_test() {
14-
env LD_LIBRARY_PATH="/usr/local/lib" cargo test ${CARGO_TEST_ARGS}
14+
env LD_LIBRARY_PATH="/usr/local/lib" RUSTFLAGS="-D warnings" cargo test ${CARGO_TEST_ARGS}
1515
}
1616

1717
function run_cargo_doc() {
18-
env LD_LIBRARY_PATH="/usr/local/lib" cargo doc ${CARGO_TEST_ARGS}
18+
env LD_LIBRARY_PATH="/usr/local/lib" RUSTFLAGS="-D warnings" cargo doc ${CARGO_TEST_ARGS}
1919
}
2020

2121
# Running cargo test or doc in the top level directory actually does nothing.

0 commit comments

Comments
 (0)