Skip to content

Commit 815f03e

Browse files
BlackHoleFoxpietroalbini
authored andcommitted
Bring back XCode selection CI script
This reverts commit 8514b00.
1 parent 61b1219 commit 815f03e

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.github/workflows/ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ jobs:
9696
- name: install sccache
9797
run: src/ci/scripts/install-sccache.sh
9898
if: success() && !env.SKIP_JOB
99+
- name: select Xcode
100+
run: src/ci/scripts/select-xcode.sh
101+
if: success() && !env.SKIP_JOB
99102
- name: install clang
100103
run: src/ci/scripts/install-clang.sh
101104
if: success() && !env.SKIP_JOB
@@ -353,6 +356,7 @@ jobs:
353356
SCRIPT: "./x.py dist bootstrap --include-default-paths --stage 2"
354357
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-full-tools --enable-sanitizers --enable-profiler --disable-docs --set rust.jemalloc --set llvm.ninja=false"
355358
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
359+
SELECT_XCODE: /Applications/Xcode_12.2.app
356360
USE_XCODE_CLANG: 1
357361
MACOSX_DEPLOYMENT_TARGET: 11.0
358362
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
@@ -503,6 +507,9 @@ jobs:
503507
- name: install sccache
504508
run: src/ci/scripts/install-sccache.sh
505509
if: success() && !env.SKIP_JOB
510+
- name: select Xcode
511+
run: src/ci/scripts/select-xcode.sh
512+
if: success() && !env.SKIP_JOB
506513
- name: install clang
507514
run: src/ci/scripts/install-clang.sh
508515
if: success() && !env.SKIP_JOB
@@ -615,6 +622,9 @@ jobs:
615622
- name: install sccache
616623
run: src/ci/scripts/install-sccache.sh
617624
if: success() && !env.SKIP_JOB
625+
- name: select Xcode
626+
run: src/ci/scripts/select-xcode.sh
627+
if: success() && !env.SKIP_JOB
618628
- name: install clang
619629
run: src/ci/scripts/install-clang.sh
620630
if: success() && !env.SKIP_JOB

src/ci/github-actions/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ x--expand-yaml-anchors--remove:
153153
run: src/ci/scripts/install-sccache.sh
154154
<<: *step
155155

156+
- name: select Xcode
157+
run: src/ci/scripts/select-xcode.sh
158+
<<: *step
159+
156160
- name: install clang
157161
run: src/ci/scripts/install-clang.sh
158162
<<: *step
@@ -527,6 +531,7 @@ jobs:
527531
--set rust.jemalloc
528532
--set llvm.ninja=false
529533
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
534+
SELECT_XCODE: /Applications/Xcode_12.2.app
530535
USE_XCODE_CLANG: 1
531536
MACOSX_DEPLOYMENT_TARGET: 11.0
532537
MACOSX_STD_DEPLOYMENT_TARGET: 11.0

src/ci/scripts/select-xcode.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# This script selects the Xcode instance to use.
3+
4+
set -euo pipefail
5+
IFS=$'\n\t'
6+
7+
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
8+
9+
if isMacOS; then
10+
if [[ -s "${SELECT_XCODE-}" ]]; then
11+
sudo xcode-select -s "${SELECT_XCODE}"
12+
fi
13+
fi

0 commit comments

Comments
 (0)