Update CI (#2406)
+ Fix post to Telegram + Make ccache read-only in all but the master branch + Delete any files in the Gradle User Home that were not used by Gradle during the GitHub Actions workflow
This commit is contained in:
parent
6751b7350f
commit
2295f9fed2
|
|
@ -48,6 +48,8 @@ jobs:
|
|||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
- name: Checkout libxposed/api
|
||||
uses: actions/checkout@v3
|
||||
|
|
@ -67,6 +69,7 @@ jobs:
|
|||
max-size: 2G
|
||||
key: ${{ runner.os }}
|
||||
restore-keys: ${{ runner.os }}
|
||||
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
|
||||
- name: Build dependencies
|
||||
working-directory: libxposed
|
||||
|
|
@ -84,15 +87,11 @@ jobs:
|
|||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
[ $(du -s ~/.gradle/wrapper | awk '{ print $1 }') -gt 250000 ] && rm -rf ~/.gradle/wrapper/* || true
|
||||
find ~/.gradle/caches -exec touch -d "2 days ago" {} + || true
|
||||
echo 'org.gradle.caching=true' >> gradle.properties
|
||||
echo 'org.gradle.parallel=true' >> gradle.properties
|
||||
echo 'org.gradle.vfs.watch=true' >> gradle.properties
|
||||
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
|
||||
echo 'android.native.buildOutput=verbose' >> gradle.properties
|
||||
sed -i 's/org.gradle.unsafe.configuration-cache=true//g' gradle.properties
|
||||
echo 'buildCache { local { removeUnusedEntriesAfterDays = 1 } }' >> settings.gradle.kts
|
||||
./gradlew zipAll
|
||||
|
||||
- name: Prepare artifact
|
||||
|
|
@ -147,7 +146,7 @@ jobs:
|
|||
path: build/symbols
|
||||
|
||||
- name: Post to channel
|
||||
if: ${{ success() && github.event_name != 'pull_request' && github.ref == 'refs/heads/master' && github.ref_type != 'tag' && inputs.post_telegram != false }}
|
||||
if: ${{ success() && github.event_name != 'pull_request' && github.ref == 'refs/heads/master' && github.ref_type != 'tag' && inputs.post_telegram != 'false' }}
|
||||
env:
|
||||
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
|
||||
DISCUSSION_ID: ${{ secrets.DISCUSSION_ID }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue