Skip to content

Commit

Permalink
Use --stage 2 explicitly in CI
Browse files Browse the repository at this point in the history
- expand yaml anchors
- don't use --stage 2 for dist; that's already the default
  • Loading branch information
jyn514 committed Jul 28, 2020
1 parent cdca337 commit 4ee8d84
Show file tree
Hide file tree
Showing 24 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,15 @@ jobs:
os: windows-latest-xl
- name: x86_64-msvc-cargo
env:
SCRIPT: python x.py test src/tools/cargotest src/tools/cargo
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:
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py --stage 2 /tmp/toolstate/toolstates.json windows
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
os: windows-latest-xl
- name: i686-mingw-1
Expand Down Expand Up @@ -598,7 +598,7 @@ jobs:
os: macos-latest
- name: x86_64-apple
env:
SCRIPT: "./x.py test"
SCRIPT: "./x.py --stage 2 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
Expand Down
2 changes: 1 addition & 1 deletion src/ci/azure-pipelines/auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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:
SCRIPT: ./x.py test
SCRIPT: ./x.py --stage 2 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
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ ENV RUST_CONFIGURE_ARGS \
--enable-sanitizers \
--enable-profiler \
--enable-compiler-docs
ENV SCRIPT python3 ../x.py test
ENV SCRIPT python3 ../x.py --stage 2 test
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/arm-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV TARGETS=arm-linux-androideabi

ENV RUST_CONFIGURE_ARGS --arm-linux-androideabi-ndk=/android/ndk/arm-14

ENV SCRIPT python3 ../x.py test --target $TARGETS
ENV SCRIPT python3 ../x.py --stage 2 test --target $TARGETS

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/armhf-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV RUST_CONFIGURE_ARGS --qemu-armhf-rootfs=/tmp/rootfs
ENV SCRIPT python3 ../x.py test --target arm-unknown-linux-gnueabihf
ENV SCRIPT python3 ../x.py --stage 2 test --target arm-unknown-linux-gnueabihf

ENV NO_CHANGE_USER=1
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/disabled/asmjs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ENV EMCC_CFLAGS=-O1
# Emscripten installation is user-specific
ENV NO_CHANGE_USER=1

ENV SCRIPT python3 ../x.py test --target $TARGETS
ENV SCRIPT python3 ../x.py --stage 2 test --target $TARGETS

# This is almost identical to the wasm32-unknown-emscripten target, so
# running with assertions again is not useful
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ENV RUST_CONFIGURE_ARGS \
# build to finish we use --warn-unresolved-symbols. Note that the missing
# symbols does not affect std, only the compiler (llvm) and cargo (openssl).
ENV SCRIPT \
python3 ../x.py build src/llvm --host $HOSTS --target $HOSTS && \
python3 ../x.py --stage 2 build src/llvm --host $HOSTS --target $HOSTS && \
(export RUSTFLAGS="\"-C link-arg=-Wl,--warn-unresolved-symbols\""; \
rm /android/ndk/arm && \
ln -s /android/ndk/arm-14 /android/ndk/arm && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ENV RUST_CONFIGURE_ARGS \
# build to finish we use --warn-unresolved-symbols. Note that the missing
# symbols does not affect std, only the compiler (llvm) and cargo (openssl).
ENV SCRIPT \
python3 ../x.py build src/llvm --host $HOSTS --target $HOSTS && \
python3 ../x.py --stage 2 build src/llvm --host $HOSTS --target $HOSTS && \
(export RUSTFLAGS="\"-C link-arg=-Wl,--warn-unresolved-symbols\""; \
rm /android/ndk/x86 && \
ln -s /android/ndk/x86-14 /android/ndk/x86 && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV RUST_CONFIGURE_ARGS --qemu-riscv64-rootfs=/tmp/rootfs
ENV SCRIPT python3 ../x.py test --target riscv64gc-unknown-linux-gnu
ENV SCRIPT python3 ../x.py --stage 2 test --target riscv64gc-unknown-linux-gnu

ENV NO_CHANGE_USER=1
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no
ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl

ENV SCRIPT \
python3 ../x.py test --target $TARGETS && \
python3 ../x.py --stage 2 test --target $TARGETS && \
python3 ../x.py dist --target $TARGETS,i586-unknown-linux-musl
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/dist-various-1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ ENV RUST_CONFIGURE_ARGS \
--disable-docs

ENV SCRIPT \
python3 ../x.py test --target $RUN_MAKE_TARGETS src/test/run-make && \
python3 ../x.py --stage 2 test --target $RUN_MAKE_TARGETS src/test/run-make && \
python3 ../x.py dist --target $TARGETS

# sccache
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests
ENV SCRIPT python3 ../x.py test
ENV SCRIPT python3 ../x.py --stage 2 test

# FIXME(#59637) takes too long on CI right now
ENV NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/i686-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN sh /scripts/sccache.sh
ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu
# Exclude some tests that are unlikely to be platform specific, to speed up
# this slow job.
ENV SCRIPT python3 ../x.py test \
ENV SCRIPT python3 ../x.py --stage 2 test \
--exclude src/bootstrap \
--exclude src/test/rustdoc-js \
--exclude src/tools/error_index_generator \
Expand Down
4 changes: 2 additions & 2 deletions src/ci/docker/host-x86_64/mingw-check/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ RUN sh /scripts/sccache.sh
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/

ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
ENV SCRIPT python3 ../x.py test src/tools/expand-yaml-anchors && \
ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \
python3 ../x.py build --stage 0 src/tools/build-manifest && \
python3 ../x.py test --stage 0 src/tools/compiletest && \
python3 ../x.py test src/tools/tidy && \
python3 ../x.py test --stage 2 src/tools/tidy && \
python3 ../x.py doc --stage 0 library/std && \
/scripts/validate-toolstate.sh
6 changes: 3 additions & 3 deletions src/ci/docker/host-x86_64/test-various/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ENV RUST_CONFIGURE_ARGS \
ENV NO_DEBUG_ASSERTIONS=1

ENV WASM_TARGETS=wasm32-unknown-unknown
ENV WASM_SCRIPT python3 /checkout/x.py test --target $WASM_TARGETS \
ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --target $WASM_TARGETS \
src/test/run-make \
src/test/ui \
src/test/compile-fail \
Expand All @@ -49,13 +49,13 @@ ENV WASM_SCRIPT python3 /checkout/x.py test --target $WASM_TARGETS \
library/core

ENV NVPTX_TARGETS=nvptx64-nvidia-cuda
ENV NVPTX_SCRIPT python3 /checkout/x.py test --target $NVPTX_TARGETS \
ENV NVPTX_SCRIPT python3 /checkout/x.py --stage 2 test --target $NVPTX_TARGETS \
src/test/run-make \
src/test/assembly

ENV MUSL_TARGETS=x86_64-unknown-linux-musl \
CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \
CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++
ENV MUSL_SCRIPT python3 /checkout/x.py test --target $MUSL_TARGETS
ENV MUSL_SCRIPT python3 /checkout/x.py --stage 2 test --target $MUSL_TARGETS

ENV SCRIPT $WASM_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/wasm32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ENV NO_CHANGE_USER=1

# FIXME: Re-enable these tests once https://github.com/rust-lang/cargo/pull/7476
# is picked up by CI
ENV SCRIPT python3 ../x.py test --target $TARGETS \
ENV SCRIPT python3 ../x.py test --stage 2 --target $TARGETS \
--exclude library/core \
--exclude library/alloc \
--exclude library/proc_macro \
Expand Down
4 changes: 2 additions & 2 deletions src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ ENV RUST_CONFIGURE_ARGS \
--set target.x86_64-unknown-linux-gnu.cxx=clang++

ENV SCRIPT \
python3 ../x.py build && \
python3 ../x.py test src/test/run-make-fulldeps --test-args clang
python3 ../x.py --stage 2 build && \
python3 ../x.py --stage 2 test src/test/run-make-fulldeps --test-args clang
4 changes: 2 additions & 2 deletions src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ COPY scripts/sccache.sh /scripts/
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 test distcheck
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 test` successfully
# 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN sh /scripts/sccache.sh
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--enable-full-bootstrap
ENV SCRIPT python3 ../x.py build
ENV SCRIPT python3 ../x.py --stage 2 build

# In general this just slows down the build and we're just a smoke test that
# a full bootstrap works in general, so there's not much need to take this
Expand Down
8 changes: 4 additions & 4 deletions src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ENV RUST_CONFIGURE_ARGS \
--enable-llvm-link-shared \
--set rust.thin-lto-import-instr-limit=10

ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy && \
ENV SCRIPT python2.7 ../x.py --stage 2 test --exclude src/tools/tidy && \
# Run the `mir-opt` tests again but this time for a 32-bit target.
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
# both 32-bit and 64-bit outputs updated by the PR author, before
Expand All @@ -43,7 +43,7 @@ ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy && \
# This also requires `--pass=build` because we can't execute the tests
# on the `x86_64` host when they're built as `armv5te` binaries.
# (we're only interested in the MIR output, so this doesn't matter)
python2.7 ../x.py test src/test/mir-opt --pass=build \
python2.7 ../x.py --stage 2 test src/test/mir-opt --pass=build \
--target=armv5te-unknown-linux-gnueabi && \
# Run the UI test suite again, but in `--pass=check` mode
#
Expand All @@ -53,9 +53,9 @@ ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy && \
# FIXME: We ideally want to test this in 32-bit mode, but currently
# (due to the LLVM problems mentioned above) that isn't readily
# possible.
python2.7 ../x.py test src/test/ui --pass=check && \
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 test src/tools/tidy
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
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,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 SCRIPT python3 ../x.py test
ENV SCRIPT python3 ../x.py --stage 2 test
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ COPY host-x86_64/x86_64-gnu-tools/checktools.sh /tmp/
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--save-toolstates=/tmp/toolstate/toolstates.json
ENV SCRIPT /tmp/checktools.sh ../x.py
ENV SCRIPT /tmp/checktools.sh ../x.py --stage 2
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ ENV RUST_CONFIGURE_ARGS \
--enable-sanitizers \
--enable-profiler \
--enable-compiler-docs
ENV SCRIPT python3 ../x.py test
ENV SCRIPT python3 ../x.py --stage 2 test
6 changes: 3 additions & 3 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ jobs:

- name: x86_64-msvc-cargo
env:
SCRIPT: python x.py test src/tools/cargotest src/tools/cargo
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)
Expand All @@ -481,7 +481,7 @@ jobs:

- name: x86_64-msvc-tools
env:
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py --stage 2 /tmp/toolstate/toolstates.json windows
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json
<<: *job-windows-xl

Expand Down Expand Up @@ -613,7 +613,7 @@ jobs:

- name: x86_64-apple
env:
SCRIPT: ./x.py test
SCRIPT: ./x.py --stage 2 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
Expand Down

0 comments on commit 4ee8d84

Please sign in to comment.