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.
@@ -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
@@ -150,6 +158,14 @@ jobs:
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
