Turn on Configuration Cache (#1733)

This commit is contained in:
Harsh Shandilya 2022-02-17 10:13:04 +05:30 committed by GitHub
parent c83ce48196
commit c9992a64fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 97 additions and 87 deletions

View file

@ -13,11 +13,11 @@ jobs:
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
- name: Set up JDK - name: Set up JDK
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Decrypt secrets - name: Decrypt secrets
run: scripts/signing-setup.sh "$ENCRYPT_KEY" run: scripts/signing-setup.sh "$ENCRYPT_KEY"
@ -30,7 +30,7 @@ jobs:
- name: Build release binaries - name: Build release binaries
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease arguments: --no-configuration-cache :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
- name: Upload non-free release APK - name: Upload non-free release APK
uses: actions/upload-artifact@v2.3.1 uses: actions/upload-artifact@v2.3.1

View file

@ -1,4 +1,4 @@
name: "Release library subprojects" name: Release library subprojects
on: on:
push: push:
tags: tags:
@ -13,11 +13,11 @@ jobs:
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
- name: Set up JDK - name: Set up JDK
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Determine publishing task - name: Determine publishing task
id: task-select id: task-select
@ -33,7 +33,7 @@ jobs:
- name: Upload binaries - name: Upload binaries
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: :${{ steps.task-select.outputs.PROJECT }}:publishAllPublicationsToMavenCentralRepository arguments: --no-configuration-cache :${{ steps.task-select.outputs.PROJECT }}:publishAllPublicationsToMavenCentralRepository
env: env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
@ -43,7 +43,7 @@ jobs:
- name: Close and release repository - name: Close and release repository
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: closeAndReleaseRepository arguments: --no-configuration-cache closeAndReleaseRepository
env: env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}

View file

@ -13,11 +13,11 @@ jobs:
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
- name: Set up JDK - name: Set up JDK
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Decrypt secrets - name: Decrypt secrets
run: scripts/signing-setup.sh "$ENCRYPT_KEY" run: scripts/signing-setup.sh "$ENCRYPT_KEY"
@ -32,7 +32,7 @@ jobs:
env: env:
SNAPSHOT: "true" SNAPSHOT: "true"
with: with:
arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease arguments: --no-configuration-cache :app:assembleFreeRelease :app:assembleNonFreeRelease
- name: Clean secrets - name: Clean secrets
run: scripts/signing-cleanup.sh run: scripts/signing-cleanup.sh

View file

@ -1,4 +1,4 @@
name: "Draft new release" name: Draft new release
on: on:
milestone: milestone:
@ -6,10 +6,11 @@ on:
jobs: jobs:
draft-new-release: draft-new-release:
name: "Draft a new release" name: Draft a new release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Extract version from milestone - name: Extract version from milestone
shell: bash
run: | run: |
VERSION="${{ github.event.milestone.title }}" VERSION="${{ github.event.milestone.title }}"
RELEASE_VERSION="${VERSION/v/}" RELEASE_VERSION="${VERSION/v/}"
@ -36,11 +37,11 @@ jobs:
ref: ${{ env.CHECKOUT_REF }} ref: ${{ env.CHECKOUT_REF }}
- name: Set up JDK - name: Set up JDK
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Update changelog - name: Update changelog
uses: thomaseizinger/keep-a-changelog-new-release@1.3.0 uses: thomaseizinger/keep-a-changelog-new-release@1.3.0
@ -48,6 +49,7 @@ jobs:
version: ${{ github.event.milestone.title }} version: ${{ github.event.milestone.title }}
- name: Initialize git config and commit changes - name: Initialize git config and commit changes
shell: bash
run: | run: |
# Configure name and email for Actions user # Configure name and email for Actions user
git config user.name "GitHub Actions" git config user.name "GitHub Actions"
@ -68,9 +70,9 @@ jobs:
# that the version number is already correct, and we only need to drop the # that the version number is already correct, and we only need to drop the
# -SNAPSHOT suffix. # -SNAPSHOT suffix.
if [[ "${CHECKOUT_REF}" == "develop" ]]; then if [[ "${CHECKOUT_REF}" == "develop" ]]; then
./gradlew clearPreRelease ./gradlew --no-configuration-cache --no-daemon clearPreRelease
else else
./gradlew bumpPatch ./gradlew --no-configuration-cache --no-daemon bumpPatch
fi fi
# Commit changes to the versioning # Commit changes to the versioning

View file

@ -26,11 +26,11 @@ jobs:
- name: Set up JDK - name: Set up JDK
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
@ -40,7 +40,7 @@ jobs:
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: spotlessCheck arguments: --no-configuration-cache spotlessCheck
unit-tests: unit-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -61,11 +61,11 @@ jobs:
- name: Set up JDK - name: Set up JDK
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
@ -75,7 +75,7 @@ jobs:
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: test -PslimTests arguments: --no-configuration-cache test -PslimTests
- name: (Fail-only) Upload test report - name: (Fail-only) Upload test report
if: failure() if: failure()
@ -103,11 +103,11 @@ jobs:
- name: Set up JDK - name: Set up JDK
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
@ -117,7 +117,7 @@ jobs:
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: assembleFreeDebug assembleNonFreeDebug arguments: --no-configuration-cache assembleFreeDebug assembleNonFreeDebug
check-api: check-api:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -138,11 +138,11 @@ jobs:
- name: Set up JDK - name: Set up JDK
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
@ -152,7 +152,7 @@ jobs:
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: apiCheck arguments: --no-configuration-cache apiCheck
lint-debug: lint-debug:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -173,11 +173,11 @@ jobs:
- name: Set up JDK - name: Set up JDK
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
@ -187,4 +187,4 @@ jobs:
if: ${{ steps.service-changed.outputs.result == 'true' }} if: ${{ steps.service-changed.outputs.result == 'true' }}
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: lintDebug arguments: --no-configuration-cache lintDebug

View file

@ -12,14 +12,16 @@ jobs:
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
- name: Set up JDK - name: Set up JDK
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Download new translations from Crowdin - name: Download new translations from Crowdin
run: ./gradlew crowdin uses: gradle/gradle-build-action@v2.1.3
with:
arguments: --no-configuration-cache crowdin
env: env:
CROWDIN_LOGIN: ${{ secrets.CROWDIN_LOGIN }} CROWDIN_LOGIN: ${{ secrets.CROWDIN_LOGIN }}
CROWDIN_PROJECT_KEY: ${{ secrets.CROWDIN_PROJECT_KEY }} CROWDIN_PROJECT_KEY: ${{ secrets.CROWDIN_PROJECT_KEY }}

View file

@ -2,7 +2,7 @@ name: Update Publix Suffix List data
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: '0 0 * * 6' - cron: "0 0 * * 6"
jobs: jobs:
update-publicsuffix-data: update-publicsuffix-data:
@ -12,30 +12,30 @@ jobs:
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
- name: Set up JDK - name: Set up JDK
uses : actions/setup-java@v2.4.0 uses: actions/setup-java@v2.4.0
with : with:
distribution : 'zulu' distribution: zulu
java-version : '17' java-version: 17
cache: 'gradle' cache: gradle
- name: Download new publicsuffix data - name: Download new publicsuffix data
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
with: with:
arguments: updatePSL arguments: --no-configuration-cache updatePSL
- name: Compare list changes - name: Compare list changes
run: if [[ $(git diff --binary --stat) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi run: if [[ $(git diff --binary --stat) != "" ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
- name: Verify update publicsuffixes file - name: Verify update publicsuffixes file
uses: gradle/gradle-build-action@v2.1.3 uses: gradle/gradle-build-action@v2.1.3
if: env.UPDATED == 'true' if: env.UPDATED == "true"
with: with:
arguments: :autofill-parser:test -PslimTests arguments: --no-configuration-cache :autofill-parser:test -PslimTests
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v3.12.1 uses: peter-evans/create-pull-request@v3.12.1
if: env.UPDATED == 'true' if: env.UPDATED == "true"
with: with:
assignees: msfjarvis assignees: msfjarvis
author: GitHub Actions <noreply@github.com> author: GitHub Actions <noreply@github.com>
@ -48,7 +48,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Close, re-open and enable squash merge for PR - name: Close, re-open and enable squash merge for PR
if: steps.cpr.outputs.pull-request-operation == 'created' if: steps.cpr.outputs.pull-request-operation == "created"
shell: bash shell: bash
run: | run: |
gh pr close "${PR_URL}" gh pr close "${PR_URL}"

View file

@ -1,16 +1,19 @@
name: "Validate Gradle Wrapper" name: Validate Gradle Wrapper
on: on:
pull_request: pull_request:
paths: paths:
- '.github/workflows/validate_gradle_wrapper.yml' - ".github/workflows/validate_gradle_wrapper.yml"
- 'gradle/**' - "gradle/**"
- 'gradlew' - "gradlew"
- 'gradlew.bat' - "gradlew.bat"
jobs: jobs:
validation: validation:
name: "Wrapper validation" name: Wrapper validation
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2.4.0 - name: Checkout repository
- uses: gradle/wrapper-validation-action@v1.0.4 uses: actions/checkout@v2.4.0
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1.0.4

View file

@ -28,7 +28,7 @@ class CrowdinDownloadPlugin : Plugin<Project> {
override fun apply(project: Project) { override fun apply(project: Project) {
with(project) { with(project) {
val buildDirectory = layout.buildDirectory.asFile val buildDirectory = layout.buildDirectory.asFile.get()
val extension = extensions.create<CrowdinExtension>("crowdin") val extension = extensions.create<CrowdinExtension>("crowdin")
afterEvaluate { afterEvaluate {
val projectName = extension.projectName val projectName = extension.projectName
@ -55,7 +55,7 @@ class CrowdinDownloadPlugin : Plugin<Project> {
.build() .build()
val url = CROWDIN_BUILD_API_URL.format(projectName, login.get(), key.get()) val url = CROWDIN_BUILD_API_URL.format(projectName, login.get(), key.get())
val request = Request.Builder().url(url).get().build() val request = Request.Builder().url(url).get().build()
client.newCall(request).execute() client.newCall(request).execute().close()
} }
} }
val downloadCrowdin = val downloadCrowdin =

View file

@ -9,6 +9,9 @@ org.gradle.caching=true
# Enable filesystem watching # Enable filesystem watching
org.gradle.vfs.watch=true org.gradle.vfs.watch=true
# Enable experimental configuration caching
org.gradle.unsafe.configuration-cache=true
# Enable Kotlin incremental compilation # Enable Kotlin incremental compilation
kotlin.incremental=true kotlin.incremental=true