# Storage

Delta CI persists your build environment between job runs. This may feel strange if you are migrating from another cloud CI system. However, if you think about it, this is exactly how your local dev machine works.

When your build job finishes, Delta CI takes a snapshot of the build machine's disk and saves it. When you push a new commit, Delta CI will look for an existing snapshot and restore it.

If you need to install some packages in your build environment, you will only need to do it once. We provide a convenient config sugar for such a use case.

steps:
 - run: sudo apt-get install -y libssl-dev
   when: first_run
1
2
3

If you are using a package manager such as npm or pip, all its caches are kept. When your job is completed successfully once, next time you run npm ci or pip3 install -r requirements.txt, the package manager will read from the cache instead of downloading it from the internet. This is generally quite fast already, but we also offer a convenient when condition to skip it completely if your dependencies haven't changed.

steps:
 - run: npm ci
   when:
    changed: '**/package*.json'
1
2
3
4
Last Updated: 2/1/2021, 6:56:46 PM