about summary refs log tree commit diff
path: root/src/ci
diff options
context:
space:
mode:
authorBlackHoleFox <blackholefoxdev@gmail.com>2022-11-19 14:18:09 -0600
committerBlackHoleFox <blackholefoxdev@gmail.com>2022-11-19 14:19:00 -0600
commitc46987b7dd22b8cebcda816239a2eaa5dcc1b52f (patch)
treefd668e8959f7025ee1f0713632b75dea006ebd0b /src/ci
parent2a434286a96d61e9f55a3144004beec48206bb29 (diff)
downloadrust-c46987b7dd22b8cebcda816239a2eaa5dcc1b52f.tar.gz
rust-c46987b7dd22b8cebcda816239a2eaa5dcc1b52f.zip
Bring back XCode selection CI script
This reverts commit 8514b0097b28f84ee5cfead059a5771c6a693fb0.
Diffstat (limited to 'src/ci')
-rw-r--r--src/ci/github-actions/ci.yml5
-rwxr-xr-xsrc/ci/scripts/select-xcode.sh13
2 files changed, 18 insertions, 0 deletions
diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml
index 9f401779900..0d8c494e859 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -153,6 +153,10 @@ x--expand-yaml-anchors--remove:
         run: src/ci/scripts/install-sccache.sh
         <<: *step
 
+      - name: select Xcode
+        run: src/ci/scripts/select-xcode.sh
+        <<: *step
+
       - name: install clang
         run: src/ci/scripts/install-clang.sh
         <<: *step
@@ -527,6 +531,7 @@ jobs:
                 --set rust.jemalloc
                 --set llvm.ninja=false
               RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
+              SELECT_XCODE: /Applications/Xcode_12.2.app
               USE_XCODE_CLANG: 1
               MACOSX_DEPLOYMENT_TARGET: 11.0
               MACOSX_STD_DEPLOYMENT_TARGET: 11.0
diff --git a/src/ci/scripts/select-xcode.sh b/src/ci/scripts/select-xcode.sh
new file mode 100755
index 00000000000..3b9c77d42ba
--- /dev/null
+++ b/src/ci/scripts/select-xcode.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+# This script selects the Xcode instance to use.
+
+set -euo pipefail
+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
+fi