From 641d4f5898fd3d5a8a620d0e313d6eb7fb2e5cac Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 2 Aug 2023 10:10:15 -0400 Subject: [PATCH] Build nightly rustfmt using `--all-features` in CI Previously we were only building rustfmt with default features in CI. We recently received a report that rustfmt was unable to compile with the `generic-simd` feature, which is not enabled by default. To prevent a similar situation in the future we'll start build nightly rustfmt with all features enabled. --- ci/build_and_test.bat | 6 +++++- ci/build_and_test.sh | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/build_and_test.bat b/ci/build_and_test.bat index 69dae1fff7b..16608a4aaa7 100755 --- a/ci/build_and_test.bat +++ b/ci/build_and_test.bat @@ -6,7 +6,11 @@ rustc -Vv || exit /b 1 cargo -V || exit /b 1 :: Build and test main crate -cargo build --locked || exit /b 1 +if "%CFG_RELEASE_CHANNEL%"=="nightly" ( + cargo build --locked --all-features || exit /b 1 +) else ( + cargo build --locked || exit /b 1 +) cargo test || exit /b 1 :: Build and test other crates diff --git a/ci/build_and_test.sh b/ci/build_and_test.sh index 94991853263..207da362fd6 100755 --- a/ci/build_and_test.sh +++ b/ci/build_and_test.sh @@ -10,7 +10,11 @@ rustc -Vv cargo -V # Build and test main crate -cargo build --locked +if [ "$CFG_RELEASE_CHANNEL" == "nightly" ]; then + cargo build --locked --all-features +else + cargo build --locked +fi cargo test # Build and test other crates