diff --git a/src/ci/azure-pipelines/auto.yml b/src/ci/azure-pipelines/auto.yml index 74b7469ea27b7..f00d3c6da62db 100644 --- a/src/ci/azure-pipelines/auto.yml +++ b/src/ci/azure-pipelines/auto.yml @@ -76,7 +76,7 @@ jobs: # version that we're using, 8.2, cannot compile LLVM for OSX 10.7. x86_64-apple: SCRIPT: ./x.py test - RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 MACOSX_DEPLOYMENT_TARGET: 10.8 MACOSX_STD_DEPLOYMENT_TARGET: 10.7 @@ -85,7 +85,7 @@ jobs: dist-x86_64-apple: SCRIPT: ./x.py dist - RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc + IINTIAL_RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 MACOSX_DEPLOYMENT_TARGET: 10.7 NO_LLVM_ASSERTIONS: 1 @@ -94,7 +94,7 @@ jobs: dist-x86_64-apple-alt: SCRIPT: ./x.py dist - RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc + INITIAL_RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 MACOSX_DEPLOYMENT_TARGET: 10.7 NO_LLVM_ASSERTIONS: 1 @@ -111,22 +111,22 @@ jobs: matrix: # 32/64 bit MSVC tests x86_64-msvc-1: - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler SCRIPT: make ci-subset-1 # FIXME(#59637) NO_DEBUG_ASSERTIONS: 1 NO_LLVM_ASSERTIONS: 1 x86_64-msvc-2: - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler SCRIPT: make ci-subset-2 i686-msvc-1: - RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc + INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc SCRIPT: make ci-subset-1 # FIXME(#59637) NO_DEBUG_ASSERTIONS: 1 NO_LLVM_ASSERTIONS: 1 i686-msvc-2: - RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc + INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc SCRIPT: make ci-subset-2 # FIXME(#59637) NO_DEBUG_ASSERTIONS: 1 @@ -134,10 +134,10 @@ jobs: # MSVC aux tests x86_64-msvc-aux: RUST_CHECK_TARGET: check-aux EXCLUDE_CARGO=1 - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc x86_64-msvc-cargo: SCRIPT: python x.py test src/tools/cargotest src/tools/cargo - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc VCVARS_BAT: vcvars64.bat # FIXME(#59637) NO_DEBUG_ASSERTIONS: 1 @@ -145,7 +145,7 @@ jobs: # MSVC tools tests x86_64-msvc-tools: SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json # 32/64-bit MinGW builds. # @@ -161,31 +161,31 @@ jobs: # came from the mingw-w64 SourceForge download site. Unfortunately # SourceForge is notoriously flaky, so we mirror it on our own infrastructure. i686-mingw-1: - RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu + INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu SCRIPT: make ci-mingw-subset-1 CUSTOM_MINGW: 1 # FIXME(#59637) NO_DEBUG_ASSERTIONS: 1 NO_LLVM_ASSERTIONS: 1 i686-mingw-2: - RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu + INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu SCRIPT: make ci-mingw-subset-2 CUSTOM_MINGW: 1 x86_64-mingw-1: SCRIPT: make ci-mingw-subset-1 - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu CUSTOM_MINGW: 1 # FIXME(#59637) NO_DEBUG_ASSERTIONS: 1 NO_LLVM_ASSERTIONS: 1 x86_64-mingw-2: SCRIPT: make ci-mingw-subset-2 - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu CUSTOM_MINGW: 1 # 32/64 bit MSVC and GNU deployment dist-x86_64-msvc: - RUST_CONFIGURE_ARGS: >- + INITIAL_RUST_CONFIGURE_ARGS: >- --build=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc --enable-full-tools @@ -193,7 +193,7 @@ jobs: SCRIPT: python x.py dist DIST_REQUIRE_ALL_TOOLS: 1 dist-i686-msvc: - RUST_CONFIGURE_ARGS: >- + INITIAL_RUST_CONFIGURE_ARGS: >- --build=i686-pc-windows-msvc --target=i586-pc-windows-msvc --enable-full-tools @@ -201,17 +201,17 @@ jobs: SCRIPT: python x.py dist DIST_REQUIRE_ALL_TOOLS: 1 dist-i686-mingw: - RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler + INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler SCRIPT: python x.py dist CUSTOM_MINGW: 1 DIST_REQUIRE_ALL_TOOLS: 1 dist-x86_64-mingw: SCRIPT: python x.py dist - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler CUSTOM_MINGW: 1 DIST_REQUIRE_ALL_TOOLS: 1 # "alternate" deployment, see .travis.yml for more info dist-x86_64-msvc-alt: - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler SCRIPT: python x.py dist diff --git a/src/ci/azure-pipelines/try.yml b/src/ci/azure-pipelines/try.yml index a29d6f9ae1ec6..d76aa0ce199a4 100644 --- a/src/ci/azure-pipelines/try.yml +++ b/src/ci/azure-pipelines/try.yml @@ -6,17 +6,212 @@ variables: - group: prod-credentials jobs: -- job: Linux +#- job: Linux +# timeoutInMinutes: 600 +# pool: +# vmImage: ubuntu-16.04 +# steps: +# - template: steps/run.yml +# strategy: +# matrix: + # Round 1 +# x86_64-gnu-llvm-7: +# RUST_BACKTRACE: 1 +# dist-x86_64-linux: {} +# dist-x86_64-linux-alt: +# IMAGE: dist-x86_64-linux +# arm-android: {} +# armhf-gnu: {} +# dist-various-1: {} +# dist-various-2: {} +# dist-aarch64-linux: {} +# dist-android: {} +# dist-arm-linux: {} +# dist-armhf-linux: {} +# dist-armv7-linux: {} +# dist-i586-gnu-i586-i686-musl: {} +# dist-i686-freebsd: {} +# dist-i686-linux: {} +# dist-mips-linux: {} +# dist-mips64-linux: {} +# dist-mips64el-linux: {} +# dist-mipsel-linux: {} +# dist-powerpc-linux: {} +# dist-powerpc64-linux: {} +# dist-powerpc64le-linux: {} +# dist-s390x-linux: {} +# dist-x86_64-freebsd: {} +# dist-x86_64-musl: {} +# dist-x86_64-netbsd: {} +# i686-gnu: {} +# i686-gnu-nopt: {} +# test-various: {} +# wasm32: {} +# x86_64-gnu: {} +# x86_64-gnu-full-bootstrap: {} +# x86_64-gnu-aux: {} +# x86_64-gnu-tools: +# DEPLOY_TOOLSTATES_JSON: toolstates-linux.json +# x86_64-gnu-debug: {} +# x86_64-gnu-nopt: {} +# x86_64-gnu-distcheck: {} +# mingw-check: {} +# +- job: macOS + timeoutInMinutes: 600 + pool: + vmImage: macos-10.15 + steps: + - template: steps/run.yml + strategy: + matrix: + # OSX builders running tests, these run the full test suite. + # NO_DEBUG_ASSERTIONS=1 to make them go faster, but also do have some + # runners that run `//ignore-debug` tests. + # + # Note that the compiler is compiled to target 10.8 here because the Xcode + # version that we're using, 8.2, cannot compile LLVM for OSX 10.7. + x86_64-apple: + SCRIPT: ./x.py test + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc + RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 + MACOSX_DEPLOYMENT_TARGET: 10.8 + MACOSX_STD_DEPLOYMENT_TARGET: 10.7 + NO_LLVM_ASSERTIONS: 1 + NO_DEBUG_ASSERTIONS: 1 + + dist-x86_64-apple: + SCRIPT: ./x.py dist + INITIAL_RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc + RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 + MACOSX_DEPLOYMENT_TARGET: 10.7 + NO_LLVM_ASSERTIONS: 1 + NO_DEBUG_ASSERTIONS: 1 + DIST_REQUIRE_ALL_TOOLS: 1 + + dist-x86_64-apple-alt: + SCRIPT: ./x.py dist + INITIAL_RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc + RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 + MACOSX_DEPLOYMENT_TARGET: 10.7 + NO_LLVM_ASSERTIONS: 1 + NO_DEBUG_ASSERTIONS: 1 + + +- job: Windows timeoutInMinutes: 600 pool: - vmImage: ubuntu-16.04 + vmImage: 'vs2017-win2016' steps: - template: steps/run.yml strategy: matrix: - dist-x86_64-linux: {} - dist-x86_64-linux-alt: - IMAGE: dist-x86_64-linux + # 32/64 bit MSVC tests + x86_64-msvc-1: + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler + SCRIPT: make ci-subset-1 + # FIXME(#59637) + NO_DEBUG_ASSERTIONS: 1 + NO_LLVM_ASSERTIONS: 1 + x86_64-msvc-2: + INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler + SCRIPT: make ci-subset-2 +# i686-msvc-1: +# INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc +# SCRIPT: make ci-subset-1 + # FIXME(#59637) +# NO_DEBUG_ASSERTIONS: 1 +# NO_LLVM_ASSERTIONS: 1 +# i686-msvc-2: +# INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc +# SCRIPT: make ci-subset-2 + # FIXME(#59637) +# NO_DEBUG_ASSERTIONS: 1 +# NO_LLVM_ASSERTIONS: 1 + # MSVC aux tests +# x86_64-msvc-aux: +# RUST_CHECK_TARGET: check-aux EXCLUDE_CARGO=1 +# INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc +# x86_64-msvc-cargo: +# SCRIPT: python x.py test src/tools/cargotest src/tools/cargo +# INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc +# VCVARS_BAT: vcvars64.bat + # FIXME(#59637) +# NO_DEBUG_ASSERTIONS: 1 +# NO_LLVM_ASSERTIONS: 1 + # MSVC tools tests +# x86_64-msvc-tools: +# SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py +# INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json + + # 32/64-bit MinGW builds. + # + # We are using MinGW with posix threads since LLVM does not compile with + # the win32 threads version due to missing support for C++'s std::thread. + # + # Instead of relying on the MinGW version installed on appveryor we download + # and install one ourselves so we won't be surprised by changes to appveyor's + # build image. + # + # Finally, note that the downloads below are all in the `rust-lang-ci` S3 + # bucket, but they cleraly didn't originate there! The downloads originally + # came from the mingw-w64 SourceForge download site. Unfortunately + # SourceForge is notoriously flaky, so we mirror it on our own infrastructure. +# i686-mingw-1: +# INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu +# SCRIPT: make ci-mingw-subset-1 +# CUSTOM_MINGW: 1 + # FIXME(#59637) +# NO_DEBUG_ASSERTIONS: 1 +# NO_LLVM_ASSERTIONS: 1 +# i686-mingw-2: +# INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu +# SCRIPT: make ci-mingw-subset-2 +# CUSTOM_MINGW: 1 +# x86_64-mingw-1: +# SCRIPT: make ci-mingw-subset-1 +# INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu +# CUSTOM_MINGW: 1 + # FIXME(#59637) +# NO_DEBUG_ASSERTIONS: 1 +# NO_LLVM_ASSERTIONS: 1 +# x86_64-mingw-2: +# SCRIPT: make ci-mingw-subset-2 +# INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu +# CUSTOM_MINGW: 1 + + # 32/64 bit MSVC and GNU deployment +# dist-x86_64-msvc: +# INITIAL_RUST_CONFIGURE_ARGS: >- +# --build=x86_64-pc-windows-msvc +# --target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc +# --enable-full-tools +# --enable-profiler +# SCRIPT: python x.py dist +# DIST_REQUIRE_ALL_TOOLS: 1 +# dist-i686-msvc: +# INITIAL_RUST_CONFIGURE_ARGS: >- +# --build=i686-pc-windows-msvc +# --target=i586-pc-windows-msvc +# --enable-full-tools +# --enable-profiler +# SCRIPT: python x.py dist +# DIST_REQUIRE_ALL_TOOLS: 1 +# dist-i686-mingw: +# INITIAL_RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler +# SCRIPT: python x.py dist +# CUSTOM_MINGW: 1 +# DIST_REQUIRE_ALL_TOOLS: 1 +# dist-x86_64-mingw: +# SCRIPT: python x.py dist +# INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler +# CUSTOM_MINGW: 1 +# DIST_REQUIRE_ALL_TOOLS: 1 + + # "alternate" deployment, see .travis.yml for more info +# dist-x86_64-msvc-alt: +# INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler +# SCRIPT: python x.py dist # The macOS and Windows builds here are currently disabled due to them not being # overly necessary on `try` builds. We also don't actually have anything that @@ -32,7 +227,7 @@ jobs: # matrix: # dist-x86_64-apple: # SCRIPT: ./x.py dist -# RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc +# INITIAL_RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc # DEPLOY: 1 # RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 # MACOSX_DEPLOYMENT_TARGET: 10.7 @@ -42,7 +237,7 @@ jobs: # # dist-x86_64-apple-alt: # SCRIPT: ./x.py dist -# RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc +# INITIAL_RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc # DEPLOY_ALT: 1 # RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 # MACOSX_DEPLOYMENT_TARGET: 10.7 @@ -58,7 +253,7 @@ jobs: # strategy: # matrix: # dist-x86_64-msvc: -# RUST_CONFIGURE_ARGS: > +# INITIAL_RUST_CONFIGURE_ARGS: > # --build=x86_64-pc-windows-msvc # --target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc # --enable-full-tools @@ -68,6 +263,6 @@ jobs: # DEPLOY: 1 # # dist-x86_64-msvc-alt: -# RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler +# INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler # SCRIPT: python x.py dist # DEPLOY_ALT: 1 diff --git a/src/ci/scripts/setup-environment.sh b/src/ci/scripts/setup-environment.sh index e126a06edab73..9a493209e3c12 100755 --- a/src/ci/scripts/setup-environment.sh +++ b/src/ci/scripts/setup-environment.sh @@ -8,6 +8,19 @@ IFS=$'\n\t' source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" +# Since matrix variables are readonly in Azure Pipelines, we take +# INITIAL_RUST_CONFIGURE_ARGS and establish RUST_CONFIGURE_ARGS +# which downstream steps can alter +# MacOS ships with Bash 3.16, which means we cannot use +# if [[ -v FOO ]], as that was introduced in Bash 4.2 +if [[ -z "${INITIAL_RUST_CONFIGURE_ARGS+x}" ]]; then + INITIAL_RUST_CONFIG="" + echo "No initial Rust Configure Args set" +else + INITIAL_RUST_CONFIG="${INITIAL_RUST_CONFIGURE_ARGS}" + ciCommandSetEnv RUST_CONFIGURE_ARGS "${INITIAL_RUST_CONFIG}" +fi + # Builders starting with `dist-` are dist builders, but if they also end with # `-alt` they are alternate dist builders. if [[ "${CI_JOB_NAME}" = dist-* ]]; then