ci (gitlab/hub)
Remote #ci is the way to go in #modernhw digital design testing. Let’s see it in practice with some detail.
Gitlab (and docker)
The gitlab #gitforge includes tones of features. Among these, a facility called the container registry, which stores per project container images. Guix pack allows the creation of custom #reproductible environments as images. In particular, it is possible to create a docker image out of our manifest and channels files with
guix time-machine -C channels.scm -- pack --compression=xz --save-provenance -f docker -m manifest.scm
Check the documentation for options.
Remember that there are obviously alternative methods to produce docker images. The point on using guix resides on its reproducibility capabilities: you’ll be able to create a new, identical docker image, out of the manifest and channels files at any point in time. Even more: you’ll have the capacity to retrieve your manifest file out of the binary image in case your manifest file gets lost.
Then, this image must be loaded into the local docker store with
docker load < IMAGE
and renamed to something meaningful
docker tag IMAGE:latest gitlab-registry.whatever.fr/domain/group/NAME:TAG
go remote
Finally, pushed to the remote container registry of your project with
docker push gitlab-registry.whatever.fr/domain/group/NAME:TAG
At this point, you have an environment where you’ll run your tests using gitlab's ci features. You’ll set up your gitlab’s runners and manifest files to use this container to execute your jobs.
As an alternative, you could use a ssh executor running on your own fast and powerful hardware resources (dedicated machine, shared cluster, etc.). In this case, you’d rather produce an apptainer container image with:
guix time-machine -C channels.scm -- pack -f squashfs ...
scp
this container file to your computing resources and call it from the #gitlab executor.
#ciseries