|
1 | 1 | # Docker images for CI |
2 | 2 |
|
3 | 3 | This folder contains a bunch of docker images used by the continuous integration |
4 | | -(CI) of Rust. An script is accompanied (`run.sh`) with these images to actually |
5 | | -execute them. To test out an image execute: |
| 4 | +(CI) of Rust. A script is accompanied (`run.sh`) with these images to actually |
| 5 | +execute them. |
6 | 6 |
|
7 | | -``` |
8 | | -./src/ci/docker/run.sh $image_name |
9 | | -``` |
| 7 | +Note that a single Docker image can be used by multiple CI jobs, so the job name |
| 8 | +is the important thing that you should know. You can examine the existing CI jobs in |
| 9 | +the [`jobs.yml`](../github-actions/jobs.yml) file. |
10 | 10 |
|
11 | | -for example: |
| 11 | +To run a specific CI job locally, you can use the following script: |
12 | 12 |
|
13 | 13 | ``` |
14 | | -./src/ci/docker/run.sh x86_64-gnu |
| 14 | +python3 ./src/ci/github-actions/ci.py run-local <job-name> |
15 | 15 | ``` |
16 | 16 |
|
17 | | -Images will output artifacts in an `obj/$image_name` dir at the root of a repository. Note |
18 | | -that the script will overwrite the contents of this directory. |
19 | | - |
20 | | -To match conditions in rusts CI, also set the environment variable `DEPLOY=1`, e.g.: |
| 17 | +For example, to run the `x86_64-gnu-llvm-18-1` job: |
21 | 18 | ``` |
22 | | -DEPLOY=1 ./src/ci/docker/run.sh x86_64-gnu |
| 19 | +python3 ./src/ci/github-actions/ci.py run-local x86_64-gnu-llvm-18-1 |
23 | 20 | ``` |
24 | 21 |
|
| 22 | +The job will output artifacts in an `obj/<image-name>` dir at the root of a repository. Note |
| 23 | +that the script will overwrite the contents of this directory. `<image-name>` is set based on the |
| 24 | +Docker image executed in the given CI job. |
| 25 | + |
25 | 26 | **NOTE**: In CI, the script outputs the artifacts to the `obj` directory, |
26 | | -while locally, to the `obj/$image_name` directory. This is primarily to prevent |
| 27 | +while locally, to the `obj/<image-name>` directory. This is primarily to prevent |
27 | 28 | strange linker errors when using multiple Docker images. |
28 | 29 |
|
29 | 30 | For some Linux workflows (for example `x86_64-gnu-llvm-18-N`), the process is more involved. You will need to see which script is executed for the given workflow inside the [`jobs.yml`](../github-actions/jobs.yml) file and pass it through the `DOCKER_SCRIPT` environment variable. For example, to reproduce the `x86_64-gnu-llvm-18-3` workflow, you can run the following script: |
|
0 commit comments