Hi everyone, I'm wondering about how best to speed...
# general
e
Hi everyone, I'm wondering about how best to speed up CI. I'm curious if anyone has any experience with using a "pre-built" image as a CI runner? Doing something like: • run a docker container • mount source code (just to let pants know what backend tooling is needed) • Install pants and run
pants lint check test package ::
so pants will download all its dependencies that are used. • Save the container state as a new docker image • Use this image as the image for the CI runner Before I spend too much time experimenting, just wanted to ask out if anyone has tried something like this, and if it would be expected to be useful or if it wouldn't really gain too much over https://github.com/pantsbuild/actions/tree/main/init-pants
a
I was also thinking of doing this - I know that's not very helpful! but i think it should be useful
b
Hmm, I think the main performance boost you’d get on recurring tasks is having pantsd running and I’m not sure that creating an image is going to help much with that. Additionally, won’t the source code be constantly changing for CI runs?
Do you have a sense of which portion of CI takes the longest amount of time?
e
The source code would be changing, but the main idea would be to avoid a need to install tools like linters and mypy over and over again.
edited the OP to be clearer
a
yeah I've noticed that installing dependencies/required tools generally takes the most time - so I was thinking I would do something similar, I'll let you know if I do, and if it works
c
how best to speed up CI. I'
Just in case it split by, have you seen: https://www.pantsbuild.org/stable/docs/using-pants/using-pants-in-ci