diff options
| author | bors <bors@rust-lang.org> | 2019-10-28 17:17:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-28 17:17:30 +0000 |
| commit | b497e18995d6b6992f97512c6b86b5cb3f2f34f5 (patch) | |
| tree | 103497af035ddea52b0bfb006ab166254faeff68 /src/ci/scripts/switch-xcode.sh | |
| parent | 8d78bf6b273848d17da8f5c92162c6a6b9b10dfd (diff) | |
| parent | 7e051236b02ae6d924f24e080784fcf10cb8c4d3 (diff) | |
| download | rust-b497e18995d6b6992f97512c6b86b5cb3f2f34f5.tar.gz rust-b497e18995d6b6992f97512c6b86b5cb3f2f34f5.zip | |
Auto merge of #65202 - pietroalbini:scriptify-ci-config, r=alexcrichton
ci: move most of the prepare config into scripts This PR moves most of the configuration from the CI yamls into bash scripts, driven by a small Python script (which understands and emulates the two `##vso[` commands we use). There are two reasons why we'd want to do this: * Being able to prepare the build environment locally by just running `src/ci/prepare.py` simplifies a lot setting up a local VM similar to CI (software pre-installed in the CI images won't be prepared, but it's a start anyway). * When we'll switch to GitHub Actions we'll need to either duplicate code in multiple workflows or write a preprocessor. Having all the prepare steps in a single one is going to simplify the implementation of both options. Along with the move I did a few changes to the actual scripts: * Mirrored all the remaining external URLs we download (except chocolatey) to the `rust-lang-ci-mirrors` bucket, to increase reliability and reduce the chance of supply chain attacks. I didn't audit and mirror the CI scripts outside this PR though. * Extracted CI-specific behavior (like issuing `##vso[` commands and detecting the host platform) into `shared.sh` and included it in most of the scripts. This way a switch to another CI provider will be less painful. It's possible (and easier) to review this commit-by-commit. r? @alexcrichton cc @rust-lang/infra
Diffstat (limited to 'src/ci/scripts/switch-xcode.sh')
| -rwxr-xr-x | src/ci/scripts/switch-xcode.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ci/scripts/switch-xcode.sh b/src/ci/scripts/switch-xcode.sh new file mode 100755 index 00000000000..2cbb2ddbc70 --- /dev/null +++ b/src/ci/scripts/switch-xcode.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Switch to XCode 9.3 on OSX since it seems to be the last version that supports +# i686-apple-darwin. We'll eventually want to upgrade this and it will probably +# force us to drop i686-apple-darwin, but let's keep the wheels turning for now. + +set -euo pipefail +IFS=$'\n\t' + +source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" + +if isMacOS; then + sudo xcode-select --switch /Applications/Xcode_9.3.app +fi |
