From c20b7963e917ce2480e58d39a1e046f394833730 Mon Sep 17 00:00:00 2001 From: micronaut-build <65172877+micronaut-build@users.noreply.github.com> Date: Mon, 3 Jan 2022 05:39:51 -0600 Subject: [PATCH] Enable Gradle remote cache, upgrade Gradle and use JDK17 on CI (#181) --- .github/workflows/central-sync.yml | 2 ++ .github/workflows/dependency-update.yml | 6 ++++-- .github/workflows/graalvm.yml | 8 +++++--- .github/workflows/gradle.yml | 10 ++++++++-- .github/workflows/publish-snapshot.yml | 4 +++- .github/workflows/release.yml | 8 ++++++++ gradle/wrapper/gradle-wrapper.properties | 2 +- 7 files changed, 31 insertions(+), 9 deletions(-) diff --git a/.github/workflows/central-sync.yml b/.github/workflows/central-sync.yml index 594d75dd..a9c03080 100644 --- a/.github/workflows/central-sync.yml +++ b/.github/workflows/central-sync.yml @@ -32,6 +32,8 @@ jobs: GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} GPG_FILE: ${{ secrets.GPG_FILE }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} run: | echo $GPG_FILE | base64 -d > secring.gpg ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository diff --git a/.github/workflows/dependency-update.yml b/.github/workflows/dependency-update.yml index ce8e21c1..59614106 100644 --- a/.github/workflows/dependency-update.yml +++ b/.github/workflows/dependency-update.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/cache@v2.1.6 + - uses: actions/cache@v2.1.7 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} @@ -28,9 +28,11 @@ jobs: - name: Check Dependencies env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} run: ./gradlew useLatestVersions - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.10.1 + uses: peter-evans/create-pull-request@v3.12.0 with: token: ${{ secrets.GH_TOKEN }} committer: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}> diff --git a/.github/workflows/graalvm.yml b/.github/workflows/graalvm.yml index bf3d59bd..5b0e41aa 100644 --- a/.github/workflows/graalvm.yml +++ b/.github/workflows/graalvm.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['java11'] + java: ['java11', 'java17'] steps: # https://github.com/actions/virtual-environments/issues/709 - name: Free disk space @@ -29,7 +29,7 @@ jobs: sudo apt-get clean df -h - uses: actions/checkout@v2 - - uses: actions/cache@v2.1.6 + - uses: actions/cache@v2.1.7 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} @@ -38,7 +38,7 @@ jobs: - name: Setup GraalVM CE uses: DeLaGuardo/setup-graalvm@5.0 with: - graalvm: 21.2.0 + graalvm: 21.3.0 java: ${{ matrix.java }} - name: Install Native Image run: gu install native-image @@ -53,6 +53,8 @@ jobs: env: TESTCONTAINERS_RYUK_DISABLED: true GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} - name: Publish Test Report if: always() uses: mikepenz/action-junit-report@v2 diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 6a07f09f..975eafb6 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['8', '11', '16'] + java: ['8', '11', '17'] steps: # https://github.com/actions/virtual-environments/issues/709 - name: Free disk space @@ -29,7 +29,7 @@ jobs: sudo apt-get clean df -h - uses: actions/checkout@v2 - - uses: actions/cache@v2.1.6 + - uses: actions/cache@v2.1.7 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} @@ -43,6 +43,8 @@ jobs: - name: Optional setup step env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} run: | [ -f ./setup.sh ] && ./setup.sh || true - name: Build with Gradle @@ -53,6 +55,8 @@ jobs: env: TESTCONTAINERS_RYUK_DISABLED: true GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} - name: Publish Test Report if: always() uses: mikepenz/action-junit-report@v2 @@ -65,6 +69,8 @@ jobs: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} run: ./gradlew publishToSonatype docs --no-daemon - name: Determine docs target repository uses: haya14busa/action-cond@v1 diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index e0547812..9fca5acc 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/cache@v2.1.6 + - uses: actions/cache@v2.1.7 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} @@ -28,4 +28,6 @@ jobs: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} run: ./gradlew publishToSonatype --no-daemon diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd2d351c..dd3c22b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,10 +38,16 @@ jobs: GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} GPG_FILE: ${{ secrets.GPG_FILE }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} run: | echo $GPG_FILE | base64 -d > secring.gpg ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository - name: Generate docs + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} run: ./gradlew docs - name: Export Gradle Properties uses: micronaut-projects/github-actions/export-gradle-properties@master @@ -55,6 +61,8 @@ jobs: FOLDER: build/docs VERSION: ${{ steps.release_version.outputs.release_version }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} - name: Checkout micronaut-core uses: actions/checkout@v2 with: diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a25..2e6e5897 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists