Skip to content

Commit 08aeb75

Browse files
committed
Update documentation
1 parent 7048f26 commit 08aeb75

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file defines our primary CI workflow that runs on pull requests
22
# and also on pushes to special branches (auto, try).
33
#
4-
# The actual definition of the executed jobs is calculated by a
5-
# script located at src/ci/citool, which
4+
# The actual definition of the executed jobs is calculated by the
5+
# `src/ci/citool` crate, which
66
# uses job definition data from src/ci/github-actions/jobs.yml.
77
# You should primarily modify the `jobs.yml` file if you want to modify
88
# what jobs are executed in CI.

src/ci/docker/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Note that a single Docker image can be used by multiple CI jobs, so the job name
88
is the important thing that you should know. You can examine the existing CI jobs in
99
the [`jobs.yml`](../github-actions/jobs.yml) file.
1010

11-
To run a specific CI job locally, you can use the following script:
11+
To run a specific CI job locally, you can use the `citool` Rust crate:
1212

1313
```
14-
python3 ./src/ci/github-actions/ci.py run-local <job-name>
14+
cargo --manifest-path src/ci/citool/Cargo.toml run run-local <job-name>
1515
```
1616

1717
For example, to run the `x86_64-gnu-llvm-18-1` job:
1818
```
19-
python3 ./src/ci/github-actions/ci.py run-local x86_64-gnu-llvm-18-1
19+
cargo --manifest-path src/ci/citool/Cargo.toml run run-local x86_64-gnu-llvm-18-1
2020
```
2121

2222
The job will output artifacts in an `obj/<image-name>` dir at the root of a repository. Note

src/doc/rustc-dev-guide/src/building/optimized-build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ Here is an example of how can `opt-dist` be used locally (outside of CI):
126126
[`Environment`]: https://github.com/rust-lang/rust/blob/ee451f8faccf3050c76cdcd82543c917b40c7962/src/tools/opt-dist/src/environment.rs#L5
127127

128128
> Note: if you want to run the actual CI pipeline, instead of running `opt-dist` locally,
129-
> you can execute `python3 src/ci/github-actions/ci.py run-local dist-x86_64-linux`.
129+
> you can execute `cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-x86_64-linux`.

src/doc/rustc-dev-guide/src/tests/ci.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Our CI is primarily executed on [GitHub Actions], with a single workflow defined
2828
in [`.github/workflows/ci.yml`], which contains a bunch of steps that are
2929
unified for all CI jobs that we execute. When a commit is pushed to a
3030
corresponding branch or a PR, the workflow executes the
31-
[`src/ci/github-actions/ci.py`] script, which dynamically generates the specific CI
31+
[`src/ci/citool`] crate, which dynamically generates the specific CI
3232
jobs that should be executed. This script uses the [`jobs.yml`] file as an
3333
input, which contains a declarative configuration of all our CI jobs.
3434

@@ -299,7 +299,7 @@ platform’s custom [Docker container]. This has a lot of advantages for us:
299299
- We can avoid reinstalling tools (like QEMU or the Android emulator) every time
300300
thanks to Docker image caching.
301301
- Users can run the same tests in the same environment locally by just running
302-
`python3 src/ci/github-actions/ci.py run-local <job-name>`, which is awesome to debug failures. Note that there are only linux docker images available locally due to licensing and
302+
`cargo run --manifest-path src/ci/citool/Cargo.toml run-local <job-name>`, which is awesome to debug failures. Note that there are only linux docker images available locally due to licensing and
303303
other restrictions.
304304

305305
The docker images prefixed with `dist-` are used for building artifacts while
@@ -443,7 +443,7 @@ this:
443443
[GitHub Actions]: https://github.com/rust-lang/rust/actions
444444
[`jobs.yml`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/jobs.yml
445445
[`.github/workflows/ci.yml`]: https://github.com/rust-lang/rust/blob/master/.github/workflows/ci.yml
446-
[`src/ci/github-actions/ci.py`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/ci.py
446+
[`src/ci/citool`]: https://github.com/rust-lang/rust/blob/master/src/ci/citool
447447
[rust-lang-ci]: https://github.com/rust-lang-ci/rust/actions
448448
[bors]: https://github.com/bors
449449
[homu]: https://github.com/rust-lang/homu

src/doc/rustc-dev-guide/src/tests/docker.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ Some additional notes about using the interactive mode:
5353
containers. With the container name, run `docker exec -it <CONTAINER>
5454
/bin/bash` where `<CONTAINER>` is the container name like `4ba195e95cef`.
5555

56+
The approach described above is a relatively low-level interface for running the Docker images
57+
directly. If you want to run a full CI Linux job locally with Docker, in a way that is as close to CI as possible, you can use the following command:
58+
59+
```bash
60+
cargo run --manifest-path src/ci/citool/Cargo.toml run-local <job-name>
61+
# For example:
62+
cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-x86_64-linux-alt
63+
```
64+
5665
[Docker]: https://www.docker.com/
5766
[`src/ci/docker`]: https://github.com/rust-lang/rust/tree/master/src/ci/docker
5867
[`src/ci/docker/run.sh`]: https://github.com/rust-lang/rust/blob/master/src/ci/docker/run.sh

0 commit comments

Comments
 (0)