chore: simplify build cache config
This commit is contained in:
parent
d1993bb739
commit
c5952b6cbf
|
|
@ -27,31 +27,11 @@ jobs:
|
||||||
- name: Cache CCACHE
|
- name: Cache CCACHE
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: ~/.ccache
|
||||||
~/.gradle/caches
|
key: ${{ runner.os }}-ccache-${{ github.sha }}
|
||||||
~/.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*') }}
|
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-ccache-
|
${{ 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
|
- name: Write signing key if needed
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
|
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -109,6 +89,10 @@ jobs:
|
||||||
echo 'android.native.buildOutput=verbose'
|
echo 'android.native.buildOutput=verbose'
|
||||||
} >> gradle.properties
|
} >> 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
|
- name: Grant execution permission to gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,17 +15,3 @@ jobs:
|
||||||
|
|
||||||
- name: 删除 ccache 缓存
|
- name: 删除 ccache 缓存
|
||||||
run: rm -rf ~/.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'
|
|
||||||
Loading…
Reference in New Issue