| 1 |
# Meson CI setup |
| 2 |
|
| 3 |
This document is aimed for Meson contributors and documents the CI |
| 4 |
setup used for testing Meson itself. The Meson project uses multiple |
| 5 |
CI platforms for covering a wide range of target systems. |
| 6 |
|
| 7 |
## GitHub actions |
| 8 |
|
| 9 |
The configuration files for GitHub actions are located in |
| 10 |
`.github/workflows`. Here, all [images](#docker-images) are tested |
| 11 |
with the full `run_tests.py` run. Additionally, some other, smaller, |
| 12 |
tests are run. |
| 13 |
|
| 14 |
## Docker images |
| 15 |
|
| 16 |
The Linux docker images are automatically built and uploaded by GitHub |
| 17 |
actions. An image rebuild is triggered when any of the image definition |
| 18 |
files are changed (in `ci/ciimage`) in the master branch. |
| 19 |
Additionally, the images are also updated weekly. |
| 20 |
|
| 21 |
Each docker image has one corresponding directory in `ci/ciimage` with |
| 22 |
an `image.json` and an `install.sh`. |
| 23 |
|
| 24 |
### Image generation |
| 25 |
|
| 26 |
There are no manual Dockerfiles. Instead the Dockerfile is |
| 27 |
automatically generated by the `build.py` script. This is done to |
| 28 |
ensure that all images have the same layout and can all be built and |
| 29 |
tested automatically. |
| 30 |
|
| 31 |
The Dockerfile is generated from the `image.json` file and basically |
| 32 |
only adds a few common files and runs the `install.sh` script which |
| 33 |
should contain all distribution specific setup steps. The `common.sh` |
| 34 |
can be sourced via `source /ci/common.sh` to access some shared |
| 35 |
functionality. |
| 36 |
|
| 37 |
To generate the image run `build.py -t build <image>`. A generated |
| 38 |
image can be tested with `build.py -t test <image>`. |
| 39 |
|
| 40 |
### Common image setup |
| 41 |
|
| 42 |
Each docker image has a `/ci` directory with an `env_vars.sh` script. |
| 43 |
This script has to be sourced before running the Meson test suite. |