Skip to content

Commit f21a904

Browse files
committed
ci: Conditionally build parallel compiler on try
This commit configures Travis/AppVeyor to conditionally compile parallel compilers on `@bors: try`. This is an experiment currently to see how this plays out, but the intention is that if the commit message contains the term "parallel-compiler" then when `@bors: try` is issued it will perform differently than the try branch does today, building three compilers: Linux, macOS, and Windows. We currently have no `try` builders for macOS or Windows due to typical capacity issues, so it's intended that this is only very sparingly used from time to time when necessary. [parallel-compiler]
1 parent d91b32b commit f21a904

File tree

4 files changed

+165
-113
lines changed

4 files changed

+165
-113
lines changed

.travis.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ matrix:
2626

2727
- env: IMAGE=dist-x86_64-linux DEPLOY=1
2828
name: dist-x86_64-linux
29-
if: branch = try OR branch = auto
29+
if: (branch = try AND NOT commit_message ~= parallel-compiler) OR branch = auto
3030

3131
# "alternate" deployments, these are "nightlies" but have LLVM assertions
3232
# turned on, they're deployed to a different location primarily for
3333
# additional testing.
3434
- env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
3535
name: dist-x86_64-linux-alt
36-
if: branch = try OR branch = auto
36+
if: (branch = try AND NOT commit_message ~= parallel-compiler) OR branch = auto
3737

3838
- env: >
3939
RUST_CHECK_TARGET=dist
@@ -239,6 +239,25 @@ matrix:
239239
. src/ci/docker/x86_64-gnu-tools/repo.sh;
240240
commit_toolstate_change "$MESSAGE_FILE" "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "$MESSAGE_FILE" "$TOOLSTATE_REPO_ACCESS_TOKEN";
241241

242+
- env: IMAGE=dist-x86_64-linux DEPLOY=1 DIST_PARALLEL_COMPILER=1
243+
name: dist-x86_64-linux-parallel-compiler
244+
if: branch = try AND commit_message ~= parallel-compiler
245+
- env: >
246+
RUST_CHECK_TARGET=dist
247+
RUST_CONFIGURE_ARGS="--enable-full-tools --enable-sanitizers --enable-profiler --enable-lldb --set rust.jemalloc"
248+
SRC=.
249+
DEPLOY=1
250+
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
251+
MACOSX_DEPLOYMENT_TARGET=10.7
252+
NO_LLVM_ASSERTIONS=1
253+
NO_DEBUG_ASSERTIONS=1
254+
DIST_REQUIRE_ALL_TOOLS=1
255+
DIST_PARALLEL_COMPILER=1
256+
os: osx
257+
osx_image: xcode9.3-moar
258+
name: dist-x86_64-apple-parallel-compiler
259+
if: branch = try AND commit_message ~= parallel-compiler
260+
242261
before_install:
243262
# We'll use the AWS cli to download/upload cached docker layers as well as
244263
# push our deployments, so download that here.

appveyor.yml

+139-111
Original file line numberDiff line numberDiff line change
@@ -8,116 +8,150 @@ environment:
88
# server goes down presumably. See #43333 for more info
99
CARGO_HTTP_CHECK_REVOKE: false
1010

11-
matrix:
12-
# 32/64 bit MSVC tests
13-
- CI_JOB_NAME: x86_64-msvc
14-
MSYS_BITS: 64
15-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
16-
SCRIPT: python x.py test
17-
- CI_JOB_NAME: i686-msvc-1
18-
MSYS_BITS: 32
19-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
20-
SCRIPT: make appveyor-subset-1
21-
- CI_JOB_NAME: i686-msvc-2
22-
MSYS_BITS: 32
23-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
24-
SCRIPT: make appveyor-subset-2
2511

26-
# MSVC aux tests
27-
- CI_JOB_NAME: x86_64-msvc-aux
28-
MSYS_BITS: 64
29-
RUST_CHECK_TARGET: check-aux EXCLUDE_CARGO=1
30-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
31-
- CI_JOB_NAME: x86_64-msvc-cargo
32-
MSYS_BITS: 64
33-
SCRIPT: python x.py test src/tools/cargotest src/tools/cargo
34-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
3512

36-
# MSVC tools tests
37-
- CI_JOB_NAME: x86_64-msvc-tools
38-
MSYS_BITS: 64
39-
SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstates.json windows
40-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstates.json --enable-test-miri
13+
for:
14+
-
15+
branches:
16+
only:
17+
- auto
18+
environment:
19+
matrix:
20+
# 32/64 bit MSVC tests
21+
- CI_JOB_NAME: x86_64-msvc
22+
MSYS_BITS: 64
23+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
24+
SCRIPT: python x.py test
25+
- CI_JOB_NAME: i686-msvc-1
26+
MSYS_BITS: 32
27+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
28+
SCRIPT: make appveyor-subset-1
29+
- CI_JOB_NAME: i686-msvc-2
30+
MSYS_BITS: 32
31+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
32+
SCRIPT: make appveyor-subset-2
4133

42-
# 32/64-bit MinGW builds.
43-
#
44-
# We are using MinGW with posix threads since LLVM does not compile with
45-
# the win32 threads version due to missing support for C++'s std::thread.
46-
#
47-
# Instead of relying on the MinGW version installed on appveryor we download
48-
# and install one ourselves so we won't be surprised by changes to appveyor's
49-
# build image.
50-
#
51-
# Finally, note that the downloads below are all in the `rust-lang-ci` S3
52-
# bucket, but they cleraly didn't originate there! The downloads originally
53-
# came from the mingw-w64 SourceForge download site. Unfortunately
54-
# SourceForge is notoriously flaky, so we mirror it on our own infrastructure.
55-
- CI_JOB_NAME: i686-mingw-1
56-
MSYS_BITS: 32
57-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
58-
SCRIPT: make appveyor-subset-1
59-
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
60-
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
61-
MINGW_DIR: mingw32
62-
- CI_JOB_NAME: i686-mingw-2
63-
MSYS_BITS: 32
64-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
65-
SCRIPT: make appveyor-subset-2
66-
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
67-
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
68-
MINGW_DIR: mingw32
69-
- CI_JOB_NAME: x86_64-mingw
70-
MSYS_BITS: 64
71-
SCRIPT: python x.py test
72-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
73-
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
74-
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
75-
MINGW_DIR: mingw64
34+
# MSVC aux tests
35+
- CI_JOB_NAME: x86_64-msvc-aux
36+
MSYS_BITS: 64
37+
RUST_CHECK_TARGET: check-aux EXCLUDE_CARGO=1
38+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
39+
- CI_JOB_NAME: x86_64-msvc-cargo
40+
MSYS_BITS: 64
41+
SCRIPT: python x.py test src/tools/cargotest src/tools/cargo
42+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
43+
44+
# MSVC tools tests
45+
- CI_JOB_NAME: x86_64-msvc-tools
46+
MSYS_BITS: 64
47+
SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstates.json windows
48+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstates.json --enable-test-miri
49+
50+
# 32/64-bit MinGW builds.
51+
#
52+
# We are using MinGW with posix threads since LLVM does not compile with
53+
# the win32 threads version due to missing support for C++'s std::thread.
54+
#
55+
# Instead of relying on the MinGW version installed on appveryor we download
56+
# and install one ourselves so we won't be surprised by changes to appveyor's
57+
# build image.
58+
#
59+
# Finally, note that the downloads below are all in the `rust-lang-ci` S3
60+
# bucket, but they cleraly didn't originate there! The downloads originally
61+
# came from the mingw-w64 SourceForge download site. Unfortunately
62+
# SourceForge is notoriously flaky, so we mirror it on our own infrastructure.
63+
- CI_JOB_NAME: i686-mingw-1
64+
MSYS_BITS: 32
65+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
66+
SCRIPT: make appveyor-subset-1
67+
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
68+
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
69+
MINGW_DIR: mingw32
70+
- CI_JOB_NAME: i686-mingw-2
71+
MSYS_BITS: 32
72+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
73+
SCRIPT: make appveyor-subset-2
74+
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
75+
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
76+
MINGW_DIR: mingw32
77+
- CI_JOB_NAME: x86_64-mingw
78+
MSYS_BITS: 64
79+
SCRIPT: python x.py test
80+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
81+
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
82+
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
83+
MINGW_DIR: mingw64
84+
85+
# 32/64 bit MSVC and GNU deployment
86+
- CI_JOB_NAME: dist-x86_64-msvc
87+
RUST_CONFIGURE_ARGS: >
88+
--build=x86_64-pc-windows-msvc
89+
--target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc
90+
--enable-full-tools
91+
--enable-profiler
92+
SCRIPT: python x.py dist
93+
DIST_REQUIRE_ALL_TOOLS: 1
94+
DEPLOY: 1
95+
- CI_JOB_NAME: dist-i686-msvc
96+
RUST_CONFIGURE_ARGS: >
97+
--build=i686-pc-windows-msvc
98+
--target=i586-pc-windows-msvc
99+
--enable-full-tools
100+
--enable-profiler
101+
SCRIPT: python x.py dist
102+
DIST_REQUIRE_ALL_TOOLS: 1
103+
DEPLOY: 1
104+
- CI_JOB_NAME: dist-i686-mingw
105+
MSYS_BITS: 32
106+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools
107+
SCRIPT: python x.py dist
108+
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
109+
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
110+
MINGW_DIR: mingw32
111+
DIST_REQUIRE_ALL_TOOLS: 1
112+
DEPLOY: 1
113+
- CI_JOB_NAME: dist-x86_64-mingw
114+
MSYS_BITS: 64
115+
SCRIPT: python x.py dist
116+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools
117+
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
118+
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
119+
MINGW_DIR: mingw64
120+
DIST_REQUIRE_ALL_TOOLS: 1
121+
DEPLOY: 1
76122

77-
# 32/64 bit MSVC and GNU deployment
78-
- CI_JOB_NAME: dist-x86_64-msvc
79-
RUST_CONFIGURE_ARGS: >
80-
--build=x86_64-pc-windows-msvc
81-
--target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc
82-
--enable-full-tools
83-
--enable-profiler
84-
SCRIPT: python x.py dist
85-
DIST_REQUIRE_ALL_TOOLS: 1
86-
DEPLOY: 1
87-
- CI_JOB_NAME: dist-i686-msvc
88-
RUST_CONFIGURE_ARGS: >
89-
--build=i686-pc-windows-msvc
90-
--target=i586-pc-windows-msvc
91-
--enable-full-tools
92-
--enable-profiler
93-
SCRIPT: python x.py dist
94-
DIST_REQUIRE_ALL_TOOLS: 1
95-
DEPLOY: 1
96-
- CI_JOB_NAME: dist-i686-mingw
97-
MSYS_BITS: 32
98-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools
99-
SCRIPT: python x.py dist
100-
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
101-
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
102-
MINGW_DIR: mingw32
103-
DIST_REQUIRE_ALL_TOOLS: 1
104-
DEPLOY: 1
105-
- CI_JOB_NAME: dist-x86_64-mingw
106-
MSYS_BITS: 64
107-
SCRIPT: python x.py dist
108-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools
109-
MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror
110-
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
111-
MINGW_DIR: mingw64
112-
DIST_REQUIRE_ALL_TOOLS: 1
113-
DEPLOY: 1
123+
# "alternate" deployment, see .travis.yml for more info
124+
- CI_JOB_NAME: dist-x86_64-msvc-alt
125+
MSYS_BITS: 64
126+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler
127+
SCRIPT: python x.py dist
128+
DEPLOY_ALT: 1
114129

115-
# "alternate" deployment, see .travis.yml for more info
116-
- CI_JOB_NAME: dist-x86_64-msvc-alt
117-
MSYS_BITS: 64
118-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler
119-
SCRIPT: python x.py dist
120-
DEPLOY_ALT: 1
130+
# Try builder
131+
-
132+
branches:
133+
only:
134+
- try
135+
environment:
136+
matrix:
137+
- CI_JOB_NAME: dist-x86_64-msvc-parallel
138+
RUST_CONFIGURE_ARGS: >
139+
--build=x86_64-pc-windows-msvc
140+
--enable-full-tools
141+
--enable-profiler
142+
SCRIPT: python x.py dist
143+
DIST_REQUIRE_ALL_TOOLS: 1
144+
DIST_PARALLEL_COMPILER: 1
145+
DEPLOY: 1
146+
147+
# Skip builds on all other branches
148+
-
149+
branches:
150+
except:
151+
- try
152+
- auto
153+
only_commits:
154+
message: /nonexistent-message-to-fool-appveyor-to-not-run-a-build/
121155

122156
matrix:
123157
fast_finish: true
@@ -216,10 +250,6 @@ on_failure:
216250
- set PATH=%PATH%;"C:\Program Files (x86)\Windows Kits\10\Debuggers\X64"
217251
- if exist %LOCALAPPDATA%\CrashDumps for %%f in (%LOCALAPPDATA%\CrashDumps\*) do cdb -c "k;q" -G -z "%%f"
218252

219-
branches:
220-
only:
221-
- auto
222-
223253
before_deploy:
224254
- ps: |
225255
New-Item -Path deploy -ItemType directory
@@ -239,7 +269,6 @@ deploy:
239269
artifact: /.*/
240270
folder: rustc-builds
241271
on:
242-
branch: auto
243272
DEPLOY: 1
244273
max_error_retry: 5
245274

@@ -254,7 +283,6 @@ deploy:
254283
artifact: /.*/
255284
folder: rustc-builds-alt
256285
on:
257-
branch: auto
258286
DEPLOY_ALT: 1
259287
max_error_retry: 5
260288

src/ci/docker/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ exec docker \
133133
--env CARGO_HOME=/cargo \
134134
--env DEPLOY \
135135
--env DEPLOY_ALT \
136+
--env DIST_PARALLEL_COMPILER \
136137
--env LOCAL_USER_ID=`id -u` \
137138
--env TRAVIS \
138139
--env TRAVIS_BRANCH \

src/ci/run.sh

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ if [ "$DIST_SRC" = "" ]; then
3737
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-dist-src"
3838
fi
3939

40+
if [ "$DIST_PARALLEL_COMPILER" = "" ]; then
41+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.parallel-compiler"
42+
fi
43+
4044
# If we're deploying artifacts then we set the release channel, otherwise if
4145
# we're not deploying then we want to be sure to enable all assertions because
4246
# we'll be running tests

0 commit comments

Comments
 (0)