diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index b6dc614f..a542aae2 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -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 }}