Skip to content

Commit 2dba144

Browse files
author
Atlas
committed
fix(ci): make Darwin RUSTFLAGS check conditional
The verify-nightly-config.sh script was failing on Linux because it unconditionally checked for macOS-specific Darwin RUSTFLAGS. Now the Darwin check only runs when running on macOS (uname -s == Darwin). This allows CI to pass on Linux runners while still verifying macOS config on macOS runners.
1 parent f65303d commit 2dba144

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/verify-nightly-config.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ verify_config_composition() {
5353
assert_config_contains "${CARGO_CONFIG}" 'PLATFORM_LINKER_RUSTFLAGS = { value = "${PLATFORM_LINKER_RUSTFLAGS}", force = false }'
5454
assert_config_contains "${CARGO_CONFIG}" 'PLATFORM_LINKER_RUSTFLAGS_DARWIN = { value = "${PLATFORM_LINKER_RUSTFLAGS_DARWIN}", force = false }'
5555
assert_config_contains "${CARGO_CONFIG}" 'RUSTFLAGS = { value = "${RUSTFLAGS} ${PLATFORM_NIGHTLY_RUSTFLAGS} ${PLATFORM_FAST_LINKER_RUSTFLAGS} ${PLATFORM_LINKER_RUSTFLAGS}", force = true }'
56-
assert_config_contains "${CARGO_CONFIG}" 'RUSTFLAGS = { value = "${RUSTFLAGS} ${PLATFORM_NIGHTLY_RUSTFLAGS} ${PLATFORM_FAST_LINKER_RUSTFLAGS_DARWIN} ${PLATFORM_LINKER_RUSTFLAGS_DARWIN}", force = true }'
56+
# Darwin RUSTFLAGS is checked only on macOS
57+
if [[ "$(uname -s)" == "Darwin" ]]; then
58+
assert_config_contains "${CARGO_CONFIG}" 'RUSTFLAGS = { value = "${RUSTFLAGS} ${PLATFORM_NIGHTLY_RUSTFLAGS} ${PLATFORM_FAST_LINKER_RUSTFLAGS_DARWIN} ${PLATFORM_LINKER_RUSTFLAGS_DARWIN}", force = true }'
59+
fi
5760
assert_config_contains "${NIGHTLY_CONFIG}" 'PLATFORM_NIGHTLY_RUSTFLAGS = "-Z threads=0"'
5861
}
5962

0 commit comments

Comments
 (0)