chore: simplify build cache config

This commit is contained in:
NkBe(HSSkyBoy) 2025-10-07 00:06:19 +08:00 committed by NkBe
parent d1993bb739
commit c5952b6cbf
No known key found for this signature in database
GPG Key ID: 525137026FF031DF
2 changed files with 6 additions and 36 deletions

View File

@ -27,31 +27,11 @@ jobs:
- name: Cache CCACHE
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Maven local repo
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/build.gradle*') }}
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-
- name: Cache Android Build Cache
uses: actions/cache@v4
with:
path: |
~/.android/build-cache
~/.gradle/caches/modules-2
key: ${{ runner.os }}-android-build-cache-${{ hashFiles('**/build.gradle*', '**/*.versions.toml') }}
restore-keys: |
${{ runner.os }}-android-build-cache-
- name: Write signing key if needed
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
run: |
@ -109,6 +89,10 @@ jobs:
echo 'android.native.buildOutput=verbose'
} >> gradle.properties
# for libxposed dependencies build
echo 'org.gradle.jvmargs=-Xmx2048m' >> libxposed/api/gradle.properties
echo 'org.gradle.jvmargs=-Xmx2048m' >> libxposed/service/gradle.properties
- name: Grant execution permission to gradlew
run: chmod +x gradlew

View File

@ -15,17 +15,3 @@ jobs:
- name: 删除 ccache 缓存
run: rm -rf ~/.ccache/
cleanup-runs:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: 清理所有失敗的 Workflows
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 1
delete_run_by_conclusion_pattern: 'failure,skipped'