Skip to content

Commit fe57c74

Browse files
committed
scripts: use release mode for rerun test to reuse caches
1 parent d51f808 commit fe57c74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/check_cargo_build_rerun.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cd "$SOURCE_FOLDER"
1616
# Ensure that we do see a "Compiling" in the output
1717
# as if we do it means we have a cargo::rerun-if-changed incorrectly
1818
function check_build_contains_compiling() {
19-
BUILD=$(cargo build --target-dir="$BUILD_FOLDER" -p qml-minimal-no-cmake 2>&1)
19+
BUILD=$(cargo build --release --target-dir="$BUILD_FOLDER" -p qml-minimal-no-cmake 2>&1)
2020

2121
if ! echo "$BUILD" | grep -q Compiling; then
2222
echo "cargo build is missing text 'Compiling', likely an incorrect cargo::rerun-if-changed in a build script."
@@ -27,7 +27,7 @@ function check_build_contains_compiling() {
2727
# Ensure that we don't see any "Compiling" in the output
2828
# as if we do it means we have a cargo::rerun-if-changed incorrectly
2929
function check_build_no_compiling() {
30-
BUILD=$(cargo build --target-dir="$BUILD_FOLDER" -p qml-minimal-no-cmake 2>&1)
30+
BUILD=$(cargo build --release --target-dir="$BUILD_FOLDER" -p qml-minimal-no-cmake 2>&1)
3131

3232
if echo "$BUILD" | grep -q Compiling; then
3333
echo "cargo build contained text 'Compiling', likely an incorrect cargo::rerun-if-changed in a build script."
@@ -36,7 +36,7 @@ function check_build_no_compiling() {
3636
}
3737

3838
# Build once
39-
cargo build --target-dir="$BUILD_FOLDER" -p qml-minimal-no-cmake
39+
cargo build --release --target-dir="$BUILD_FOLDER" -p qml-minimal-no-cmake
4040

4141
# Build a second time
4242
check_build_no_compiling

0 commit comments

Comments
 (0)