From cd9537c9e7b16e118aea9137bf05007d1a0bc99a Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sun, 26 Sep 2021 19:43:12 +0200 Subject: [PATCH] Fix cache --- .github/workflows/platform_natives.yaml | 30 ++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/platform_natives.yaml b/.github/workflows/platform_natives.yaml index b4a9850..60b059e 100644 --- a/.github/workflows/platform_natives.yaml +++ b/.github/workflows/platform_natives.yaml @@ -80,15 +80,35 @@ jobs: if: matrix.usedocker == 'true' uses: actions/cache@v2 with: - path: | - /tmp/.buildx-cache - ~/.cache - ~/.ccache - ~/tdlight-java-natives/tdlight-java-natives/.cache + path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-cache-${{ env.SAFE_ARCH }}-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx-cache-${{ env.SAFE_ARCH }}- + - name: Cache Maven + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ env.SAFE_ARCH }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven-${{ env.SAFE_ARCH }}- + + - name: Cache packages cache + uses: actions/cache@v2 + with: + path: ~/tdlight-java-natives/tdlight-java-natives/.cache + key: ${{ runner.os }}-maven-${{ env.SAFE_ARCH }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-maven-${{ env.SAFE_ARCH }}- + + - name: Cache ccache + uses: actions/cache@v2 + with: + path: ~/.ccache + key: ${{ runner.os }}-maven-${{ env.SAFE_ARCH }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-maven-${{ env.SAFE_ARCH }}- + - name: Build image if: matrix.usedocker == 'true' uses: docker/build-push-action@v2