Skip to content

Commit 0198345

Browse files
committed
Auto merge of #135286 - matthiaskrgr:rollup-sxuq1nh, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #134898 (Make it easier to run CI jobs locally) - #135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible) - #135261 (Account for identity substituted items in symbol mangling) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 1e3e238 + 68fc700 commit 0198345

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

Diff for: src/building/optimized-build.md

+1-1
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 `DEPLOY=1 src/ci/docker/run.sh dist-x86_64-linux`.
129+
> you can execute `python3 src/ci/github-actions/ci.py run-local dist-x86_64-linux`.

Diff for: src/tests/ci.md

+3-4
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-
[`calculate-job-matrix.py`] script, which dynamically generates the specific CI
31+
[`ci.py`] script, 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,8 +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-
`src/ci/docker/run.sh image-name`, which is awesome to debug failures. Note
303-
that there are only linux docker images available locally due to licensing and
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
304303
other restrictions.
305304

306305
The docker images prefixed with `dist-` are used for building artifacts while
@@ -413,7 +412,7 @@ To learn more about the dashboard, see the [Datadog CI docs].
413412
[GitHub Actions]: https://github.com/rust-lang/rust/actions
414413
[`jobs.yml`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/jobs.yml
415414
[`.github/workflows/ci.yml`]: https://github.com/rust-lang/rust/blob/master/.github/workflows/ci.yml
416-
[`calculate-job-matrix.py`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/calculate-job-matrix.py
415+
[`ci.py`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/ci.py
417416
[rust-lang-ci]: https://github.com/rust-lang-ci/rust/actions
418417
[bors]: https://github.com/bors
419418
[homu]: https://github.com/rust-lang/homu

Diff for: src/tests/docker.md

+9
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ Some additional notes about using the Docker images:
4545
containers. With the container name, run `docker exec -it <CONTAINER>
4646
/bin/bash` where `<CONTAINER>` is the container name like `4ba195e95cef`.
4747

48+
The approach described above is a relatively low-level interface for running the Docker images
49+
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:
50+
51+
```bash
52+
python3 src/ci/github-actions/ci.py run-local <job-name>
53+
# For example:
54+
python3 src/ci/github-actions/ci.py run-local dist-x86_64-linux-alt
55+
```
56+
4857
[Docker]: https://www.docker.com/
4958
[`src/ci/docker`]: https://github.com/rust-lang/rust/tree/master/src/ci/docker
5059
[`src/ci/docker/run.sh`]: https://github.com/rust-lang/rust/blob/master/src/ci/docker/run.sh

0 commit comments

Comments
 (0)