[PATCH i-g-t v1 2/2] CONTRIBUTING: Add explanation how to run CI locally
Peter Senna Tschudin
peter.senna at linux.intel.com
Mon May 12 14:06:14 UTC 2025
On 4/30/2025 6:33 PM, Kamil Konieczny wrote:
> From: Louis Chauvet <louis.chauvet at bootlin.com>
>
> Currently, the CI runs only after a merge happens. To avoid reverts
> because of error in some configurations, add an explanation how to
> run it locally with a new file .gitlab-ci-local.yml
>
> This is basing on a project available here:
> https://github.com/firecow/gitlab-ci-local
>
> v2: fixed description, dropped .gitlab-ci-local (Kamil)
>
> Signed-off-by: Louis Chauvet <louis.chauvet at bootlin.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
> CONTRIBUTING.md | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
> index 05bb64bf4..6b305aef6 100644
> --- a/CONTRIBUTING.md
> +++ b/CONTRIBUTING.md
> @@ -135,6 +135,23 @@ Sending Patches
> can help our bug-filing team. When replying, you can cut a message after
> 'Known bugs' to keep it in reasonable size.
>
> +- When pushing a new series, your series will be build-tested by the CI. It is
> + useful to avoid merging broken stuff. You can run this CI locally by using the
> + project https://github.com/firecow/gitlab-ci-local
> + To install it, please refer to its README (on debian, the package
> + gitlab-ci-local can be used).
> +
> + To run it locally, you need to build docker images:
> +
> + docker build . -f Dockerfile.build-fedora -t igt-build-fedora:latest
> +
> + Now you should be able to run it:
> +
> + gitlab-ci-local --file .gitlab-ci-local.yml
> +
> + If you want to run a specific stage, you can add it to the command line:
> +
> + gitlab-ci-local --file .gitlab-ci-local.yml <stage>
Unfortunately, installing gitlab-ci-local requires adding an untrusted Debian
repository, which is not an option for me. I make it a point not to add
arbitrary Debian repositories solely to install a tool. My expectation is that
the tool should meet the necessary quality and licensing standards to be
included as part of the official Debian or Ubuntu repositories.
That said, there is an alternative approach that works well for me:
running the tool inside a container. Using containerized tools with the
local filesystem is straightforward and avoids the need for untrusted
repositories on my Linux desktop.
With this in mind, I’d like to kindly request the following changes:
1. Include gitlab-ci-local in the containers we use for building.
2. Add a simple script to the igt repository to facilitate using gitlab-ci-local
directly from the container. I’m happy to assist with this if needed, just let
me know!
Thank you for your understanding and consideration of this request.
Best regards,
Peter
More information about the igt-dev
mailing list