Skip to content

Commit 3ade426

Browse files
committed
Auto merge of #61353 - alexcrichton:less-tools, r=pietroalbini
ci: Favor SCRIPT instead of RUST_CHECK_TARGET 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.
2 parents 0bfbaa6 + ebdf42e commit 3ade426

File tree

8 files changed

+17
-19
lines changed

8 files changed

+17
-19
lines changed

.azure-pipelines/auto.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ jobs:
165165
# Note that the compiler is compiled to target 10.8 here because the Xcode
166166
# version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
167167
x86_64-apple:
168-
RUST_CHECK_TARGET: check
168+
SCRIPT: ./x.py test
169169
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
170170
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
171171
MACOSX_DEPLOYMENT_TARGET: 10.8
@@ -174,7 +174,7 @@ jobs:
174174
NO_DEBUG_ASSERTIONS: 1
175175

176176
dist-x86_64-apple:
177-
RUST_CHECK_TARGET: dist
177+
SCRIPT: ./x.py dist
178178
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
179179
DEPLOY: 1
180180
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
@@ -184,7 +184,7 @@ jobs:
184184
DIST_REQUIRE_ALL_TOOLS: 1
185185

186186
dist-x86_64-apple-alt:
187-
RUST_CHECK_TARGET: dist
187+
SCRIPT: ./x.py dist
188188
RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --enable-lldb --set rust.jemalloc
189189
DEPLOY_ALT: 1
190190
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
@@ -193,7 +193,7 @@ jobs:
193193
NO_DEBUG_ASSERTIONS: 1
194194

195195
i686-apple:
196-
RUST_CHECK_TARGET: check
196+
SCRIPT: ./x.py test
197197
RUST_CONFIGURE_ARGS: --build=i686-apple-darwin --set rust.jemalloc
198198
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
199199
MACOSX_DEPLOYMENT_TARGET: 10.8
@@ -202,7 +202,7 @@ jobs:
202202
NO_DEBUG_ASSERTIONS: 1
203203

204204
dist-i686-apple:
205-
RUST_CHECK_TARGET: dist
205+
SCRIPT: ./x.py dist
206206
RUST_CONFIGURE_ARGS: --build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb --set rust.jemalloc
207207
DEPLOY: 1
208208
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1

.azure-pipelines/steps/run.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ steps:
3333
brew install xz
3434
brew install swig
3535
displayName: Install build dependencies (OSX)
36-
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['RUST_CHECK_TARGET'],'dist'))
36+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['SCRIPT'],'./x.py dist'))
3737

3838
# Switch to XCode 9.3 on OSX since it seems to be the last version that supports
3939
# i686-apple-darwin. We'll eventually want to upgrade this and it will probably

.azure-pipelines/try.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
strategy:
3636
matrix:
3737
dist-x86_64-apple:
38-
RUST_CHECK_TARGET: dist
38+
SCRIPT: ./x.py dist
3939
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
4040
DEPLOY: 1
4141
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
@@ -45,7 +45,7 @@ jobs:
4545
DIST_REQUIRE_ALL_TOOLS: 1
4646

4747
dist-x86_64-apple-alt:
48-
RUST_CHECK_TARGET: dist
48+
SCRIPT: ./x.py dist
4949
RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --enable-lldb --set rust.jemalloc
5050
DEPLOY_ALT: 1
5151
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1

.travis.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ matrix:
3636
if: branch = try OR branch = auto
3737

3838
- env: >
39-
RUST_CHECK_TARGET=dist
39+
SCRIPT="./x.py dist"
4040
RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler --enable-lldb --set rust.jemalloc"
4141
SRC=.
4242
DEPLOY_ALT=1
@@ -59,7 +59,7 @@ matrix:
5959
# Note that the compiler is compiled to target 10.8 here because the Xcode
6060
# version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
6161
- env: >
62-
RUST_CHECK_TARGET=check
62+
SCRIPT="./x.py test"
6363
RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
6464
SRC=.
6565
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
@@ -73,7 +73,7 @@ matrix:
7373
if: branch = auto
7474
7575
- env: >
76-
RUST_CHECK_TARGET=check
76+
SCRIPT="./x.py test"
7777
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --set rust.jemalloc"
7878
SRC=.
7979
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
@@ -93,7 +93,7 @@ matrix:
9393
# `xcode8.2` image as above. That's because we want to build releases for
9494
# OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
9595
- env: >
96-
RUST_CHECK_TARGET=dist
96+
SCRIPT="./x.py dist"
9797
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb --set rust.jemalloc"
9898
SRC=.
9999
DEPLOY=1
@@ -108,7 +108,7 @@ matrix:
108108
if: branch = auto
109109
110110
- env: >
111-
RUST_CHECK_TARGET=dist
111+
SCRIPT="./x.py dist"
112112
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"
113113
SRC=.
114114
DEPLOY=1
@@ -260,7 +260,7 @@ install:
260260
export PATH=$PATH:$HOME
261261
;;
262262
osx)
263-
if [[ "$RUST_CHECK_TARGET" == dist ]]; then
263+
if [[ "$SCRIPT" == "./x.py dist" ]]; then
264264
travis_retry brew update &&
265265
travis_retry brew install xz &&
266266
travis_retry brew install swig;

src/ci/docker/i686-gnu-nopt/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ COPY scripts/sccache.sh /scripts/
1818
RUN sh /scripts/sccache.sh
1919

2020
ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests
21-
ENV RUST_CHECK_TARGET check
21+
ENV SCRIPT python2.7 ../x.py test

src/ci/docker/x86_64-gnu-llvm-6.0/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ENV RUST_CONFIGURE_ARGS \
2424
--build=x86_64-unknown-linux-gnu \
2525
--llvm-root=/usr/lib/llvm-6.0 \
2626
--enable-llvm-link-shared
27-
ENV RUST_CHECK_TARGET check
27+
ENV SCRIPT python2.7 ../x.py test src/tools/tidy && python2.7 ../x.py test

src/ci/docker/x86_64-gnu-nopt/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ RUN sh /scripts/sccache.sh
1919
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu \
2020
--disable-optimize-tests \
2121
--set rust.test-compare-mode
22-
ENV RUST_CHECK_TARGET check
22+
ENV SCRIPT python2.7 ../x.py test

src/ci/run.sh

-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ else
137137
return $retval
138138
}
139139

140-
do_make tidy
141-
do_make all
142140
do_make "$RUST_CHECK_TARGET"
143141
fi
144142

0 commit comments

Comments
 (0)