I am working on a python project and using miniconda to manage my environment. I am using GitLab for CI with the following runner configuration
stages: - b
You can use artifacts to pass files between build stages.
However if the shared parts are environment stuff (i.e. it's not code you've written) then you probably should use a cache.