]> git.lizzy.rs Git - rust.git/commitdiff
ci: Favor SCRIPT instead of RUST_CHECK_TARGET
authorAlex Crichton <alex@alexcrichton.com>
Thu, 30 May 2019 14:22:53 +0000 (07:22 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 30 May 2019 14:28:56 +0000 (07:28 -0700)
Since #61212 we've been timing out on OSX, and this looks to be because
we're building tools like Cargo and the RLS twice instead of once. This
turns out to be a slight bug in our configuration. CI builders using the
`RUST_CHECK_TARGET` directive actually execute `make all` just before
their acual target. In `make all` we're building a stage2 cargo, and
then in `make dist` we're building a stage1 cargo.

Other builders use `SCRIPT` which provides explicit control over what
`x.py` script, for example, is used to execute the build. This moves
almost all targets to using `SCRIPT` to ensure that we're explicitly
specifying what's being built where. Additionally this updates the logic
of `RUST_CHECK_TARGET` to remove the pre-flight tidy as well as the
pre-flight `make all`. The system LLVM builder (run on PRs) now
explicitly runs tidy first and then runs the rest of the test suite.

.azure-pipelines/auto.yml
.azure-pipelines/steps/run.yml
.azure-pipelines/try.yml
.travis.yml
src/ci/docker/i686-gnu-nopt/Dockerfile
src/ci/docker/x86_64-gnu-llvm-6.0/Dockerfile
src/ci/docker/x86_64-gnu-nopt/Dockerfile
src/ci/run.sh

index 4cdf8423c0885cbfdf59a76e719e876da6064545..e60bb44e4722ec06681146222cadbcd0a3ba1d09 100644 (file)
@@ -165,7 +165,7 @@ jobs:
       # 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:
-        RUST_CHECK_TARGET: check
+        SCRIPT: ./x.py test
         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
@@ -174,7 +174,7 @@ jobs:
         NO_DEBUG_ASSERTIONS: 1
 
       dist-x86_64-apple:
-        RUST_CHECK_TARGET: dist
+        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 --enable-lldb --set rust.jemalloc
         DEPLOY: 1
         RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
@@ -184,7 +184,7 @@ jobs:
         DIST_REQUIRE_ALL_TOOLS: 1
 
       dist-x86_64-apple-alt:
-        RUST_CHECK_TARGET: dist
+        SCRIPT: ./x.py dist
         RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --enable-lldb --set rust.jemalloc
         DEPLOY_ALT: 1
         RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
@@ -193,7 +193,7 @@ jobs:
         NO_DEBUG_ASSERTIONS: 1
 
       i686-apple:
-        RUST_CHECK_TARGET: check
+        SCRIPT: ./x.py test
         RUST_CONFIGURE_ARGS: --build=i686-apple-darwin --set rust.jemalloc
         RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
         MACOSX_DEPLOYMENT_TARGET: 10.8
@@ -202,7 +202,7 @@ jobs:
         NO_DEBUG_ASSERTIONS: 1
 
       dist-i686-apple:
-        RUST_CHECK_TARGET: dist
+        SCRIPT: ./x.py dist
         RUST_CONFIGURE_ARGS: --build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb --set rust.jemalloc
         DEPLOY: 1
         RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
index 47a4c183085127f2288d567d5c000cde8ecbfa15..e7c6235a50444b59d25b73083b91077270fa466b 100644 (file)
@@ -33,7 +33,7 @@ steps:
     brew install xz
     brew install swig
   displayName: Install build dependencies (OSX)
-  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['RUST_CHECK_TARGET'],'dist'))
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['SCRIPT'],'./x.py dist'))
 
 # 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
index f37bb7d26ed6d286df47fe9950128cf62062bc4f..e669925b5ff59ac6bd12d4584ae4ab50a73af550 100644 (file)
@@ -35,7 +35,7 @@ jobs:
   strategy:
     matrix:
       dist-x86_64-apple:
-        RUST_CHECK_TARGET: dist
+        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 --enable-lldb --set rust.jemalloc
         DEPLOY: 1
         RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
@@ -45,7 +45,7 @@ jobs:
         DIST_REQUIRE_ALL_TOOLS: 1
 
       dist-x86_64-apple-alt:
-        RUST_CHECK_TARGET: dist
+        SCRIPT: ./x.py dist
         RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --enable-lldb --set rust.jemalloc
         DEPLOY_ALT: 1
         RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
index 7a8772d7abd63556a991e2dd2f10b8c0ccdbba69..49a8d5b66c35697533f5ded76bdb9ea022aef70d 100644 (file)
@@ -36,7 +36,7 @@ matrix:
       if: branch = try OR branch = auto
 
     - env: >
-        RUST_CHECK_TARGET=dist
+        SCRIPT="./x.py dist"
         RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler --enable-lldb --set rust.jemalloc"
         SRC=.
         DEPLOY_ALT=1
@@ -59,7 +59,7 @@ matrix:
     # 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.
     - env: >
-        RUST_CHECK_TARGET=check
+        SCRIPT="./x.py test"
         RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
         SRC=.
         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
@@ -73,7 +73,7 @@ matrix:
       if: branch = auto
 
     - env: >
-        RUST_CHECK_TARGET=check
+        SCRIPT="./x.py test"
         RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --set rust.jemalloc"
         SRC=.
         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
@@ -93,7 +93,7 @@ matrix:
     # `xcode8.2` image as above. That's because we want to build releases for
     # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
     - env: >
-        RUST_CHECK_TARGET=dist
+        SCRIPT="./x.py dist"
         RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb --set rust.jemalloc"
         SRC=.
         DEPLOY=1
@@ -108,7 +108,7 @@ matrix:
       if: branch = auto
 
     - env: >
-        RUST_CHECK_TARGET=dist
+        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 --enable-lldb --set rust.jemalloc"
         SRC=.
         DEPLOY=1
@@ -260,7 +260,7 @@ install:
             export PATH=$PATH:$HOME
           ;;
         osx)
-          if [[ "$RUST_CHECK_TARGET" == dist ]]; then
+          if [[ "$SCRIPT" == "./x.py dist" ]]; then
             travis_retry brew update &&
             travis_retry brew install xz &&
             travis_retry brew install swig;
index 5a83bd318c4d9f1787e662fab142c62884b21770..2041ba50bc9a041f9ac6e7d9332203df54e454d4 100644 (file)
@@ -18,4 +18,4 @@ COPY scripts/sccache.sh /scripts/
 RUN sh /scripts/sccache.sh
 
 ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests
-ENV RUST_CHECK_TARGET check
+ENV SCRIPT python2.7 ../x.py test
index 160b23e0b00d176672d8f17f350a91412fa49052..2932f3737374560ceed092dcecb13950c872a79e 100644 (file)
@@ -24,4 +24,4 @@ ENV RUST_CONFIGURE_ARGS \
       --build=x86_64-unknown-linux-gnu \
       --llvm-root=/usr/lib/llvm-6.0 \
       --enable-llvm-link-shared
-ENV RUST_CHECK_TARGET check
+ENV SCRIPT python2.7 ../x.py test src/tools/tidy && python2.7 ../x.py test
index b0780fdf32a5926a56ec95668367d5aa9f5b670b..d0b244c9b7671b26ed6651b9e8c11fa65621b7cc 100644 (file)
@@ -19,4 +19,4 @@ RUN sh /scripts/sccache.sh
 ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu \
   --disable-optimize-tests \
   --set rust.test-compare-mode
-ENV RUST_CHECK_TARGET check
+ENV SCRIPT python2.7 ../x.py test
index 8ead6e0e4bd6b7c8ff73e137d0a9c2a6faab1db5..811d401a83c21a02ef21aa4ae4b4a813d68b8e4c 100755 (executable)
@@ -137,8 +137,6 @@ else
     return $retval
   }
 
-  do_make tidy
-  do_make all
   do_make "$RUST_CHECK_TARGET"
 fi