From 5df5175361a3d99804bfc45c2da06dadc65cdc94 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 10 Feb 2024 21:02:16 -0800 Subject: [PATCH] Require that SELECT_XCODE is set. Allowing the Xcode version to "float" based on whatever default GitHub selects creates an unreliable environment. When GitHub changes the default, we can have multiple jobs in the same run using different versions as it rolls out across machines. It can also cause oscillation between runs as different machines are used. It also causes unpredictable timing when the updates happen. This change helps ensure that the version that is used is pinned. The downside is that it requires manually bumping the version, and the risk that if we take too long, older Xcodes will be removed and that will break the build. (cherry picked from commit 4ce1f1cffc7c63928cac447afe8010e6daaa42d6) --- src/ci/scripts/select-xcode.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ci/scripts/select-xcode.sh b/src/ci/scripts/select-xcode.sh index 3b9c77d42ba5f..569c4a4136d97 100755 --- a/src/ci/scripts/select-xcode.sh +++ b/src/ci/scripts/select-xcode.sh @@ -7,7 +7,5 @@ IFS=$'\n\t' source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" if isMacOS; then - if [[ -s "${SELECT_XCODE-}" ]]; then - sudo xcode-select -s "${SELECT_XCODE}" - fi + sudo xcode-select -s "${SELECT_XCODE}" fi