From a6238c36dd6c0561679b32650bb781d901298ae9 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Sat, 23 Sep 2023 20:36:40 +0200 Subject: [PATCH] Try to improve ccache usage Android (#1667) --- .github/workflows/android-ci.yml | 24 ++---------------------- .github/workflows/linux-ci.yml | 2 ++ 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 3a52b6197..3c8472b8d 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -86,29 +86,9 @@ jobs: run: npm install --ignore-scripts working-directory: platform/android - - name: Install ccache - run: sudo apt-get install -y ccache - - - name: Prepare ccache - run: ccache --clear - - - name: Cache ccache - uses: actions/cache@v3 - env: - cache-name: ccache-v1 + - uses: hendrikmuhs/ccache-action@v1.2 with: - path: ~/.ccache' - key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }} - ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }} - - - name: Clear ccache statistics - run: | - ccache --zero-stats - ccache --max-size=2G - ccache --show-stats + key: ${{ github.job }} - name: restore-gradle-cache uses: actions/cache@v3 diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index b45002d25..d107e9d8f 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -59,6 +59,8 @@ jobs: languages: cpp - uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.job }} - name: Get latest CMake and Ninja uses: lukka/get-cmake@latest