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