diff options
| author | bors <bors@rust-lang.org> | 2019-11-19 12:11:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-19 12:11:09 +0000 |
| commit | 9d6ff1553b7debbe5c99c102ce0978b6130592f8 (patch) | |
| tree | ecd66e45b8f75d0ad7b407c61e9570a9b5e9646d /src/ci/scripts | |
| parent | 2cad8bb659066b42fc518c95def384956126bd3f (diff) | |
| parent | e1a32faf880360c836a350dbfe9a02d2cd45bcf9 (diff) | |
| download | rust-9d6ff1553b7debbe5c99c102ce0978b6130592f8.tar.gz rust-9d6ff1553b7debbe5c99c102ce0978b6130592f8.zip | |
Auto merge of #66545 - Centril:rollup-xv2rx7v, r=Centril
Rollup of 11 pull requests Successful merges: - #66090 (Misc CI improvements) - #66155 (Add long error explanation for E0594) - #66239 (Suggest calling async closure when needed) - #66430 ([doc] Fix the source code highlighting on source comments) - #66431 (Fix 'type annotations needed' error with opaque types) - #66461 (Add explanation message for E0641) - #66493 (Add JohnTitor to rustc-guide toolstate notification list) - #66511 (std::error::Chain: remove Copy) - #66529 (resolve: Give derive helpers highest priority during resolution) - #66536 (Move the definition of `QueryResult` into `plumbing.rs`.) - #66538 (Remove compiler_builtins_lib feature from libstd) Failed merges: r? @ghost
Diffstat (limited to 'src/ci/scripts')
| -rwxr-xr-x | src/ci/scripts/collect-cpu-stats.sh | 9 | ||||
| -rwxr-xr-x | src/ci/scripts/install-clang.sh | 2 | ||||
| -rwxr-xr-x | src/ci/scripts/install-mingw.sh | 37 | ||||
| -rwxr-xr-x | src/ci/scripts/run-build-from-ci.sh | 21 |
4 files changed, 59 insertions, 10 deletions
diff --git a/src/ci/scripts/collect-cpu-stats.sh b/src/ci/scripts/collect-cpu-stats.sh new file mode 100755 index 00000000000..08065431f98 --- /dev/null +++ b/src/ci/scripts/collect-cpu-stats.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Spawn a background process to collect CPU usage statistics which we'll upload +# at the end of the build. See the comments in the script here for more +# information. + +set -euo pipefail +IFS=$'\n\t' + +python src/ci/cpu-usage-over-time.py &> cpu-usage.csv & diff --git a/src/ci/scripts/install-clang.sh b/src/ci/scripts/install-clang.sh index b1e9bf92ca5..f0179994e8e 100755 --- a/src/ci/scripts/install-clang.sh +++ b/src/ci/scripts/install-clang.sh @@ -17,7 +17,7 @@ if isMacOS; then # Configure `AR` specifically so rustbuild doesn't try to infer it as # `clang-ar` by accident. ciCommandSetEnv AR "ar" -elif isWindows && [[ -z ${MINGW_URL+x} ]]; then +elif isWindows && [[ ${CUSTOM_MINGW-0} -ne 1 ]]; then # If we're compiling for MSVC then we, like most other distribution builders, # switch to clang as the compiler. This'll allow us eventually to enable LTO # amongst LLVM and rustc. Note that we only do this on MSVC as I don't think diff --git a/src/ci/scripts/install-mingw.sh b/src/ci/scripts/install-mingw.sh index b4e8b889f52..8b579587b9e 100755 --- a/src/ci/scripts/install-mingw.sh +++ b/src/ci/scripts/install-mingw.sh @@ -27,19 +27,38 @@ IFS=$'\n\t' source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" +MINGW_ARCHIVE_32="i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z" +MINGW_ARCHIVE_64="x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z" + if isWindows; then - if [[ -z "${MINGW_URL+x}" ]]; then - arch=i686 - if [ "$MSYS_BITS" = "64" ]; then - arch=x86_64 - fi + case "${CI_JOB_NAME}" in + *i686*) + bits=32 + arch=i686 + mingw_archive="${MINGW_ARCHIVE_32}" + ;; + *x86_64*) + bits=64 + arch=x86_64 + mingw_archive="${MINGW_ARCHIVE_64}" + ;; + *) + echo "src/ci/scripts/install-mingw.sh can't detect the builder's architecture" + echo "please tweak it to recognize the builder named '${CI_JOB_NAME}'" + exit 1 + ;; + esac + + if [[ "${CUSTOM_MINGW-0}" -ne 1 ]]; then pacman -S --noconfirm --needed mingw-w64-$arch-toolchain mingw-w64-$arch-cmake \ mingw-w64-$arch-gcc mingw-w64-$arch-python2 - ciCommandAddPath "${SYSTEM_WORKFOLDER}/msys2/mingw${MSYS_BITS}/bin" + ciCommandAddPath "${SYSTEM_WORKFOLDER}/msys2/mingw${bits}/bin" else - curl -o mingw.7z "${MINGW_URL}/${MINGW_ARCHIVE}" + mingw_dir="mingw${bits}" + + curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}" 7z x -y mingw.7z > /dev/null - curl -o "${MINGW_DIR}/bin/gdborig.exe" "${MINGW_URL}/2017-04-20-${MSYS_BITS}bit-gdborig.exe" - ciCommandAddPath "$(pwd)/${MINGW_DIR}/bin" + curl -o "${mingw_dir}/bin/gdborig.exe" "${MIRRORS_BASE}/2017-04-20-${bits}bit-gdborig.exe" + ciCommandAddPath "$(pwd)/${mingw_dir}/bin" fi fi diff --git a/src/ci/scripts/run-build-from-ci.sh b/src/ci/scripts/run-build-from-ci.sh new file mode 100755 index 00000000000..c02117f459d --- /dev/null +++ b/src/ci/scripts/run-build-from-ci.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Start the CI build. You shouldn't run this locally: call either src/ci/run.sh +# or src/ci/docker/run.sh instead. + +set -euo pipefail +IFS=$'\n\t' + +source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" + +export CI="true" +export SRC=. + +# Remove any preexisting rustup installation since it can interfere +# with the cargotest step and its auto-detection of things like Clippy in +# the environment +rustup self uninstall -y || true +if [ -z "${IMAGE+x}" ]; then + src/ci/run.sh +else + src/ci/docker/run.sh "${IMAGE}" +fi |
