/ci-caching

A simple project of projects to demonstrate caching in a continuous integration environment

Primary LanguageCSSMIT LicenseMIT

Gitlab CI Caching pipeline status

A simple project of projects to demonstrate basic CI caching for quicker builds in continuous integration environments.

This repository uses Gitlab CI as the target example but all continuous integration services provide caching as a basic feature and are implemented in roughly the same way.

How to use this repository

This example repository isn't meant to be a complete or comprehensive example of CI caching but rather as a place to start for those that have never seen or used caching before.

The only important thing in this repository is the .gitlab-ci.yml file. Open it up, examine it, and copy the bits that are useful to you or your projects.

References

Here are some references for some CI platforms I've used and recommend:

  • Travis CI: Easy to get started, integrates with practically every git hosting platform.
  • Gitlab CI: 100% Free & Open Source and uses markup similar to Travis.
  • Circle CI: Similar to Travis CI but much more container-focused.
  • Github Actions: Good for simple projects already hosted on Github.

Gitlab also has some great documentation regarding best practices when using caches and artifacts in CI - https://docs.gitlab.com/ee/ci/caching