From 51331e4739ee274ff84e46499fb8641b0d540ca7 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Wed, 5 Aug 2020 16:17:18 -0400 Subject: [PATCH 1/2] Re-enable debug and LLVM assertions Historically we've disabled these assertions on a number of platforms with the goal of speeding up CI. Now, though, having migrated to GitHub actions, CI is already pretty fast, and these debug assertions do bring us some value. This does leave in some debug assertions that are performance-related: macOS currently hovers at just under 2 hours. There are also some other builders which have debug and LLVM assertions disabled: llvm-8, PR builder: In one view, this builder tests our support for older LLVMs. But in reality, a lot of our tests already disable themselves on older LLVMs, and I think our general stance is that we really only support the in-tree LLVM. Plus, we really want CI times on this builder to be really low, as it's run on *every* PR -- that's a lot of CI time. test-various: This disables debug asserts still -- as noted in the Dockerfile, we test code size, and we need debug asserts off for that to work well. --- .github/workflows/ci.yml | 12 ------------ .../host-x86_64/i686-gnu-nopt/Dockerfile | 3 --- src/ci/docker/host-x86_64/i686-gnu/Dockerfile | 3 --- .../x86_64-gnu-distcheck/Dockerfile | 7 ------- src/ci/github-actions/ci.yml | 18 ------------------ 5 files changed, 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91241d2b214f9..c45832e815330 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -321,8 +321,6 @@ jobs: env: RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler" SCRIPT: make ci-subset-1 - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 os: windows-latest-xl - name: x86_64-msvc-2 env: @@ -333,23 +331,17 @@ jobs: env: RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc" SCRIPT: make ci-subset-1 - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 os: windows-latest-xl - name: i686-msvc-2 env: RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc" SCRIPT: make ci-subset-2 - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 os: windows-latest-xl - name: x86_64-msvc-cargo env: SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld" VCVARS_BAT: vcvars64.bat - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 os: windows-latest-xl - name: x86_64-msvc-tools env: @@ -361,8 +353,6 @@ jobs: RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu" SCRIPT: make ci-mingw-subset-1 CUSTOM_MINGW: 1 - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 os: windows-latest-xl - name: i686-mingw-2 env: @@ -375,8 +365,6 @@ jobs: SCRIPT: make ci-mingw-subset-1 RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler" CUSTOM_MINGW: 1 - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 os: windows-latest-xl - name: x86_64-mingw-2 env: diff --git a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile index 930061fca6f8f..0e28ea9668f07 100644 --- a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile @@ -27,6 +27,3 @@ RUN echo "optimize = false" >> /config/nopt-std-config.toml ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests ENV SCRIPT python3 ../x.py test --stage 0 --config /config/nopt-std-config.toml library/std \ && python3 ../x.py --stage 2 test - -# FIXME(#59637) takes too long on CI right now -ENV NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1 diff --git a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile index ea178bcf4f270..195601755f303 100644 --- a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile @@ -28,6 +28,3 @@ ENV SCRIPT python3 ../x.py --stage 2 test \ --exclude src/test/rustdoc-js \ --exclude src/tools/error_index_generator \ --exclude src/tools/linkchecker - -# FIXME(#59637) takes too long on CI right now -ENV NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1 diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile index 5f98edf617174..5faa0ccab568b 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile @@ -22,10 +22,3 @@ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --set rust.ignore-git=false ENV SCRIPT python3 ../x.py --stage 2 test distcheck ENV DIST_SRC 1 - -# The purpose of this builder is to test that we can `./x.py --stage 2 test` successfully -# from a tarball, not to test LLVM/rustc's own set of assertions. These cause a -# significant hit to CI compile time (over a half hour as observed in #61185), -# so disable assertions for this builder. -ENV NO_LLVM_ASSERTIONS=1 -ENV NO_DEBUG_ASSERTIONS=1 diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 0df191f8f7404..4cbb7b62cd628 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -500,9 +500,6 @@ jobs: env: 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 <<: *job-windows-xl - name: x86_64-msvc-2 @@ -515,18 +512,12 @@ jobs: env: RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc SCRIPT: make ci-subset-1 - # FIXME(#59637) - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 <<: *job-windows-xl - name: i686-msvc-2 env: RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc SCRIPT: make ci-subset-2 - # FIXME(#59637) - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 <<: *job-windows-xl - name: x86_64-msvc-cargo @@ -534,9 +525,6 @@ jobs: SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld VCVARS_BAT: vcvars64.bat - # FIXME(#59637) - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 <<: *job-windows-xl - name: x86_64-msvc-tools @@ -566,9 +554,6 @@ jobs: 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 <<: *job-windows-xl - name: i686-mingw-2 @@ -583,9 +568,6 @@ jobs: SCRIPT: make ci-mingw-subset-1 RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-profiler CUSTOM_MINGW: 1 - # FIXME(#59637) - NO_DEBUG_ASSERTIONS: 1 - NO_LLVM_ASSERTIONS: 1 <<: *job-windows-xl - name: x86_64-mingw-2 From 3ca882986b31a801820a757dec0a89256804c0a7 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Wed, 5 Aug 2020 17:43:59 -0400 Subject: [PATCH 2/2] Add debug asserts to PR builder This is helpful to catch slightly more bugs before things hit main CI, and doesn't cost too much extra CI time. --- src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile index 34c6396b7b59f..bd046f802c8d0 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile @@ -57,9 +57,3 @@ ENV SCRIPT python2.7 ../x.py --stage 2 test --exclude src/tools/tidy && \ python2.7 ../x.py --stage 2 test src/test/ui --pass=check && \ # Run tidy at the very end, after all the other tests. python2.7 ../x.py --stage 2 test src/tools/tidy - -# The purpose of this container isn't to test with debug assertions and -# this is run on all PRs, so let's get speedier builds by disabling these extra -# checks. -ENV NO_DEBUG_ASSERTIONS=1 -ENV NO_LLVM_ASSERTIONS=1