ci: Cache Package Builds

This commit adds the default linuxkit cache directory to the
GitHub Actions cache. This will ensure that we don't pull images
that already exist in the cache, or build them if we've already
done so. It should speed up CI.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This commit is contained in:
Dave Tucker 2021-05-01 18:06:37 +01:00
parent 58136486c6
commit 6334f0dde5

View File

@ -103,6 +103,14 @@ jobs:
sudo ln -s $(pwd)/bin/linuxkit-amd64-linux /usr/local/bin/linuxkit
/usr/local/bin/linuxkit version
- name: Cache Packages
uses: actions/cache@v2
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
restore-keys: |
${{ runner.os }}-linuxkit-
- name: Build Packages
run: |
make -C pkg build
@ -149,7 +157,15 @@ jobs:
chmod ugo+x bin/linuxkit-amd64-linux
sudo ln -s $(pwd)/bin/linuxkit-amd64-linux /usr/local/bin/linuxkit
/usr/local/bin/linuxkit version
- name: Restore Package Cache
uses: actions/cache@v2
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
restore-keys: |
${{ runner.os }}-linuxkit-
- name: Run Tests
run: |
cd test