From e316bf5877a43f05b4db5c51084e32806994fff8 Mon Sep 17 00:00:00 2001 From: MCredstoner2004 <63514060+MCredstoner2004@users.noreply.github.com> Date: Sat, 3 Sep 2022 19:43:04 -0500 Subject: [PATCH] Fix CI cache Use CCache for saving and restoring compilation cache across runs instead of copying the build folder. --- .github/workflows/ci.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3e2def4..08b9405a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,12 @@ jobs: uses: actions/checkout@v2 with: submodules: recursive + + + - name: Restore CCache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: 2Gi - name: Restore Gradle Cache uses: actions/cache@v3 @@ -25,17 +31,6 @@ jobs: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}- ${{ runner.os }}-gradle- - - name: Restore CXX Cache - uses: actions/cache@v3 - with: - path: | - app/.cxx/ - app/build/intermediates/cxx/ - key: ${{ runner.os }}-cxx-${{ hashFiles('app/**/CMakeLists.txt') }}-${{ hashFiles('app/**/*.h', 'app/**/*.hpp', 'app/**/*.cpp', 'app/**/*.S') }} - restore-keys: | - ${{ runner.os }}-cxx-${{ hashFiles('app/**/CMakeLists.txt') }}- - ${{ runner.os }}-cxx- - - name: Install Ninja Build run: | sudo apt-get install -y ninja-build @@ -56,6 +51,9 @@ jobs: SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} + CMAKE_C_COMPILER_LAUNCHER: "ccache" + CMAKE_CXX_COMPILER_LAUNCHER: "ccache" + CCACHE_NOCOMPRESS: "true" run: ./gradlew --stacktrace --configuration-cache --build-cache --parallel --configure-on-demand assemble - name: Rename APKs (Signed)