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

@ -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)