From 6334f0dde5191498596ed429ca7cd1c22af5cf24 Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Sat, 1 May 2021 18:06:37 +0100 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84c5748e8..2d35335ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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