Fix CI cache

Use CCache for saving and restoring compilation cache across runs instead of copying the build folder.
This commit is contained in:
MCredstoner2004 2022-09-03 19:43:04 -05:00 committed by GitHub
parent 9af5df4bae
commit e316bf5877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,12 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Restore CCache
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: 2Gi
- name: Restore Gradle Cache - name: Restore Gradle Cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -25,17 +31,6 @@ jobs:
${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}- ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}-
${{ runner.os }}-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 - name: Install Ninja Build
run: | run: |
sudo apt-get install -y ninja-build sudo apt-get install -y ninja-build
@ -56,6 +51,9 @@ jobs:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} 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 run: ./gradlew --stacktrace --configuration-cache --build-cache --parallel --configure-on-demand assemble
- name: Rename APKs (Signed) - name: Rename APKs (Signed)