From c680afd2dc2281cbce650f2c921a5f85a3e61528 Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Fri, 10 Feb 2023 01:54:26 -0800 Subject: [PATCH] cargo cache in linux ci --- .github/workflows/build-linux.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index dd06c48c5..c3a69466a 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -20,10 +20,25 @@ jobs: push: false cache-from: type=gha cache-to: type=gha + - name: Set up cargo cache + uses: actions/cache@v3 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + rust/target/ + key: ubuntu-18.04-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ubuntu-18.04-cargo- - name: Build vkQuake - run: docker run --rm --privileged -e VERSION=${GITHUB_SHA::8} -v ${PWD}:/usr/src/vkQuake build-vkquake /usr/src/vkQuake/Packaging/AppImage/run-in-docker.sh + run: docker run --rm --privileged -e VERSION=${GITHUB_SHA::8} -v ~/.cargo:/cargo -v "${PWD}:/usr/src/vkQuake" build-vkquake /usr/src/vkQuake/Packaging/AppImage/run-in-docker.sh - name: Upload vkQuake uses: actions/upload-artifact@v3 with: name: vkQuake archive path: Packaging/AppImage/*.tar.gz + - name: Prepare cargo cache + run: sudo chown -R $USER ~/.cargo rust/target