Skip to content

Commit 79fb160

Browse files
authored
Merge pull request #2550 from WaffleLapkin/try-bors
Suggest using `@bors try jobs=...`
2 parents 3f664a1 + 99a6fe1 commit 79fb160

File tree

3 files changed

+28
-37
lines changed

3 files changed

+28
-37
lines changed

src/tests/ci.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,15 @@ resources to run the full test suite for each commit on every PR.
8484
> Thus, it is a good idea to run `./x doc xxx` locally for any doc comment
8585
> changes to help catch these early.
8686
87-
PR jobs are defined in the `pr` section of [`jobs.yml`]. They run under the
88-
`rust-lang/rust` repository, and their results can be observed directly on the
89-
PR, in the "CI checks" section at the bottom of the PR page.
87+
PR jobs are defined in the `pr` section of [`jobs.yml`]. Their results can be observed
88+
directly on the PR, in the "CI checks" section at the bottom of the PR page.
9089

9190
### Auto builds
9291

9392
Before a commit can be merged into the `master` branch, it needs to pass our
9493
complete test suite. We call this an `auto` build. This build runs tens of CI
9594
jobs that exercise various tests across operating systems and targets. The full
96-
test suite is quite slow; it can take two hours or more until all the `auto` CI
95+
test suite is quite slow; it can take several hours until all the `auto` CI
9796
jobs finish.
9897

9998
Most platforms only run the build steps, some run a restricted set of tests,
@@ -136,14 +135,21 @@ By default, if you send a comment with `@bors try`, the jobs defined in the `try
136135
[`jobs.yml`] will be executed. We call this mode a "fast try build". Such a try build
137136
will not execute any tests, and it will allow compilation warnings. It is useful when you want to
138137
get an optimized toolchain as fast as possible, for a crater run or performance benchmarks,
139-
even if it might not be working fully correctly.
140-
141-
If you want to run a custom CI job in a try build and make sure that it passes all tests and does
142-
not produce any compilation warnings, you can select CI jobs to be executed by adding lines
143-
containing `try-job: <job pattern>` to the PR description. All such specified jobs will be executed
144-
in the try build once the `@bors try` command is used on the PR.
145-
146-
Each pattern can either be an exact name of a job or a glob pattern that matches multiple jobs,
138+
even if it might not be working fully correctly. If you want to do a full build for the default try job,
139+
specify its job name in a job pattern (explained below).
140+
141+
If you want to run custom CI job(s) in a try build and make sure that they pass all tests and do
142+
not produce any compilation warnings, you can select CI jobs to be executed by specifying a *job pattern*,
143+
which can be used in one of two ways:
144+
- You can add a set of `try-job: <job pattern>` directives to the PR description (described below) and then
145+
simply run `@bors try`. CI will read these directives and run the jobs that you have specified. This is
146+
useful if you want to rerun the same set of try jobs multiple times, after incrementally modifying a PR.
147+
- You can specify the job pattern using the `jobs` parameter of the try command: `@bors try jobs=<job pattern>`.
148+
This is useful for one-off try builds with specific jobs. Note that the `jobs` parameter has a higher priority
149+
than the PR description directives.
150+
- There can also be multiple patterns specified, e.g. `@bors try jobs=job1,job2,job3`.
151+
152+
Each job pattern can either be an exact name of a job or a glob pattern that matches multiple jobs,
147153
for example `*msvc*` or `*-alt`. You can start at most 20 jobs in a single try build. When using
148154
glob patterns, you might want to wrap them in backticks (`` ` ``) to avoid GitHub rendering
149155
the pattern as Markdown.
@@ -182,26 +188,19 @@ of [`jobs.yml`]:
182188
> However, it can be less flexible because you cannot adjust the set of tests
183189
> that are exercised this way.
184190
185-
Try jobs are defined in the `try` section of [`jobs.yml`]. They are executed on
186-
the `try` branch under the `rust-lang/rust` repository and
191+
Try builds are executed on the `try` branch under the `rust-lang/rust` repository and
187192
their results can be seen [here](https://github.com/rust-lang/rust/actions),
188193
although usually you will be notified of the result by a comment made by bors on
189194
the corresponding PR.
190195
191-
Note that if you start the default try job using `@bors try`, it will skip building several `dist` components and running post-optimization tests, to make the build duration shorter. If you want to execute the full build as it would happen before a merge, add an explicit `try-job` pattern with the name of the default try job (currently `dist-x86_64-linux`).
196+
Multiple try builds can execute concurrently across different PRs, but there can be at most
197+
a single try build running on a single PR at any given time.
192198
193-
Multiple try builds can execute concurrently across different PRs.
194-
195-
<div class="warning">
196-
197-
Bors identifies try jobs by commit hash. This means that if you have two PRs
198-
containing the same (latest) commits, running `@bors try` will result in the
199-
*same* try job and it really confuses `bors`. Please refrain from doing so.
200-
201-
</div>
199+
Note that try builds are handled using the new [bors][new-bors] implementation.
202200
203201
[rustc-perf]: https://github.com/rust-lang/rustc-perf
204202
[crater]: https://github.com/rust-lang/crater
203+
[new-bors]: https://github.com/rust-lang/bors
205204
206205
### Modifying CI jobs
207206

src/tests/ecosystem-test-jobs/fuchsia.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,8 @@ Fuchsia builds as part of the suite of bors tests that run before a pull request
1818
is merged.
1919

2020
If you are worried that a pull request might break the Fuchsia builder and want
21-
to test it out before submitting it to the bors queue, simply add this line to
22-
your PR description:
23-
24-
> try-job: x86_64-fuchsia
25-
26-
Then when you `@bors try` it will pick the job that builds Fuchsia.
21+
to test it out before submitting it to the bors queue, simply ask bors to run
22+
the try job that builds the Fuchsia integration: `@bors try jobs=x86_64-fuchsia`.
2723

2824
## Building Fuchsia locally
2925

src/tests/ecosystem-test-jobs/rust-for-linux.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ this sysroot. RfL uses several unstable compiler/language features, therefore
4040
this workflow notifies us if a given compiler change would break it.
4141

4242
If you are worried that a pull request might break the Rust for Linux builder
43-
and want to test it out before submitting it to the bors queue, simply add this
44-
line to your PR description:
45-
46-
> try-job: x86_64-rust-for-linux
47-
48-
Then when you `@bors try` it will pick the job that builds the Rust for Linux
49-
integration.
43+
and want to test it out before submitting it to the bors queue, simply ask
44+
bors to run the try job that builds the Rust for Linux integration:
45+
`@bors try jobs=x86_64-rust-for-linux`.
5046

5147
[rfl-ping]: ../../notification-groups/rust-for-linux.md

0 commit comments

Comments
 (0)