We also use Cachix on Gitlab, though we use a framework to avoid the boilerplate
- Cache is configured like this: makes.nix · 9ab7a0cc74360a3246b4e39a51765bcc5c60f17e · Fluid Attacks / universe · GitLab
- Jobs look like this: .gitlab-ci.yml · 9ab7a0cc74360a3246b4e39a51765bcc5c60f17e · Fluid Attacks / universe · GitLab
The side benefit of cachix is that when you build locally it’ll also use the cache, and when you build locally you are also populating the cache for the CI. So win-win
The infrastructure is simply deployed with terraform:
- Example: makes/makes/ci · a25d59662e3f7b63809166b56899b88ef6d756fa · Fluid Attacks / universe · GitLab
- Using GitHub - cattle-ops/terraform-aws-gitlab-runner: Terraform module for AWS GitLab runners on ec2 (spot) instances
The arch is this:
It runs thousand of pipelines a day where each pipeline has 100+ jobs. The arch auto-scales automatically, making it pretty fast and cost-effective