[llvm] [workflows] Build a container for running CI on github actions (PR #75286)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 14:47:56 PST 2023


boomanaiden154 wrote:

> I thought about creating sub-containers, but I wasn't sure if all the extra complexity was actually worth it. What's the advantage of having separate containers for different types of jobs?

The main advantage I can think of is that it keeps the image size smaller as only the dependencies needed for the job are actually pulled in. For python packages, it also allows us to install everything at the system level in the container rather than having to worry about maintaining multiple virtual environments/trying to consolidate python dependencies.

> I would like to install the python packages too, I wasn't sure the best way to implement this. Should I copy all the requirements.txt files into the container directory and then add them to the container?

I would try and keep each set of dependencies in a separate container. Otherwise the best way to do it (that I can think of) is to consolidate into a single `requirements.txt`/pipenv/something for all the CI jobs. Ideally we want to install the exact transitive closure of the dependencies used for development. Installing all the `requirements.txt` wouldn't guarantee this currently.

> This is a good idea. I've also thought about creating a container that has a pre-filled ccache cache to help speed up builds.

Shouldn't Github's `actions/cache` (or some other caching mechanism) automatically download the most recent cache even if the image changes? We don't want to be rebuilding container images that frequently, and I think the pre-filled ccache would quickly become out of date (pretty much as soon as someone touches a major header).


https://github.com/llvm/llvm-project/pull/75286


More information about the llvm-commits mailing list