Skip to content

Commit

Permalink
Auto merge of #65202 - pietroalbini:scriptify-ci-config, r=<try>
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Oct 28, 2019
2 parents 03a50ae + af5cc3d commit 0a65fe3
Show file tree
Hide file tree
Showing 24 changed files with 463 additions and 289 deletions.
2 changes: 2 additions & 0 deletions src/ci/azure-pipelines/auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ jobs:

# 32/64 bit MSVC and GNU deployment
dist-x86_64-msvc:
MSYS_BITS: 64
RUST_CONFIGURE_ARGS: >
--build=x86_64-pc-windows-msvc
--target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc
Expand All @@ -324,6 +325,7 @@ jobs:
DIST_REQUIRE_ALL_TOOLS: 1
DEPLOY: 1
dist-i686-msvc:
MSYS_BITS: 32
RUST_CONFIGURE_ARGS: >
--build=i686-pc-windows-msvc
--target=i586-pc-windows-msvc
Expand Down
46 changes: 0 additions & 46 deletions src/ci/azure-pipelines/steps/install-clang.yml

This file was deleted.

21 changes: 0 additions & 21 deletions src/ci/azure-pipelines/steps/install-sccache.yml

This file was deleted.

143 changes: 0 additions & 143 deletions src/ci/azure-pipelines/steps/install-windows-build-deps.yml

This file was deleted.

Loading

0 comments on commit 0a65fe3

Please sign in to comment.