Enable new gradle-home-cache-cleanup option (#2096)

This commit is contained in:
Harsh Shandilya 2022-08-30 22:08:46 +05:30 committed by GitHub
parent 302eefe791
commit eb04202410
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 46 additions and 16 deletions

View file

@ -30,6 +30,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
gradle-home-cache-cleanup: true
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

View file

@ -21,6 +21,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: --no-configuration-cache :autofill-parser:publishAllPublicationsToMavenCentralRepository
gradle-home-cache-cleanup: true
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
@ -31,6 +32,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: --no-configuration-cache closeAndReleaseRepository
gradle-home-cache-cleanup: true
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}

View file

@ -36,6 +36,7 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
with:
arguments: collectFreeReleaseApks collectNonFreeReleaseApks -PsentryUploadMappings
gradle-home-cache-cleanup: true
- name: Clean secrets
run: scripts/signing-cleanup.sh

View file

@ -47,6 +47,11 @@ jobs:
with:
version: ${{ github.event.milestone.title }}
- name: Setup Gradle caching
uses: gradle/gradle-build-action@v2.3.0
with:
gradle-home-cache-cleanup: true
- name: Initialize git config and commit changes
shell: bash
run: |

View file

@ -43,13 +43,14 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: spotlessCheck
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@v3.1.0
with:
name: Build report
path: build/reports/kotlin-build/
name: Build report
path: build/reports/kotlin-build/
unit-tests:
runs-on: ubuntu-latest
@ -84,6 +85,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: test -PslimTests
gradle-home-cache-cleanup: true
- name: (Fail-only) Upload test report
if: "${{ failure() }}"
@ -96,8 +98,8 @@ jobs:
if: "${{ always() }}"
uses: actions/upload-artifact@v3.1.0
with:
name: Build report
path: build/reports/kotlin-build/
name: Build report
path: build/reports/kotlin-build/
build-apks:
runs-on: ubuntu-latest
@ -132,13 +134,14 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: assembleFreeDebug assembleNonFreeDebug
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@v3.1.0
with:
name: Build report
path: build/reports/kotlin-build/
name: Build report
path: build/reports/kotlin-build/
check-api:
runs-on: ubuntu-latest
@ -173,13 +176,14 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: apiCheck
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@v3.1.0
with:
name: Build report
path: build/reports/kotlin-build/
name: Build report
path: build/reports/kotlin-build/
lint-debug:
runs-on: ubuntu-latest
@ -214,13 +218,14 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: lintDebug
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@v3.1.0
with:
name: Build report
path: build/reports/kotlin-build/
name: Build report
path: build/reports/kotlin-build/
assemble-release-apks:
runs-on: ubuntu-latest
@ -255,13 +260,14 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: aNFR
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@v3.1.0
with:
name: Build report
path: build/reports/kotlin-build/
name: Build report
path: build/reports/kotlin-build/
detekt:
runs-on: ubuntu-latest
@ -296,6 +302,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: detekt
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report
if: "${{ always() }}"

View file

@ -46,3 +46,4 @@ jobs:
DEP_OVERRIDE_agp: ${{ matrix.agp-version }}
with:
arguments: check
gradle-home-cache-cleanup: true

View file

@ -2,7 +2,7 @@ name: Sync localisations from Crowdin
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'
- cron: '0 0 * * 0'
jobs:
sync-crowdin:
@ -21,6 +21,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: --no-configuration-cache crowdin
gradle-home-cache-cleanup: true
env:
CROWDIN_LOGIN: ${{ secrets.CROWDIN_LOGIN }}
CROWDIN_PROJECT_KEY: ${{ secrets.CROWDIN_PROJECT_KEY }}
@ -30,10 +31,10 @@ jobs:
run: if [[ $(git diff --stat) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4.1.1
if: "env.UPDATED == 'true'"
with:
assignees: msfjarvis
author: GitHub Actions <noreply@github.com>
base: develop
body: This is an automated pull request to sync localisations from Crowdin.
@ -42,3 +43,14 @@ jobs:
labels: A-localisation, P-low, S-waiting-on-review
title: Sync localisations from Crowdin
token: ${{ secrets.GITHUB_TOKEN }}
- name: Close, re-open and enable squash merge for PR
if: "${{ steps.cpr.outputs.pull-request-operation == 'created' }}"
shell: bash
run: |
gh pr close "${PR_URL}"
gh pr reopen "${PR_URL}"
gh pr merge --squash --auto "${PR_URL}"
env:
GITHUB_TOKEN: ${{ secrets.PSL_UPDATE_TOKEN }}
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}

View file

@ -2,7 +2,7 @@ name: Update Publix Suffix List data
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 6"
- cron: "0 0 * * 1"
jobs:
update-publicsuffix-data:
@ -21,6 +21,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: updatePSL
gradle-home-cache-cleanup: true
- name: Compare list changes
run: if [[ $(git diff --binary --stat) != "" ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
@ -30,13 +31,13 @@ jobs:
if: "${{ env.UPDATED == 'true' }}"
with:
arguments: :autofill-parser:test -PslimTests
gradle-home-cache-cleanup: true
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4.1.1
if: "${{ env.UPDATED == 'true' }}"
with:
assignees: msfjarvis
author: GitHub Actions <noreply@github.com>
base: develop
body: This is an automated pull request to update the publicsuffixes file to the latest copy from Mozilla