mirror of
https://github.com/gradle/actions.git
synced 2026-10-16 08:31:34 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
448b3fda2e | ||
|
|
d97d29c992 | ||
|
|
294a727064 | ||
|
|
1bbceb8c10 | ||
|
|
8a24b30373 | ||
|
|
bc54cf57d1 |
@@ -3,7 +3,7 @@ name: 'Build and upload distribution'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
|
||||
@@ -10,7 +10,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ inputs.java-version }}
|
||||
|
||||
@@ -15,18 +15,6 @@ updates:
|
||||
npm-dependencies:
|
||||
patterns:
|
||||
- "*"
|
||||
ignore:
|
||||
- dependency-name: "typescript"
|
||||
versions: ["7.x"]
|
||||
- dependency-name: "@types/node"
|
||||
versions: ["25.x", "26.x"]
|
||||
# jest 30.5.0 reworked the ESM module registry, and nock no longer intercepts requests
|
||||
# made through @actions/http-client (undici): every mocked test silently hits the real
|
||||
# network instead. nock 15 does not fix it. Drop these two once they interoperate again.
|
||||
- dependency-name: "jest"
|
||||
versions: [">=30.5.0"]
|
||||
- dependency-name: "@jest/globals"
|
||||
versions: [">=30.5.0"]
|
||||
- package-ecosystem: "github-actions"
|
||||
# github-actions with directory: "/" only monitors .github/workflows
|
||||
# https://github.com/dependabot/dependabot-core/issues/6345
|
||||
|
||||
@@ -3,6 +3,3 @@
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
# Marker file written when the 'test' task is configured
|
||||
task-configured.txt
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=acd53f1edaf02f1a8ff99879f8a34b302661a057d9b063ae9e35b552f804d20a
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh gradlew
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem gradlew startup script for Windows
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2
|
||||
|
||||
|
||||
|
||||
@rem Execute gradlew
|
||||
@rem Execute Gradle
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=bafd5ce9cfaea0fbccfdc8439a1ac42fbd4cd9c89dc9a988228d8a2639a58e6c
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh gradlew
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
|
||||
@@ -19,40 +19,13 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem gradlew startup script for Windows
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
@rem Catch executions from older scripts and ensure they exit cleanly.
|
||||
@rem This can be removed once we can be reasonably confident that few people
|
||||
@rem will be migrating directly to this new wrapper.
|
||||
goto afterSafetyNet
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
goto exitWithErrorLevel
|
||||
:afterSafetyNet
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
@@ -72,14 +45,13 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
1>&2 echo.
|
||||
1>&2 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
1>&2 echo.
|
||||
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
|
||||
1>&2 echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto exitWithErrorLevel
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -87,26 +59,24 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
1>&2 echo.
|
||||
1>&2 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
1>&2 echo.
|
||||
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
|
||||
1>&2 echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto exitWithErrorLevel
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
|
||||
|
||||
@rem Execute gradlew
|
||||
@rem Execute Gradle
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel & goto exitWithErrorLevel
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
@rem This label must not be changed. We rely on old scripts being able to jump to this point.
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.5.1"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=acd53f1edaf02f1a8ff99879f8a34b302661a057d9b063ae9e35b552f804d20a
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh gradlew
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem gradlew startup script for Windows
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2
|
||||
|
||||
|
||||
|
||||
@rem Execute gradlew
|
||||
@rem Execute Gradle
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=acd53f1edaf02f1a8ff99879f8a34b302661a057d9b063ae9e35b552f804d20a
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh gradlew
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem gradlew startup script for Windows
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2
|
||||
|
||||
|
||||
|
||||
@rem Execute gradlew
|
||||
@rem Execute Gradle
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("com.gradle.develocity") version "4.5.1"
|
||||
id("com.gradle.develocity") version "4.4.2"
|
||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.4.0"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.5.1"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.5.1"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.5.1"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
||||
@@ -18,15 +18,15 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: sources/package-lock.json
|
||||
- name: Setup Gradle
|
||||
# Use a released version to avoid breakages
|
||||
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
|
||||
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
||||
env:
|
||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||
with:
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v3.29.5
|
||||
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v3.29.5
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config: |
|
||||
@@ -43,4 +43,4 @@ jobs:
|
||||
- sources/src
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v3.29.5
|
||||
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v3.29.5
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# Detect whether anything relevant to the init-script tests changed.
|
||||
@@ -36,14 +36,14 @@ jobs:
|
||||
sources/test/init-scripts/**
|
||||
- name: Setup Java
|
||||
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
|
||||
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- name: Setup Gradle
|
||||
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
|
||||
# Use a released version to avoid breakages
|
||||
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
|
||||
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
||||
env:
|
||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||
- name: Run integration tests
|
||||
|
||||
@@ -14,16 +14,6 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
smoke-tests:
|
||||
uses: ./.github/workflows/suite-smoke-test-caching.yml
|
||||
concurrency:
|
||||
group: CI-smoke-test-caching
|
||||
cancel-in-progress: false
|
||||
with:
|
||||
skip-dist: true
|
||||
runner-os: '["ubuntu-latest", "windows-latest"]'
|
||||
secrets: inherit
|
||||
|
||||
caching-integ-tests:
|
||||
uses: ./.github/workflows/suite-integ-test-caching.yml
|
||||
concurrency:
|
||||
@@ -36,7 +26,6 @@ jobs:
|
||||
other-integ-tests:
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
needs: caching-integ-tests
|
||||
uses: ./.github/workflows/suite-integ-test-other.yml
|
||||
concurrency:
|
||||
|
||||
@@ -19,21 +19,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Build and upload distribution
|
||||
if: ${{ needs.determine-suite.outputs.suite != 'full' }}
|
||||
uses: ./.github/actions/build-dist
|
||||
|
||||
smoke-tests:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/suite-smoke-test-caching.yml
|
||||
concurrency:
|
||||
group: CI-smoke-test-caching-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
with:
|
||||
skip-dist: false
|
||||
runner-os: '["ubuntu-latest", "windows-latest"]'
|
||||
secrets: inherit
|
||||
|
||||
caching-integ-tests:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/suite-integ-test-caching.yml
|
||||
@@ -47,7 +37,6 @@ jobs:
|
||||
other-integ-tests:
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
needs: caching-integ-tests
|
||||
uses: ./.github/workflows/suite-integ-test-other.yml
|
||||
concurrency:
|
||||
@@ -75,7 +64,6 @@ jobs:
|
||||
if: ${{ always() }}
|
||||
needs:
|
||||
- build-distribution
|
||||
- smoke-tests
|
||||
- caching-integ-tests
|
||||
- other-integ-tests
|
||||
- dependency-submission-integ-tests
|
||||
@@ -86,7 +74,6 @@ jobs:
|
||||
run: |
|
||||
echo "One or more integ-test jobs did not succeed:"
|
||||
echo " build-distribution: ${{ needs.build-distribution.result }}"
|
||||
echo " smoke-tests: ${{ needs.smoke-tests.result }}"
|
||||
echo " caching-integ-tests: ${{ needs.caching-integ-tests.result }}"
|
||||
echo " other-integ-tests: ${{ needs.other-integ-tests.result }}"
|
||||
echo " dependency-submission-integ-tests: ${{ needs.dependency-submission-integ-tests.result }}"
|
||||
|
||||
@@ -21,13 +21,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
|
||||
- name: 'Run analysis'
|
||||
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
|
||||
@@ -23,14 +23,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: sources/package-lock.json
|
||||
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
# Important: The push event will not trigger any other workflows, see
|
||||
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
|
||||
- name: Commit & push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
|
||||
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
|
||||
with:
|
||||
commit_author: bot-githubaction <[email protected]>
|
||||
commit_user_name: bot-githubaction
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
validate-typings:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: typesafegithub/github-actions-typing@9ddf35b71a482be7d8922b28e8d00df16b77e315 # v2.2.2
|
||||
with:
|
||||
ignored-action-files: |
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
validation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: gradle/actions/wrapper-validation@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
||||
with:
|
||||
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Build and upload distribution
|
||||
uses: ./.github/actions/build-dist
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
run: |
|
||||
./gradlew tasks --no-daemon
|
||||
./gradlew help check
|
||||
./gradlew :wrapper --gradle-version 8.7 --gradle-distribution-sha256-sum 544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
|
||||
./gradlew wrapper --gradle-version 8.7 --gradle-distribution-sha256-sum 544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
|
||||
- name: Fail groovy-dsl project
|
||||
working-directory: .github/workflow-samples/groovy-dsl
|
||||
continue-on-error: true
|
||||
@@ -57,85 +57,12 @@ jobs:
|
||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||
dependency-graph: generate-and-upload
|
||||
|
||||
# Exercises every Gradle version support status in a single Job Summary: end-of-life versions all
|
||||
# share one expandable section and are each marked with a warning sign, out-of-date versions share
|
||||
# a single info sign and legend, and the current version is left unmarked.
|
||||
# Three end-of-life versions and two out-of-date ones exercise the plural wording throughout, and
|
||||
# the two 7.x versions alongside a 6.x one check that each affected release line is named once,
|
||||
# as "Gradle 6.x and 7.x releases".
|
||||
# Versions are picked relative to Gradle 9.x being current; revisit once Gradle 10 is released.
|
||||
support-status-eol-and-outdated:
|
||||
needs: build-distribution
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
# Java 11, since Gradle 6.x cannot run on the Java 17 used elsewhere in this workflow.
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
java-version: '11'
|
||||
|
||||
- name: Setup Gradle 6.9.4 (end-of-life)
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: '6.9.4'
|
||||
- name: Build with Gradle 6.9.4
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help
|
||||
|
||||
- name: Setup Gradle 7.4 (end-of-life)
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: '7.4'
|
||||
- name: Build with Gradle 7.4
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help
|
||||
|
||||
- name: Setup Gradle 7.6.6 (end-of-life)
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: '7.6.6'
|
||||
- name: Build with Gradle 7.6.6
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help
|
||||
|
||||
- name: Setup Gradle 8.0.2 (out of date)
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: '8.0.2'
|
||||
- name: Build with Gradle 8.0.2
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help
|
||||
|
||||
- name: Setup Gradle 8.14.5 (out of date)
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: '8.14.5'
|
||||
- name: Build with Gradle 8.14.5
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help
|
||||
|
||||
# Gradle 9 and later require Java 17
|
||||
- name: Setup Java 17
|
||||
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- name: Setup Gradle current (no status reported)
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: current
|
||||
- name: Build with the current Gradle version
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help
|
||||
|
||||
successful-builds-with-no-summary:
|
||||
needs: build-distribution
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -155,7 +82,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -176,7 +103,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -193,7 +120,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -205,29 +132,12 @@ jobs:
|
||||
working-directory: .github/workflow-samples/kotlin-dsl
|
||||
run: ./gradlew assemble
|
||||
|
||||
cache-provider-external:
|
||||
needs: build-distribution
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
cache-provider: external
|
||||
- name: Build kotlin-dsl project
|
||||
working-directory: .github/workflow-samples/kotlin-dsl
|
||||
run: ./gradlew assemble
|
||||
|
||||
basic-caching:
|
||||
needs: build-distribution
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -244,7 +154,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -262,7 +172,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Build and upload distribution
|
||||
uses: ./.github/actions/build-dist
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
+5
-8
@@ -1,4 +1,4 @@
|
||||
name: Smoke test basic caching
|
||||
name: Test basic cache provider
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
@@ -15,7 +15,7 @@ on:
|
||||
|
||||
env:
|
||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: smoke-test-basic-caching-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: basic-cache-provider-${{ inputs.cache-key-prefix }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -39,12 +39,9 @@ jobs:
|
||||
with:
|
||||
cache-provider: basic
|
||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||
# Basic caching does no daemon management, so the workflow must ensure no daemon is left
|
||||
# holding locks on the Gradle User Home when the post-action save runs. Without this, `tar`
|
||||
# cannot read the Gradle '*.lock' files on Windows and the cache entry is never saved.
|
||||
- name: Build kotlin-dsl project
|
||||
working-directory: .github/workflow-samples/kotlin-dsl
|
||||
run: ./gradlew build --no-daemon
|
||||
run: ./gradlew build
|
||||
|
||||
basic-cache-verify-build:
|
||||
needs: basic-cache-seed-build
|
||||
@@ -56,7 +53,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # This test only runs on Ubuntu
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -134,30 +134,6 @@ jobs:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
|
||||
# Test that build scans are captured when caching is external
|
||||
caching-config-cache-provider-external:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
cache-provider: external
|
||||
- name: Build using Gradle wrapper
|
||||
id: gradle
|
||||
working-directory: .github/workflow-samples/groovy-dsl
|
||||
run: ./gradlew help
|
||||
- name: Check Build Scan url is captured
|
||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
|
||||
# Test seed the cache with cache-write-only and verify with cache-read-only
|
||||
caching-config-seed-write-only:
|
||||
env:
|
||||
@@ -170,7 +146,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -194,7 +170,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -123,7 +123,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -160,7 +160,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -172,7 +172,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -193,7 +193,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -255,7 +255,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -272,7 +272,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -309,7 +309,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -350,7 +350,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -382,7 +382,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -401,7 +401,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -60,24 +60,20 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Java 16
|
||||
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 16
|
||||
# Temurin 16 is EOL and publishes no signatures: setup-java v6 enables verify-signature by default
|
||||
verify-signature: false
|
||||
- name: Setup Java 20
|
||||
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 20
|
||||
# Temurin 20 is EOL and publishes no signatures: setup-java v6 enables verify-signature by default
|
||||
verify-signature: false
|
||||
- name: Setup Gradle
|
||||
uses: ./setup-gradle
|
||||
- name: List detected toolchains
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
name: Test Gradle support status reporting
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
default: '0'
|
||||
skip-dist:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: gradle-support-status-${{ inputs.cache-key-prefix }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
report-outdated-versions:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
prev-oldest: ${{ steps.versions.outputs.prev-oldest }}
|
||||
prev-newest: ${{ steps.versions.outputs.prev-newest }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
# Derived from the bundled release data so the expectations cannot drift from the action's own view.
|
||||
- name: Determine versions for each support status
|
||||
id: versions
|
||||
run: |
|
||||
set -euo pipefail
|
||||
eval "$(jq -r '
|
||||
[ .[].version
|
||||
| select(test("^[0-9]+\\.[0-9]+(\\.[0-9]+)?$"))
|
||||
| {v: ., k: (((split(".") | map(tonumber)) + [0, 0, 0]) | .[0:3])}
|
||||
]
|
||||
| sort_by(.k) as $finals
|
||||
| ($finals | last) as $latest
|
||||
| [$finals[] | select(.k[0] == $latest.k[0] - 1)] as $prev
|
||||
| "KNOWN_LATEST=\($latest.v)",
|
||||
"PREV_OLDEST=\($prev | first | .v)",
|
||||
"PREV_NEWEST=\($prev | last | .v)"
|
||||
' sources/src/wrapper-validation/wrapper-checksums.json)"
|
||||
|
||||
echo "Known latest : ${KNOWN_LATEST}"
|
||||
echo "Previous major, oldest : ${PREV_OLDEST}"
|
||||
echo "Previous major, newest : ${PREV_NEWEST}"
|
||||
|
||||
{
|
||||
echo "prev-oldest=${PREV_OLDEST}"
|
||||
echo "prev-newest=${PREV_NEWEST}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Setup Gradle with an end-of-life version
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
cache-read-only: false
|
||||
gradle-version: '7.6.4'
|
||||
- name: Build with the end-of-life version
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help "-DgradleVersionCheck=7.6.4"
|
||||
|
||||
- name: Setup Gradle with the oldest release of the previous major
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: ${{ steps.versions.outputs.prev-oldest }}
|
||||
- name: Build with the oldest release of the previous major
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help "-DgradleVersionCheck=${{ steps.versions.outputs.prev-oldest }}"
|
||||
|
||||
- name: Setup Gradle with the newest release of the previous major
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: ${{ steps.versions.outputs.prev-newest }}
|
||||
- name: Build with the newest release of the previous major
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help "-DgradleVersionCheck=${{ steps.versions.outputs.prev-newest }}"
|
||||
|
||||
verify-report:
|
||||
needs: report-outdated-versions
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
steps:
|
||||
- name: Check the support-status report was emitted
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
PREV_OLDEST: ${{ needs.report-outdated-versions.outputs.prev-oldest }}
|
||||
PREV_NEWEST: ${{ needs.report-outdated-versions.outputs.prev-newest }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
job_id=$(gh api \
|
||||
"/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/attempts/${GITHUB_RUN_ATTEMPT}/jobs" \
|
||||
--paginate --jq '.jobs[] | select(.name | endswith("report-outdated-versions")) | .id')
|
||||
if [ -z "$job_id" ]; then
|
||||
echo "Could not find the 'report-outdated-versions' Job in this workflow run"
|
||||
exit 1
|
||||
fi
|
||||
gh api --allow-escape-sequences "/repos/${GITHUB_REPOSITORY}/actions/jobs/${job_id}/logs" > job.log
|
||||
|
||||
assert_logged() {
|
||||
if ! grep -qF -- "$1" job.log; then
|
||||
echo "Expected the Job log to contain: $1"
|
||||
echo "--- support-status output found instead ---"
|
||||
grep -E '##\[(warning|notice)\]|<summary>:warning:|consider upgrading' job.log || echo "(none)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
refute_logged() {
|
||||
if grep -qF -- "$1" job.log; then
|
||||
echo "Did not expect the Job log to contain: $1"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# The runner renders '::warning::'/'::notice::' into the log as '##[warning]'/'##[notice]'.
|
||||
assert_logged "##[warning]Gradle 7.6.4 is end-of-life"
|
||||
assert_logged "##[notice]Gradle ${PREV_OLDEST} is out of date: consider updating to the latest Gradle version."
|
||||
assert_logged "##[notice]Gradle ${PREV_NEWEST} is out of date: consider updating to the latest Gradle version."
|
||||
|
||||
# Out-of-date versions get a notice, never a warning.
|
||||
refute_logged "##[warning]Gradle ${PREV_OLDEST}"
|
||||
refute_logged "##[warning]Gradle ${PREV_NEWEST}"
|
||||
|
||||
# The job summary is echoed to the log, so the rendered report can be checked directly.
|
||||
assert_logged "<summary>:warning: Gradle 7.6.4 is end-of-life</summary>"
|
||||
assert_logged "Update to the latest Gradle version."
|
||||
assert_logged "<a href=\"https://gradle.org/security-subscription/?utm_source=github-action\">Gradle Security Subscription</a>"
|
||||
|
||||
# Table signs: a warning for end-of-life, the info sign for everything still supported.
|
||||
assert_logged "<td align='center'>7.6.4 :warning:</td>"
|
||||
assert_logged "<td align='center'>${PREV_OLDEST} :information_source:</td>"
|
||||
assert_logged "<td align='center'>${PREV_NEWEST} :information_source:</td>"
|
||||
|
||||
# One legend for the whole job, no matter how many versions carry the info sign.
|
||||
legends=$(grep -cF -- "consider upgrading" job.log || true)
|
||||
if [ "$legends" != "1" ]; then
|
||||
echo "Expected exactly one upgrade legend, found ${legends}"
|
||||
exit 1
|
||||
fi
|
||||
assert_logged "<p>:information_source: Gradle version is out of date — consider upgrading. See <a href=\"https://docs.gradle.org/current/userguide/feature_lifecycle.html#eol_support\">Gradle release lifecycle</a></p>"
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
matrix:
|
||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
plugin-version: ['3.16.2', '4.5.1']
|
||||
plugin-version: ['3.16.2', '4.4.2']
|
||||
include:
|
||||
- java-version: 17
|
||||
- gradle: '8.14.3'
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
java-version: 11
|
||||
- plugin-version: '3.16.2'
|
||||
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
||||
- plugin-version: '4.5.1'
|
||||
- plugin-version: '4.4.2'
|
||||
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
matrix:
|
||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
plugin-version: ['3.16.2', '4.5.1']
|
||||
plugin-version: ['3.16.2', '4.4.2']
|
||||
include:
|
||||
- java-version: 17
|
||||
- gradle: '8.14.3'
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -148,7 +148,7 @@ jobs:
|
||||
matrix:
|
||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
plugin-version: [ '3.16.2', '4.5.1' ]
|
||||
plugin-version: [ '3.16.2', '4.4.2' ]
|
||||
include:
|
||||
- java-version: 17
|
||||
- gradle: '8.14.3'
|
||||
@@ -162,7 +162,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -191,7 +191,7 @@ jobs:
|
||||
matrix:
|
||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
plugin-version: [ '3.16.2', '4.5.1' ]
|
||||
plugin-version: [ '3.16.2', '4.4.2' ]
|
||||
include:
|
||||
- java-version: 17
|
||||
- gradle: '8.14.3'
|
||||
@@ -205,7 +205,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
run: gradle help "-DgradleVersionCheck=7.1.1"
|
||||
# Configure JDK 17 for Gradle 9 and later
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
@@ -105,12 +105,12 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: ${{ matrix.java-version }}
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
container: fedora:latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
container: fedora:latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -43,6 +43,29 @@ jobs:
|
||||
working-directory: .github/workflow-samples/groovy-dsl
|
||||
run: ./gradlew test
|
||||
|
||||
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
|
||||
restore-gradle-home-dependencies-cache:
|
||||
needs: restore-gradle-home-seed-build
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
cache-read-only: true
|
||||
- name: Execute Gradle build with --offline
|
||||
working-directory: .github/workflow-samples/groovy-dsl
|
||||
run: ./gradlew test --offline
|
||||
|
||||
# Test that the gradle-user-home cache will cache and restore local build-cache
|
||||
restore-gradle-home-build-cache:
|
||||
needs: restore-gradle-home-seed-build
|
||||
@@ -54,7 +77,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -77,7 +100,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -102,7 +125,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.github
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4.2.2 # Checkout the repository with no wrappers
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v4.2.2 # Checkout the repository with no wrappers
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.github/actions
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
name: Smoke test enhanced caching
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
default: '0'
|
||||
runner-os:
|
||||
type: string
|
||||
default: '["ubuntu-latest"]'
|
||||
skip-dist:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: smoke-test-enhanced-caching-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: smoke-test-enhanced-caching
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
enhanced-cache-seed-build:
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||
- name: Build using Gradle wrapper
|
||||
working-directory: .github/workflow-samples/groovy-dsl
|
||||
run: ./gradlew test
|
||||
|
||||
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
|
||||
enhanced-cache-verify-build:
|
||||
needs: enhanced-cache-seed-build
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
cache-read-only: true
|
||||
- name: Execute Gradle build with --offline
|
||||
working-directory: .github/workflow-samples/groovy-dsl
|
||||
run: ./gradlew test --offline
|
||||
@@ -57,3 +57,9 @@ jobs:
|
||||
with:
|
||||
runner-os: '${{ inputs.runner-os }}'
|
||||
skip-dist: ${{ inputs.skip-dist }}
|
||||
|
||||
basic-cache-provider:
|
||||
uses: ./.github/workflows/integ-test-basic-cache-provider.yml
|
||||
with:
|
||||
runner-os: '${{ inputs.runner-os }}'
|
||||
skip-dist: ${{ inputs.skip-dist }}
|
||||
|
||||
@@ -28,14 +28,6 @@ jobs:
|
||||
secrets:
|
||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
|
||||
|
||||
gradle-support-status:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: ./.github/workflows/integ-test-gradle-support-status.yml
|
||||
with:
|
||||
skip-dist: ${{ inputs.skip-dist }}
|
||||
|
||||
provision-gradle-versions:
|
||||
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
|
||||
with:
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
name: suite-smoke-test-caching
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
runner-os:
|
||||
type: string
|
||||
default: '["ubuntu-latest"]'
|
||||
skip-dist:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
enhanced-caching:
|
||||
uses: ./.github/workflows/smoke-test-enhanced-caching.yml
|
||||
with:
|
||||
runner-os: '${{ inputs.runner-os }}'
|
||||
skip-dist: ${{ inputs.skip-dist }}
|
||||
|
||||
basic-caching:
|
||||
uses: ./.github/workflows/smoke-test-basic-caching.yml
|
||||
with:
|
||||
runner-os: '${{ inputs.runner-os }}'
|
||||
skip-dist: ${{ inputs.skip-dist }}
|
||||
@@ -19,12 +19,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: sources/package-lock.json
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
.git
|
||||
.vscode
|
||||
.claude
|
||||
.idea
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
# Configuration file for asdf version manager
|
||||
nodejs 24.18.0
|
||||
gradle 9.7.1
|
||||
java liberica-17.0.14+10
|
||||
nodejs 24.3.0
|
||||
gradle 8.14.2
|
||||
java liberica-11.0.26+9
|
||||
|
||||
+2
-21
@@ -9,39 +9,20 @@
|
||||
- If new features have been added, bump the minor version (eg `4.1.1` → `4.2.0`)
|
||||
- If a new major release is required, bump the major version (eg `4.1.1` → `5.0.0`)
|
||||
- Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0.
|
||||
- Release immutability is a one-time repository setting (Settings → General → Releases → "Enable release immutability"), and applies to every release published thereafter.
|
||||
|
||||
## Release gradle/actions
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Releases in this repository are [immutable](https://docs.github.com/en/code-security/concepts/supply-chain-security/immutable-releases).
|
||||
> Once a release is published, its Git tag is permanently locked to a commit and its assets can no
|
||||
> longer be changed. Deleting the release does not release the tag name for reuse — a mistake in
|
||||
> `v6.3.0` means the next release must be `v6.3.1`. Everything below is ordered so that the tag is
|
||||
> correct *before* anything is published.
|
||||
>
|
||||
> Drafts are exempt: a draft release, and its tag, can still be edited or deleted freely.
|
||||
|
||||
- Create and push the tag for the release **before** drafting it. The tag should have the format `v6.2.0`
|
||||
- Your HEAD must point at the commit to be released.
|
||||
- Create a tag for the release. The tag should have the format `v6.2.0`
|
||||
- From CLI: `git tag -s -m "v6.2.0" v6.2.0 && git push --tags`
|
||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
||||
- Do **not** let GitHub create the tag when the release is published. It creates an unsigned,
|
||||
lightweight tag pointing at whatever `main` resolves to at that moment — so anything merged
|
||||
while the draft was open is silently included. Immutability makes both permanent.
|
||||
- Go to https://github.com/gradle/actions/releases and "Draft new release"
|
||||
- Select the existing tag — do not use "Create new tag on publish" — and copy the tag name exactly as the release title.
|
||||
- Use the newly created tag and copy the tag name exactly as the release title.
|
||||
- Craft release notes content based on issues closed, PRs merged and commits
|
||||
- Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0
|
||||
- Finalize the notes now, while the release is still a draft.
|
||||
- Publish the release.
|
||||
- Confirm immutability took effect: `gh api repos/gradle/actions/releases/tags/v6.2.0 --jq .immutable` should print `true`.
|
||||
- Force push the `v6` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
|
||||
- From CLI: `git tag -f -s -a -m "v6.2.0" v6 && git push -f --tags`
|
||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
||||
- Your HEAD must point at the commit to be tagged.
|
||||
- Never attach a GitHub release to the `v6` tag. Immutability locks only those tags that have a
|
||||
release of their own, so the major tag remains movable precisely as long as it has none.
|
||||
|
||||
## Post release steps
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ inputs:
|
||||
Specifies the caching implementation to use.
|
||||
'enhanced' (default) uses the full-featured commercial caching service (gradle-actions-caching).
|
||||
'basic' uses a simple open-source caching implementation based on GitHub Actions cache.
|
||||
'external' disables Gradle User Home caching by this action, for use when Gradle User Home is already saved and restored by another mechanism (e.g. Develocity Artifact Cache).
|
||||
required: false
|
||||
default: 'enhanced'
|
||||
|
||||
|
||||
+156
-166
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+146
-164
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+154
-163
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+192
-209
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
+91
-97
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+2
-51
@@ -133,7 +133,6 @@ You choose which provider to use via the `cache-provider` input:
|
||||
|
||||
- **`enhanced`** (default): Uses the full-featured commercial `gradle-actions-caching` library. Provides advanced features like fine-grained cache entries, intelligent cache cleanup, and deduplication. See [Enhanced Caching](#enhanced-caching) for details.
|
||||
- **`basic`**: A fully open-source (MIT) caching implementation built on the standard GitHub Actions cache (`@actions/cache`). Uses the same caching strategy as `actions/setup-java` with `cache: gradle`. See [Basic Caching](#basic-caching) for details.
|
||||
- **`external`**: Disables Gradle User Home caching by this action, for use when another mechanism already saves and restores Gradle User Home. See [Using an external cache provider](#using-an-external-cache-provider) for details.
|
||||
|
||||
```yaml
|
||||
# Use the open-source basic cache provider
|
||||
@@ -186,17 +185,7 @@ Specifically:
|
||||
- Avoid using `actions/cache` configured to cache the Gradle User Home, [as described in this example](https://github.com/actions/cache/blob/main/examples.md#java---gradle).
|
||||
- Avoid using `actions/setup-java` with the `cache: gradle` option, [as described here](https://github.com/actions/setup-java#caching-gradle-dependencies).
|
||||
|
||||
Using either of these mechanisms may interfere with the caching provided by this action. If you choose to use a different mechanism to save and restore the Gradle User Home, you should disable the caching provided by this action, as described above, or [use `cache-provider: external`](#using-an-external-cache-provider) if that mechanism is a dedicated Gradle User Home cache.
|
||||
|
||||
#### Using an external cache provider
|
||||
|
||||
If Gradle User Home is already saved and restored by another mechanism — for example the [Develocity Artifact Cache](https://github.com/gradle/actions-caching) — set `cache-provider: external` rather than `cache-disabled: true`.
|
||||
|
||||
Both settings stop `setup-gradle` from restoring or saving Gradle User Home, but `cache-provider: external` reflects the actual reason: caching is still happening, just not through this action. It also updates the Job Summary to say that caching was handled externally, rather than implying that caching was turned off.
|
||||
|
||||
```yaml
|
||||
cache-provider: external
|
||||
```
|
||||
Using either of these mechanisms may interfere with the caching provided by this action. If you choose to use a different mechanism to save and restore the Gradle User Home, you should disable the caching provided by this action, as described above.
|
||||
|
||||
## Enhanced Caching
|
||||
|
||||
@@ -518,30 +507,6 @@ so that a Job Summary is never generated, or so that a Job Summary is only gener
|
||||
add-job-summary: 'on-failure' # Valid values are 'always' (default), 'never', and 'on-failure'
|
||||
```
|
||||
|
||||
### Gradle version support status
|
||||
|
||||
The Job Summary reports the support status of each Gradle version used in the workflow, and the action adds a
|
||||
Job annotation for any version that is no longer current. The latest Gradle release is determined from release data
|
||||
bundled with the action, so no network access is required.
|
||||
|
||||
A version is reported when it is:
|
||||
- **End-of-life** — two or more major versions behind the latest release. Each such version is marked with :warning:
|
||||
in the build results table, a single expandable section below the table explains that the affected release lines
|
||||
receive no further fixes (security fixes included), and a warning annotation is added to the Job for each version.
|
||||
If you cannot upgrade, the [Gradle Security Subscription](https://gradle.org/security-subscription/) offers
|
||||
continued support for older versions.
|
||||
- **Out of date** — one major version behind the latest release, or more than two minor versions behind on the current
|
||||
major. The version is marked with :information_source: in the build results table and a notice annotation is added to
|
||||
the Job. Note that a version one major behind is still in "maintenance only" support and receives critical bug fixes
|
||||
and security fixes; an older minor of the current major has simply been superseded. See
|
||||
[Gradle release lifecycle](https://docs.gradle.org/current/userguide/feature_lifecycle.html#eol_support) for details.
|
||||
|
||||
Patch releases are not reported: only the major and minor version are considered. Release candidates, milestones and
|
||||
snapshots are never reported, so testing against a pre-release build will not produce annotations.
|
||||
|
||||
Note that these annotations are always emitted, independent of the `add-job-summary` setting. Setting
|
||||
`add-job-summary: 'never'` suppresses the Job Summary itself, but the warning and notice annotations remain.
|
||||
|
||||
### Excluding specific Gradle builds from Job Summary
|
||||
|
||||
The Job Summary works by installing an init-script in Gradle User Home which will record details of any Gradle execution during the workflow.
|
||||
@@ -956,7 +921,7 @@ Here's a minimal example:
|
||||
run: ./gradlew build
|
||||
```
|
||||
|
||||
This configuration will automatically apply `v4.5.1` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
|
||||
This configuration will automatically apply `v4.4.2` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
|
||||
|
||||
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
|
||||
In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret:
|
||||
@@ -1040,19 +1005,5 @@ Each of the plugins is signed by Gradle, and you can simply add the following sn
|
||||
<trusting group="com.gradle"/>
|
||||
<trusting group="org.gradle"/>
|
||||
</trusted-key>
|
||||
<trusted-key id="E2879931BCA1A42E55F2D64DD9B2DFBD9F3298BA">
|
||||
<trusting group="org.gradle"/>
|
||||
</trusted-key>
|
||||
</trusted-keys>
|
||||
```
|
||||
|
||||
Two keys are listed because Gradle has rotated its signing key, and the plugins applied by these actions
|
||||
are not all signed with the same one:
|
||||
- `E2879931BCA1A42E55F2D64DD9B2DFBD9F3298BA` is the current signing subkey. The
|
||||
`github-dependency-graph-gradle-plugin` used for Dependency Graph generation is signed with it from
|
||||
version `1.5.0` onward.
|
||||
- `7B79ADD11F8A779FE90FD3D0893A028475557671` is the older key, which has since been revoked. It is still
|
||||
required: the Develocity Gradle plugin (`com.gradle`) is signed with it, as are `org.gradle` plugin
|
||||
versions released before the rotation.
|
||||
|
||||
Keep both entries unless you pin plugin versions and have confirmed which key each one uses.
|
||||
|
||||
@@ -111,7 +111,7 @@ we highly recommend that you reach out to us at [[email protected]](mailto:sec
|
||||
#### Unverifiable Wrapper Jars
|
||||
Wrapper Jars generated by Gradle versions `3.3` to `4.0` are not verifiable because those files were dynamically generated by Gradle in a non-reproducible way. It's not possible to verify the `gradle-wrapper.jar` for those versions are legitimate using a hash comparison. If you have a validation failure, you should try to determine if the `gradle-wrapper.jar` was generated by one of these versions before running the build.
|
||||
|
||||
- If the Gradle version in `gradle-wrapper.properties` is outside of this range, you can regenerate the `gradle-wrapper.jar` by running `./gradlew :wrapper`. This will generate a new, verifiable wrapper jar.
|
||||
- If the Gradle version in `gradle-wrapper.properties` is outside of this range, you can regenerate the `gradle-wrapper.jar` by running `./gradlew wrapper`. This will generate a new, verifiable wrapper jar.
|
||||
- If you need to run your build with a version of Gradle between 3.3 and 4.0, you can use a newer version of Gradle to generate the `gradle-wrapper.jar`.
|
||||
|
||||
#### Wrapper Jar stored with Git LFS
|
||||
|
||||
@@ -14,7 +14,6 @@ inputs:
|
||||
Specifies the caching implementation to use.
|
||||
'enhanced' (default) uses the full-featured commercial caching service (gradle-actions-caching).
|
||||
'basic' uses a simple open-source caching implementation based on GitHub Actions cache.
|
||||
'external' disables Gradle User Home caching by this action, for use when Gradle User Home is already saved and restored by another mechanism (e.g. Develocity Artifact Cache).
|
||||
required: false
|
||||
default: 'enhanced'
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
v16
|
||||
Generated
+990
-3031
File diff suppressed because it is too large
Load Diff
+12
-10
@@ -36,7 +36,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/artifact": "6.2.1",
|
||||
"@actions/cache": "6.2.0",
|
||||
"@actions/cache": "6.0.1",
|
||||
"@actions/core": "3.0.1",
|
||||
"@actions/exec": "3.0.0",
|
||||
"@actions/github": "9.1.1",
|
||||
@@ -45,6 +45,7 @@
|
||||
"@actions/tool-cache": "4.0.0",
|
||||
"@octokit/webhooks-types": "7.6.1",
|
||||
"cheerio": "1.2.0",
|
||||
"semver": "7.8.3",
|
||||
"string-argv": "0.3.2",
|
||||
"unhomoglyph": "1.0.6",
|
||||
"which": "7.0.0"
|
||||
@@ -52,19 +53,20 @@
|
||||
"devDependencies": {
|
||||
"@jest/globals": "30.4.1",
|
||||
"@types/jest": "30.0.0",
|
||||
"@types/node": "24.13.3",
|
||||
"@types/node": "25.9.2",
|
||||
"@types/semver": "7.7.1",
|
||||
"@types/unzipper": "0.10.11",
|
||||
"@types/which": "3.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "8.69.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.61.0",
|
||||
"dedent": "1.7.2",
|
||||
"esbuild": "0.28.2",
|
||||
"eslint": "10.10.0",
|
||||
"globals": "17.12.0",
|
||||
"esbuild": "0.28.0",
|
||||
"eslint": "10.4.1",
|
||||
"globals": "17.6.0",
|
||||
"jest": "30.4.2",
|
||||
"nock": "14.0.17",
|
||||
"nock": "15.0.0",
|
||||
"npm-run-all": "4.1.5",
|
||||
"prettier": "3.9.6",
|
||||
"ts-jest": "29.4.12",
|
||||
"typescript": "6.0.3"
|
||||
"prettier": "3.8.4",
|
||||
"ts-jest": "29.4.11",
|
||||
"typescript": "5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ export async function run(): Promise<void> {
|
||||
-Dorg.gradle.configureondemand=false
|
||||
-Dorg.gradle.dependency.verification=off
|
||||
-Dorg.gradle.unsafe.isolated-projects=false
|
||||
-Dorg.gradle.isolated-projects=false
|
||||
${taskList}
|
||||
${additionalArgs}
|
||||
`
|
||||
|
||||
@@ -80,28 +80,7 @@ export class BasicCacheService implements CacheService {
|
||||
const cachePaths = getCachePaths(gradleUserHome)
|
||||
|
||||
try {
|
||||
// A cacheId of -1 means the save failed: `saveCache` reports the underlying cause and returns
|
||||
// normally, rather than throwing. Warn and continue: caching failures should not fail the build.
|
||||
const cacheId = await cache.saveCache(cachePaths, primaryKey)
|
||||
if (cacheId === -1) {
|
||||
core.warning(
|
||||
`Basic caching failed to save entry with key \`${primaryKey}\`. See preceding log output for the cause.`
|
||||
)
|
||||
return {
|
||||
status: 'enabled',
|
||||
entries: [
|
||||
entryReport({
|
||||
primaryKey,
|
||||
restoredKey,
|
||||
restoredOutcome: restoredKey
|
||||
? '(Entry restored: exact match found)'
|
||||
: '(Entry not restored: no match found)',
|
||||
savedOutcome: '(Entry not saved: save failed)'
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
await cache.saveCache(cachePaths, primaryKey)
|
||||
core.info(`Basic caching saved entry with key: ${primaryKey}`)
|
||||
return {
|
||||
status: 'enabled',
|
||||
|
||||
@@ -5,18 +5,14 @@ import {pathToFileURL} from 'url'
|
||||
import {CacheConfig, CacheProvider} from './configuration'
|
||||
import {BasicCacheService} from './cache-service-basic'
|
||||
import {BuildResult} from './build-results'
|
||||
import {CacheOptions, CacheReport, CacheService, CacheStatus} from './cache-service'
|
||||
import {CacheOptions, CacheReport, CacheService} from './cache-service'
|
||||
import {ProviderNote} from './caching-report'
|
||||
|
||||
const ENHANCED_CACHE_MESSAGE = `Enhanced Caching: This build is using the proprietary 'gradle-actions-caching' provider for optimized caching support. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for terms of use and opt-out instructions.`
|
||||
|
||||
const BASIC_CACHE_MESSAGE = `Basic Caching: This build uses the basic open-source caching provider. For faster builds and advanced features, consider switching to the Enhanced Caching provider. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for details.`
|
||||
|
||||
const EXTERNAL_CACHE_MESSAGE = `External Caching: Gradle User Home is managed by an external caching provider. This action will not restore or save Gradle User Home.`
|
||||
|
||||
class NoOpCacheService implements CacheService {
|
||||
constructor(private readonly status: CacheStatus) {}
|
||||
|
||||
async restore(_gradleUserHome: string, _cacheOptions: CacheOptions): Promise<void> {
|
||||
return
|
||||
}
|
||||
@@ -26,19 +22,14 @@ class NoOpCacheService implements CacheService {
|
||||
_buildResults: BuildResult[],
|
||||
_cacheOptions: CacheOptions
|
||||
): Promise<CacheReport> {
|
||||
return {status: this.status, entries: []}
|
||||
return {status: 'disabled', entries: []}
|
||||
}
|
||||
}
|
||||
|
||||
export async function getCacheService(cacheConfig: CacheConfig): Promise<CacheService> {
|
||||
if (cacheConfig.getCacheProvider() === CacheProvider.External) {
|
||||
logCacheMessage(EXTERNAL_CACHE_MESSAGE)
|
||||
return new NoOpCacheService('external')
|
||||
}
|
||||
|
||||
if (cacheConfig.isCacheDisabled()) {
|
||||
logCacheMessage('Cache is disabled: will not restore state from previous builds.')
|
||||
return new NoOpCacheService('disabled')
|
||||
return new NoOpCacheService()
|
||||
}
|
||||
|
||||
if (cacheConfig.getCacheProvider() === CacheProvider.Basic) {
|
||||
@@ -52,10 +43,10 @@ export async function getCacheService(cacheConfig: CacheConfig): Promise<CacheSe
|
||||
|
||||
/**
|
||||
* Identifies the caching provider for the Job Summary. Returns `undefined` when
|
||||
* caching is disabled or managed externally, since no provider is engaged in that case.
|
||||
* caching is disabled, since no provider is engaged in that case.
|
||||
*/
|
||||
export function getProviderNote(cacheConfig: CacheConfig): ProviderNote | undefined {
|
||||
if (cacheConfig.isCacheDisabled() || cacheConfig.getCacheProvider() === CacheProvider.External) {
|
||||
if (cacheConfig.isCacheDisabled()) {
|
||||
return undefined
|
||||
}
|
||||
return cacheConfig.getCacheProvider() === CacheProvider.Basic ? {kind: 'basic'} : {kind: 'enhanced'}
|
||||
|
||||
@@ -15,27 +15,26 @@ export interface CacheOptions {
|
||||
}
|
||||
|
||||
export type CacheStatus =
|
||||
| 'enabled' // Gradle User Home was restored from and saved to the cache
|
||||
| 'read-only' // restored from the cache, but not saved
|
||||
| 'write-only' // saved to the cache, but not restored
|
||||
| 'disabled' // caching was turned off via the cache-disabled parameter
|
||||
| 'disabled-existing-home' // a pre-existing Gradle User Home was found, so caching was skipped
|
||||
| 'not-available' // the GitHub Actions cache service could not be reached
|
||||
| 'external' // Gradle User Home is cached by an external provider, not by this action
|
||||
| 'enabled'
|
||||
| 'read-only'
|
||||
| 'write-only'
|
||||
| 'disabled'
|
||||
| 'disabled-existing-home'
|
||||
| 'not-available'
|
||||
|
||||
export type CacheCleanupStatus =
|
||||
| 'enabled' // stale files were purged from Gradle User Home before saving
|
||||
| 'disabled-param' // disabled via action parameter
|
||||
| 'disabled-failure' // skipped due to a build failure
|
||||
| 'disabled-config-cache-hit' // skipped due to configuration-cache reuse
|
||||
| 'disabled-readonly' // always disabled when the cache is read-only
|
||||
| 'enabled'
|
||||
| 'disabled-param'
|
||||
| 'disabled-failure'
|
||||
| 'disabled-config-cache-hit'
|
||||
| 'disabled-readonly'
|
||||
|
||||
export type ProjectCacheStatus =
|
||||
| 'not-enabled' // the hidden opt-in env var was not set (rendered as nothing)
|
||||
| 'trial-expired' // past the hard trial expiry
|
||||
| 'trial-not-licensed' // Develocity trial token missing or invalid
|
||||
| 'not-registered' // neither entitlement path satisfied (no Develocity trial token, repo not registered)
|
||||
| 'no-encryption-key' // Cannot store due to missing encryption key
|
||||
| 'enabled' // Trial in effect: will attempt to save project state
|
||||
| 'enabled' // Entitled: will attempt to save project state
|
||||
|
||||
export interface CacheEntryReport {
|
||||
entryName: string
|
||||
|
||||
@@ -2,6 +2,21 @@ import {CacheCleanupStatus, CacheEntryReport, CacheReport, CacheStatus, ProjectC
|
||||
|
||||
const DOCS = 'https://github.com/gradle/actions/blob/main/docs/setup-gradle.md'
|
||||
const DISTRIBUTION = 'https://github.com/gradle/actions/blob/main/DISTRIBUTION.md'
|
||||
const REGISTER_BASE = 'https://actions-caching-registration.vercel.app/register'
|
||||
|
||||
/**
|
||||
* The `/register` link with the current repo's identity appended, so the backend can resolve the
|
||||
* installation and route to acceptance. Repo identity comes from `GITHUB_REPOSITORY` (`owner/repo`),
|
||||
* set by the runner; falls back to the bare link if it is somehow unavailable.
|
||||
*/
|
||||
function registerUrl(): string {
|
||||
const repository = process.env.GITHUB_REPOSITORY
|
||||
if (!repository?.includes('/')) {
|
||||
return REGISTER_BASE
|
||||
}
|
||||
const [owner, repo] = repository.split('/')
|
||||
return `${REGISTER_BASE}?${new URLSearchParams({owner, repo}).toString()}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the caching provider in use, so the report can attribute the cache
|
||||
@@ -17,8 +32,7 @@ const STATUS_COPY: Record<CacheStatus, string> = {
|
||||
'write-only': `[Cache was write-only](${DOCS}#using-the-cache-write-only) — Gradle User Home was not restored from the cache.`,
|
||||
disabled: `[Caching was disabled](${DOCS}#disabling-caching) — Gradle User Home was not restored from or saved to the cache.`,
|
||||
'disabled-existing-home': `⚠️ [Caching was skipped](${DOCS}#overwriting-an-existing-gradle-user-home) — a pre-existing Gradle User Home was found, so the cache was not restored or saved.`,
|
||||
'not-available': `Caching is not available — the GitHub Actions cache service could not be reached, so Gradle User Home was not restored or saved.`,
|
||||
external: `[Gradle User Home is cached externally](${DOCS}#using-an-external-cache-provider) — this action did not restore or save the Gradle User Home.`
|
||||
'not-available': `Caching is not available — the GitHub Actions cache service could not be reached, so Gradle User Home was not restored or saved.`
|
||||
}
|
||||
|
||||
const CLEANUP_COPY: Record<CacheCleanupStatus, string> = {
|
||||
@@ -29,10 +43,11 @@ const CLEANUP_COPY: Record<CacheCleanupStatus, string> = {
|
||||
'disabled-readonly': `[Cache cleanup](${DOCS}#configuring-cache-cleanup) is always disabled when the cache is read-only.`
|
||||
}
|
||||
|
||||
const PROJECT_CACHE_COPY: Record<ProjectCacheStatus, string> = {
|
||||
// 'not-registered' is rendered dynamically (see renderProjectCacheLine) because its /register link
|
||||
// carries the repo identity, so it is intentionally absent from this static map.
|
||||
const PROJECT_CACHE_COPY: Record<Exclude<ProjectCacheStatus, 'not-registered'>, string> = {
|
||||
'not-enabled': ``,
|
||||
'trial-expired': `Project state (build-logic and configuration cache) was not cached - the Develocity caching trial has expired.`,
|
||||
'trial-not-licensed': `Project state (build-logic and configuration cache) was not cached - a develocity-access-key and develocity-server-url is required.`,
|
||||
'no-encryption-key': `Project state (build-logic and configuration cache) was not cached - a [cache-encryption-key](${DOCS}#cache-encryption-key) is required.`,
|
||||
enabled: `Caching of project state (build-logic and configuration cache) was enabled.`
|
||||
}
|
||||
@@ -64,13 +79,7 @@ function isActive(status: CacheStatus): boolean {
|
||||
function renderHeading(status: CacheStatus, providerNote?: ProviderNote): string {
|
||||
if (!isActive(status)) {
|
||||
const label =
|
||||
status === 'disabled-existing-home'
|
||||
? 'Skipped'
|
||||
: status === 'not-available'
|
||||
? 'Unavailable'
|
||||
: status === 'external'
|
||||
? 'External'
|
||||
: 'Disabled'
|
||||
status === 'disabled-existing-home' ? 'Skipped' : status === 'not-available' ? 'Unavailable' : 'Disabled'
|
||||
return `<h4>Gradle State Caching - ${label}</h4>`
|
||||
}
|
||||
|
||||
@@ -85,8 +94,30 @@ function renderCleanupLine(cleanup?: CacheCleanupStatus): string | undefined {
|
||||
}
|
||||
|
||||
function renderProjectCacheLine(projectCache?: ProjectCacheStatus): string | undefined {
|
||||
if (!projectCache) {
|
||||
return undefined
|
||||
}
|
||||
if (projectCache === 'not-registered') {
|
||||
return `Project state (build-logic and configuration cache) was not cached - this repository is not registered for advanced caching. [Register this repository](${registerUrl()}), or provide a \`develocity-access-key\` and \`develocity-server-url\`.`
|
||||
}
|
||||
// PROJECT_CACHE_COPY['not-enabled'] is '', which the .filter(Boolean) at the call site drops.
|
||||
return projectCache ? PROJECT_CACHE_COPY[projectCache] : undefined
|
||||
return PROJECT_CACHE_COPY[projectCache]
|
||||
}
|
||||
|
||||
/**
|
||||
* A plain-text log notice (no markdown) surfaced when advanced caching was withheld because the
|
||||
* repository is not registered. Returns `undefined` for every other status, so callers stay quiet
|
||||
* when the feature is enabled, disabled, or simply not opted in.
|
||||
*/
|
||||
export function renderProjectCacheNotice(projectCache?: ProjectCacheStatus): string | undefined {
|
||||
if (projectCache !== 'not-registered') {
|
||||
return undefined
|
||||
}
|
||||
return (
|
||||
'Advanced caching (build-logic and configuration cache) was not enabled: this repository ' +
|
||||
`is not registered. Register it at ${registerUrl()}, or provide a develocity-access-key and ` +
|
||||
'develocity-server-url.'
|
||||
)
|
||||
}
|
||||
|
||||
function renderProviderNote(providerNote?: ProviderNote): string | undefined {
|
||||
|
||||
@@ -175,19 +175,14 @@ export class CacheConfig {
|
||||
case 'enhanced':
|
||||
case '':
|
||||
return CacheProvider.Enhanced
|
||||
case 'external':
|
||||
return CacheProvider.External
|
||||
}
|
||||
throw TypeError(
|
||||
`The value '${val}' is not valid for 'cache-provider'. Valid values are: [basic, enhanced, external].`
|
||||
)
|
||||
throw TypeError(`The value '${val}' is not valid for 'cache-provider'. Valid values are: [basic, enhanced].`)
|
||||
}
|
||||
}
|
||||
|
||||
export enum CacheProvider {
|
||||
Basic = 'basic',
|
||||
Enhanced = 'enhanced',
|
||||
External = 'external'
|
||||
Enhanced = 'enhanced'
|
||||
}
|
||||
|
||||
export enum CacheCleanupOption {
|
||||
|
||||
@@ -33,7 +33,7 @@ export function setup(config: DevelocityConfig): void {
|
||||
// except if they are defined in the configuration
|
||||
if (config.getBuildScanPublishEnabled()) {
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.5.1')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.4.2')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', '2.1')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_URL', config.getTermsOfUseUrl())
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_AGREE', config.getTermsOfUseAgree())
|
||||
|
||||
@@ -147,6 +147,7 @@ type HostnameAccessKey = {
|
||||
}
|
||||
|
||||
export class DevelocityAccessCredentials {
|
||||
static readonly accessKeyRegexp = /^([^;=\s]+=\w+)(;[^;=\s]+=\w+)*$/
|
||||
readonly keys: HostnameAccessKey[]
|
||||
|
||||
private constructor(allKeys: HostnameAccessKey[]) {
|
||||
@@ -159,63 +160,17 @@ export class DevelocityAccessCredentials {
|
||||
|
||||
private static readonly keyDelimiter = ';'
|
||||
private static readonly hostDelimiter = '='
|
||||
private static readonly whitespace = /\s/
|
||||
|
||||
/**
|
||||
* Parse a `host=key[;host=key]*` access key value.
|
||||
*
|
||||
* Only the structure needed to split the value is validated: entries are separated by `;`, and
|
||||
* each entry is a hostname followed by `=` and a key, where the hostname contains no `=`, `;` or
|
||||
* whitespace, and the key is non-empty and contains no `;` or whitespace. Nothing else is
|
||||
* assumed about the key: it may be an OIDC token containing `.`, `-`, `_` and `=` padding, so
|
||||
* each entry is split on its _first_ `=` only.
|
||||
*
|
||||
* Returns `null` if the value doesn't match, emitting a warning that describes what is wrong.
|
||||
*/
|
||||
static parse(rawKey: string): DevelocityAccessCredentials | null {
|
||||
const trimmedKey = rawKey.trim()
|
||||
if (!trimmedKey) {
|
||||
if (!this.isValid(rawKey)) {
|
||||
return null
|
||||
}
|
||||
const keys = new Array<HostnameAccessKey>()
|
||||
const entries = trimmedKey.split(this.keyDelimiter)
|
||||
for (const [index, entry] of entries.entries()) {
|
||||
const separatorIndex = entry.indexOf(this.hostDelimiter)
|
||||
if (separatorIndex === -1) {
|
||||
return this.warnBadlyFormed(index, entries.length, `no '${this.hostDelimiter}' separator`)
|
||||
}
|
||||
const hostname = entry.substring(0, separatorIndex)
|
||||
const key = entry.substring(separatorIndex + 1)
|
||||
if (!hostname) {
|
||||
return this.warnBadlyFormed(index, entries.length, 'empty server name')
|
||||
}
|
||||
if (!key) {
|
||||
return this.warnBadlyFormed(index, entries.length, 'empty key')
|
||||
}
|
||||
if (this.whitespace.test(hostname)) {
|
||||
return this.warnBadlyFormed(index, entries.length, 'whitespace in the server name')
|
||||
}
|
||||
if (this.whitespace.test(key)) {
|
||||
return this.warnBadlyFormed(index, entries.length, 'whitespace in the key')
|
||||
}
|
||||
keys.push({hostname, key})
|
||||
}
|
||||
return new DevelocityAccessCredentials(keys)
|
||||
}
|
||||
|
||||
/**
|
||||
* Warn that an access key value is badly formed and cannot be parsed. Reports only the position
|
||||
* of the offending entry and the reason: the value is a secret, and is not yet registered for
|
||||
* masking at this point, so no part of it is ever included in the message.
|
||||
*/
|
||||
private static warnBadlyFormed(index: number, entryCount: number, reason: string): null {
|
||||
const location = entryCount > 1 ? `entry ${index + 1} of ${entryCount}` : 'the value'
|
||||
core.warning(
|
||||
`Ignoring badly formed Develocity access key: ${reason} in ${location}. ` +
|
||||
`The expected format is 'server${this.hostDelimiter}key` +
|
||||
`[${this.keyDelimiter}server${this.hostDelimiter}key]*'.`
|
||||
return new DevelocityAccessCredentials(
|
||||
rawKey.split(this.keyDelimiter).map(hostKey => {
|
||||
const pair = hostKey.split(this.hostDelimiter)
|
||||
return {hostname: pair[0], key: pair[1]}
|
||||
})
|
||||
)
|
||||
return null
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
@@ -227,6 +182,10 @@ export class DevelocityAccessCredentials {
|
||||
.map(k => `${k.hostname}${DevelocityAccessCredentials.hostDelimiter}${k.key}`)
|
||||
.join(DevelocityAccessCredentials.keyDelimiter)
|
||||
}
|
||||
|
||||
private static isValid(allKeys: string): boolean {
|
||||
return this.accessKeyRegexp.test(allKeys)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as core from '@actions/core'
|
||||
import * as exec from '@actions/exec'
|
||||
|
||||
import which from 'which'
|
||||
import * as semver from 'semver'
|
||||
import * as provisioner from './provision'
|
||||
import * as gradlew from './gradlew'
|
||||
|
||||
@@ -33,6 +34,48 @@ async function executeGradleBuild(executable: string | undefined, root: string,
|
||||
}
|
||||
}
|
||||
|
||||
export function versionIsAtLeast(actualVersion: string, requiredVersion: string): boolean {
|
||||
if (actualVersion === requiredVersion) {
|
||||
return true
|
||||
}
|
||||
|
||||
const actual = new GradleVersion(actualVersion)
|
||||
const required = new GradleVersion(requiredVersion)
|
||||
|
||||
const actualSemver = semver.coerce(actual.versionPart)!
|
||||
const comparisonSemver = semver.coerce(required.versionPart)!
|
||||
|
||||
if (semver.gt(actualSemver, comparisonSemver)) {
|
||||
return true // Actual version is greater than comparison. So it's at least as new.
|
||||
}
|
||||
if (semver.lt(actualSemver, comparisonSemver)) {
|
||||
return false // Actual version is less than comparison. So it's not as new.
|
||||
}
|
||||
|
||||
// Actual and required version numbers are equal, so compare the other parts
|
||||
|
||||
if (actual.snapshotPart || required.snapshotPart) {
|
||||
if (actual.snapshotPart && !required.snapshotPart && !required.stagePart) {
|
||||
return false // Actual has a snapshot, but required is a plain version. Required is newer.
|
||||
}
|
||||
if (required.snapshotPart && !actual.snapshotPart && !actual.stagePart) {
|
||||
return true // Required has a snapshot, but actual is a plain version. Actual is newer.
|
||||
}
|
||||
|
||||
return false // Cannot compare case where both versions have a snapshot or stage
|
||||
}
|
||||
|
||||
if (actual.stagePart) {
|
||||
if (required.stagePart) {
|
||||
return actual.stagePart >= required.stagePart // Compare stages for newer
|
||||
}
|
||||
|
||||
return false // Actual has a stage, but required does not. So required is always newer.
|
||||
}
|
||||
|
||||
return true // Actual has no stage part or snapshot part, so it cannot be older than required.
|
||||
}
|
||||
|
||||
export async function findGradleExecutableOnPath(): Promise<string | null> {
|
||||
return await which('gradle', {nothrow: true})
|
||||
}
|
||||
@@ -47,3 +90,22 @@ export function parseGradleVersionFromOutput(output: string): string | undefined
|
||||
const versionString = output.match(regex)?.[1]
|
||||
return versionString
|
||||
}
|
||||
|
||||
class GradleVersion {
|
||||
static PATTERN = /((\d+)(\.\d+)+)(-([a-z]+)-(\w+))?(-(SNAPSHOT|\d{14}([-+]\d{4})?))?/
|
||||
|
||||
versionPart: string
|
||||
stagePart: string
|
||||
snapshotPart: string
|
||||
|
||||
constructor(readonly version: string) {
|
||||
const matcher = GradleVersion.PATTERN.exec(version)
|
||||
if (!matcher) {
|
||||
throw new Error(`'${version}' is not a valid Gradle version string (examples: '1.0', '1.0-rc-1')`)
|
||||
}
|
||||
|
||||
this.versionPart = matcher[1]
|
||||
this.stagePart = matcher[4]
|
||||
this.snapshotPart = matcher[7]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
import * as core from '@actions/core'
|
||||
|
||||
import {GradleVersion} from './gradle-version'
|
||||
import wrapperChecksums from './wrapper-validation/wrapper-checksums.json'
|
||||
|
||||
/** Minor lines behind the latest that stay unreported on the current major. */
|
||||
const MINOR_GRACE = 2
|
||||
|
||||
const SECURITY_SUBSCRIPTION = 'https://gradle.org/security-subscription/?utm_source=github-action'
|
||||
const FEATURE_LIFECYCLE_DOC = 'https://docs.gradle.org/current/userguide/feature_lifecycle.html#eol_support'
|
||||
|
||||
enum SupportStatus {
|
||||
Current = 'current',
|
||||
Behind = 'behind',
|
||||
Eol = 'eol'
|
||||
}
|
||||
|
||||
/** The sign shown beside a version in the build-results table; Current has nothing to say. */
|
||||
const SIGN: Record<SupportStatus, string> = {
|
||||
[SupportStatus.Current]: '',
|
||||
[SupportStatus.Behind]: ':information_source:',
|
||||
[SupportStatus.Eol]: ':warning:'
|
||||
}
|
||||
|
||||
const UPGRADE_LEGEND =
|
||||
`<p>${SIGN[SupportStatus.Behind]} Gradle version is out of date — consider upgrading. ` +
|
||||
`See <a href="${FEATURE_LIFECYCLE_DOC}">Gradle release lifecycle</a></p>`
|
||||
|
||||
/**
|
||||
* Wording shared by the end-of-life annotation, which names a single version, and the end-of-life
|
||||
* section of the Job Summary, which covers every flagged version at once.
|
||||
*/
|
||||
const eolHeadline = (versions: GradleVersion[]): string =>
|
||||
versions.length === 1
|
||||
? `Gradle ${versions[0].version} is end-of-life`
|
||||
: `Gradle ${andList(versions.map(version => version.version))} are end-of-life`
|
||||
const eolDetail = (versions: GradleVersion[]): string =>
|
||||
`Gradle ${andList([...new Set(versions.map(version => `${version.major}.x`))])} releases receive ` +
|
||||
`no further fixes, security fixes included. Update to the latest Gradle version.`
|
||||
|
||||
/** Joins for prose: 'a', 'a and b', 'a, b and c'. */
|
||||
function andList(items: string[]): string {
|
||||
return items.length <= 1 ? (items[0] ?? '') : `${items.slice(0, -1).join(', ')} and ${items.at(-1)}`
|
||||
}
|
||||
|
||||
class ReleaseIndex {
|
||||
private readonly latest: GradleVersion
|
||||
|
||||
constructor(releasedVersions: string[]) {
|
||||
const finalReleases = releasedVersions
|
||||
.map(version => new GradleVersion(version))
|
||||
.filter(version => version.isFinalRelease())
|
||||
|
||||
if (finalReleases.length === 0) {
|
||||
throw new Error('The Gradle release data contains no final release')
|
||||
}
|
||||
|
||||
this.latest = finalReleases.reduce((max, version) => (max.compareTo(version) >= 0 ? max : version))
|
||||
}
|
||||
|
||||
private classifyVersion(version: GradleVersion): SupportStatus {
|
||||
if (!version.isFinalRelease()) {
|
||||
return SupportStatus.Current
|
||||
}
|
||||
|
||||
const majorsBehind = this.latest.major - version.major
|
||||
if (majorsBehind >= 2) {
|
||||
return SupportStatus.Eol
|
||||
}
|
||||
if (majorsBehind === 1) {
|
||||
return SupportStatus.Behind
|
||||
}
|
||||
if (version.major > this.latest.major) {
|
||||
return SupportStatus.Current // newer than the bundled data knows about
|
||||
}
|
||||
// Same major as the latest release: only the minor distance matters, so a newer patch is never reported.
|
||||
return this.latest.minor - version.minor > MINOR_GRACE ? SupportStatus.Behind : SupportStatus.Current
|
||||
}
|
||||
|
||||
/** Support status of a single version; an unparseable string is treated as current. */
|
||||
classify(gradleVersion: string): SupportStatus {
|
||||
const version = GradleVersion.parseUntrusted(gradleVersion)
|
||||
return version ? this.classifyVersion(version) : SupportStatus.Current
|
||||
}
|
||||
|
||||
/** The flagged versions grouped by status (Current omitted). */
|
||||
classified(gradleVersions: string[]): Map<SupportStatus, GradleVersion[]> {
|
||||
const byStatus = new Map<SupportStatus, GradleVersion[]>()
|
||||
const parsed = [...new Set(gradleVersions)]
|
||||
.map(version => GradleVersion.parseUntrusted(version))
|
||||
.filter((version): version is GradleVersion => version !== undefined)
|
||||
.sort(GradleVersion.compare)
|
||||
|
||||
for (const version of parsed) {
|
||||
const status = this.classifyVersion(version)
|
||||
if (status !== SupportStatus.Current) {
|
||||
byStatus.set(status, [...(byStatus.get(status) ?? []), version])
|
||||
}
|
||||
}
|
||||
return byStatus
|
||||
}
|
||||
}
|
||||
|
||||
const RELEASES = new ReleaseIndex(wrapperChecksums.map(entry => entry.version))
|
||||
|
||||
/** The status sign shown beside a version in the build-results table, or '' when there is nothing to say. */
|
||||
export function supportStatusSign(gradleVersion: string): string {
|
||||
return SIGN[RELEASES.classify(gradleVersion)]
|
||||
}
|
||||
|
||||
/** Job annotations: a warning for each end-of-life version, a notice for each version merely out of date. */
|
||||
export function reportSupportStatus(gradleVersions: string[]): void {
|
||||
const byStatus = RELEASES.classified(gradleVersions)
|
||||
for (const version of byStatus.get(SupportStatus.Eol) ?? []) {
|
||||
core.warning(
|
||||
`${eolHeadline([version])}. ${eolDetail([version])} If you cannot upgrade, see ${SECURITY_SUBSCRIPTION} for options`,
|
||||
{title: 'End-of-life Gradle version'}
|
||||
)
|
||||
}
|
||||
for (const version of byStatus.get(SupportStatus.Behind) ?? []) {
|
||||
core.notice(
|
||||
`Gradle ${version.version} is out of date: consider updating to the latest Gradle version. See ${FEATURE_LIFECYCLE_DOC}`,
|
||||
{title: 'Out-of-date Gradle version'}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** The fold-and-paragraph report placed under the build-results table. */
|
||||
export function renderSupportStatus(gradleVersions: string[]): string {
|
||||
const byStatus = RELEASES.classified(gradleVersions)
|
||||
const blocks: string[] = []
|
||||
|
||||
const eol = byStatus.get(SupportStatus.Eol) ?? []
|
||||
if (eol.length > 0) {
|
||||
// One section however many versions are end-of-life; the table already marks which they are.
|
||||
blocks.push(renderEolSection(eol))
|
||||
}
|
||||
if (byStatus.has(SupportStatus.Behind)) {
|
||||
blocks.push(UPGRADE_LEGEND)
|
||||
}
|
||||
|
||||
// The leading blank line closes the preceding HTML block, so each rendering stands on its own.
|
||||
return blocks.length > 0 ? `\n${blocks.join('\n')}\n` : ''
|
||||
}
|
||||
|
||||
function renderEolSection(versions: GradleVersion[]): string {
|
||||
return `<details>
|
||||
<summary>${SIGN[SupportStatus.Eol]} ${eolHeadline(versions)}</summary>
|
||||
<p>${eolDetail(versions)}</p>
|
||||
<p>If you cannot upgrade, see the <a href="${SECURITY_SUBSCRIPTION}">Gradle Security Subscription</a> for options.</p>
|
||||
</details>`
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
interface Stage {
|
||||
readonly rank: number
|
||||
readonly number: number
|
||||
readonly patchNo: string
|
||||
}
|
||||
|
||||
/**
|
||||
* A Gradle version, parsed and ordered the same way Gradle's own `org.gradle.util.GradleVersion` does
|
||||
*/
|
||||
export class GradleVersion {
|
||||
private static readonly PATTERN = /^((\d+)(\.\d+)+)(-([a-zA-Z]+)-(\w+))?(-(SNAPSHOT|\d{14}([-+]\d{4})?))?$/
|
||||
|
||||
// Ranks match Gradle's stage numbers; anything unrecognised sits between milestone and preview.
|
||||
private static readonly STAGE_RANK: Record<string, number> = {milestone: 0, preview: 2, rc: 3}
|
||||
private static readonly STAGE_UNKNOWN = 1
|
||||
|
||||
readonly major: number
|
||||
readonly minor: number
|
||||
readonly patch: number
|
||||
|
||||
private readonly versionPart: string
|
||||
private readonly stage: Stage | undefined
|
||||
private readonly snapshot: number | undefined
|
||||
|
||||
constructor(readonly version: string) {
|
||||
const matcher = GradleVersion.PATTERN.exec(version)
|
||||
if (!matcher) {
|
||||
throw new Error(`'${version}' is not a valid Gradle version string (examples: '1.0', '1.0-rc-1')`)
|
||||
}
|
||||
|
||||
this.versionPart = matcher[1]
|
||||
this.stage = GradleVersion.parseStage(matcher[5], matcher[6])
|
||||
this.snapshot = GradleVersion.parseSnapshot(matcher[8], matcher[9])
|
||||
|
||||
const parts = this.versionPart.split('.')
|
||||
this.major = Number(parts[0])
|
||||
this.minor = Number(parts[1])
|
||||
this.patch = parts.length > 2 ? Number(parts[2]) : 0
|
||||
}
|
||||
|
||||
isFinalRelease(): boolean {
|
||||
return this.stage === undefined && this.snapshot === undefined
|
||||
}
|
||||
|
||||
compareTo(other: GradleVersion): number {
|
||||
const parts = this.versionPart.split('.')
|
||||
const otherParts = other.versionPart.split('.')
|
||||
for (let i = 0; i < parts.length && i < otherParts.length; i++) {
|
||||
if (Number(parts[i]) !== Number(otherParts[i])) {
|
||||
return Math.sign(Number(parts[i]) - Number(otherParts[i]))
|
||||
}
|
||||
}
|
||||
if (parts.length !== otherParts.length) {
|
||||
return Math.sign(parts.length - otherParts.length)
|
||||
}
|
||||
|
||||
if (this.stage && other.stage) {
|
||||
const stageDiff = GradleVersion.compareStages(this.stage, other.stage)
|
||||
if (stageDiff !== 0) {
|
||||
return stageDiff
|
||||
}
|
||||
} else if (this.stage) {
|
||||
return -1 // a staged version precedes the final release of the same base
|
||||
} else if (other.stage) {
|
||||
return 1
|
||||
}
|
||||
|
||||
// A version with no snapshot is newer than any snapshot of the same base.
|
||||
const thisSnapshot = this.snapshot ?? Number.MAX_SAFE_INTEGER
|
||||
const otherSnapshot = other.snapshot ?? Number.MAX_SAFE_INTEGER
|
||||
if (thisSnapshot !== otherSnapshot) {
|
||||
return Math.sign(thisSnapshot - otherSnapshot)
|
||||
}
|
||||
return this.version < other.version ? -1 : this.version > other.version ? 1 : 0
|
||||
}
|
||||
|
||||
static parseUntrusted(version: string): GradleVersion | undefined {
|
||||
try {
|
||||
return new GradleVersion(version)
|
||||
} catch {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
/** Comparator for sorting; `this: void` marks it safe to pass detached, as `Array.sort` does. */
|
||||
static compare(this: void, a: GradleVersion, b: GradleVersion): number {
|
||||
return a.compareTo(b)
|
||||
}
|
||||
|
||||
private static parseStage(name: string | undefined, numberPart: string | undefined): Stage | undefined {
|
||||
if (name === undefined) {
|
||||
return undefined
|
||||
}
|
||||
// Stage names are matched exactly, as Gradle does: 'RC' is not 'rc', and ranks as unknown.
|
||||
const rank = GradleVersion.STAGE_RANK[name] ?? GradleVersion.STAGE_UNKNOWN
|
||||
// The whole stage string must be a number with an optional letter suffix; anything else ranks as 0,
|
||||
// leaving versions such as branch names to be separated by the version string itself.
|
||||
const match = /^(\d+)([a-z])?$/.exec(numberPart ?? '')
|
||||
return {rank, number: match ? Number(match[1]) : 0, patchNo: match?.[2] ?? '_'}
|
||||
}
|
||||
|
||||
private static parseSnapshot(snapshot: string | undefined, timezone: string | undefined): number | undefined {
|
||||
if (snapshot === undefined) {
|
||||
return undefined
|
||||
}
|
||||
if (snapshot === 'SNAPSHOT') {
|
||||
return 0
|
||||
}
|
||||
// A 14-digit timestamp (yyyyMMddHHmmss), optionally with a timezone offset like +0000 (UTC when absent).
|
||||
const date = `${snapshot.slice(0, 4)}-${snapshot.slice(4, 6)}-${snapshot.slice(6, 8)}`
|
||||
const time = `${snapshot.slice(8, 10)}:${snapshot.slice(10, 12)}:${snapshot.slice(12, 14)}`
|
||||
const offset = timezone ? `${timezone.slice(0, 3)}:${timezone.slice(3, 5)}` : 'Z'
|
||||
const instant = Date.parse(`${date}T${time}${offset}`)
|
||||
if (Number.isNaN(instant)) {
|
||||
// The digits matched the pattern but name no real instant. Rejecting here keeps a NaN out of
|
||||
// compareTo, which would otherwise make ordering undefined. Gradle likewise fails to parse.
|
||||
throw new Error(`'${snapshot}${timezone ?? ''}' is not a valid Gradle snapshot timestamp`)
|
||||
}
|
||||
return instant
|
||||
}
|
||||
|
||||
private static compareStages(a: Stage, b: Stage): number {
|
||||
if (a.rank !== b.rank) {
|
||||
return Math.sign(a.rank - b.rank)
|
||||
}
|
||||
if (a.number !== b.number) {
|
||||
return Math.sign(a.number - b.number)
|
||||
}
|
||||
if (a.patchNo !== b.patchNo) {
|
||||
return a.patchNo < b.patchNo ? -1 : 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import {CacheReport} from './cache-service'
|
||||
import {ProviderNote, renderCachingReport} from './caching-report'
|
||||
import {DependencyGraphConfig, getActionId, getGithubToken, getJobMatrix, SummaryConfig} from './configuration'
|
||||
import {Deprecation, getDeprecations, getErrors} from './deprecation-collector'
|
||||
import {renderSupportStatus, supportStatusSign} from './gradle-support-status'
|
||||
|
||||
export async function generateJobSummary(
|
||||
buildResults: BuildResult[],
|
||||
@@ -16,11 +15,8 @@ export async function generateJobSummary(
|
||||
): Promise<void> {
|
||||
core.startGroup('Generating Job Summary')
|
||||
|
||||
const heading = renderActionHeading()
|
||||
|
||||
const errors = renderErrors()
|
||||
if (errors) {
|
||||
core.summary.addRaw(heading)
|
||||
core.summary.addRaw(errors)
|
||||
await core.summary.write()
|
||||
return
|
||||
@@ -35,7 +31,6 @@ export async function generateJobSummary(
|
||||
core.info(cachingReport)
|
||||
|
||||
if (config.shouldGenerateJobSummary(hasFailure)) {
|
||||
core.summary.addRaw(heading)
|
||||
core.summary.addRaw(summaryTable)
|
||||
core.summary.addRaw(cachingReport)
|
||||
await core.summary.write()
|
||||
@@ -62,7 +57,8 @@ async function addPRComment(jobSummary: string): Promise<void> {
|
||||
core.info(`Adding Job Summary as comment to PR #${pull_request_number}.`)
|
||||
|
||||
const prComment = `${jobMarker(context)}
|
||||
${renderActionHeading()}<a href="${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}" target="_blank">
|
||||
<h3>Job Summary for Gradle</h3>
|
||||
<a href="${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}" target="_blank">
|
||||
<h5>${context.workflow} :: <em>${context.job}</em></h5>
|
||||
</a>
|
||||
|
||||
@@ -98,13 +94,7 @@ Note that this permission is never available for a workflow triggered from a rep
|
||||
}
|
||||
|
||||
export function renderSummaryTable(results: BuildResult[]): string {
|
||||
return `${renderDeprecations()}\n${renderBuildResults(results)}\n${renderSupportStatus(results.map(result => result.gradleVersion))}`
|
||||
}
|
||||
|
||||
function renderActionHeading(): string {
|
||||
const actionId = getActionId()
|
||||
const caption = actionId ? ` <sub><em>captured by ${actionId}</em></sub>` : ''
|
||||
return `<h3>Gradle Builds${caption}</h3>\n\n`
|
||||
return `${renderDeprecations()}\n${renderBuildResults(results)}`
|
||||
}
|
||||
|
||||
function renderErrors(): string | undefined {
|
||||
@@ -148,7 +138,8 @@ function renderBuildResults(results: BuildResult[]): string {
|
||||
<th>Build Outcome</th>
|
||||
<th>Build Scan®</th>
|
||||
</tr>${results.map(result => renderBuildResultRow(result)).join('')}
|
||||
</table>`
|
||||
</table>
|
||||
`
|
||||
}
|
||||
|
||||
function anyFailed(results: BuildResult[]): boolean {
|
||||
@@ -160,17 +151,12 @@ function renderBuildResultRow(result: BuildResult): string {
|
||||
<tr>
|
||||
<td>${truncateString(result.rootProjectName, 30)}</td>
|
||||
<td>${truncateString(result.requestedTasks, 60)}</td>
|
||||
<td align='center'>${renderGradleVersion(result.gradleVersion)}</td>
|
||||
<td align='center'>${result.gradleVersion}</td>
|
||||
<td align='center'>${renderOutcome(result)}</td>
|
||||
<td>${renderBuildScan(result)}</td>
|
||||
</tr>`
|
||||
}
|
||||
|
||||
function renderGradleVersion(gradleVersion: string): string {
|
||||
const sign = supportStatusSign(gradleVersion)
|
||||
return sign ? `${gradleVersion} ${sign}` : gradleVersion
|
||||
}
|
||||
|
||||
function renderOutcome(result: BuildResult): string {
|
||||
return result.buildFailed ? ':x:' : ':white_check_mark:'
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ buildscript {
|
||||
def pluginRepositoryUrl = getInputParam('gradle.plugin-repository.url') ?: 'https://plugins.gradle.org/m2'
|
||||
def pluginRepositoryUsername = getInputParam('gradle.plugin-repository.username')
|
||||
def pluginRepositoryPassword = getInputParam('gradle.plugin-repository.password')
|
||||
def dependencyGraphPluginVersion = getInputParam('dependency-graph-plugin.version') ?: '1.5.0'
|
||||
def dependencyGraphPluginVersion = getInputParam('dependency-graph-plugin.version') ?: '1.4.1'
|
||||
|
||||
logger.lifecycle("Resolving dependency graph plugin ${dependencyGraphPluginVersion} from plugin repository: ${pluginRepositoryUrl}")
|
||||
repositories {
|
||||
|
||||
@@ -9,6 +9,7 @@ import {setupToken} from './develocity/short-lived-token'
|
||||
|
||||
import {loadBuildResults, markBuildResultsProcessed} from './build-results'
|
||||
import {getCacheService, getProviderNote} from './cache-service-loader'
|
||||
import {renderProjectCacheNotice} from './caching-report'
|
||||
import {CacheOptions} from './cache-service'
|
||||
import {
|
||||
DevelocityConfig,
|
||||
@@ -19,7 +20,6 @@ import {
|
||||
} from './configuration'
|
||||
import * as wrapperValidator from './wrapper-validation/wrapper-validator'
|
||||
import {initializeGradleUserHome} from './gradle-user-home'
|
||||
import {reportSupportStatus} from './gradle-support-status'
|
||||
|
||||
const GRADLE_SETUP_VAR = 'GRADLE_BUILD_ACTION_SETUP_COMPLETED'
|
||||
const GRADLE_USER_HOME = 'GRADLE_USER_HOME'
|
||||
@@ -86,8 +86,15 @@ export async function complete(
|
||||
buildResults,
|
||||
cacheOptionsFrom(cacheConfig, develocityServerUrl, cacheToken)
|
||||
)
|
||||
|
||||
// Surface a prominent notice (with the /register link) only when advanced caching was withheld
|
||||
// because the repo is not registered; stay quiet when enabled by either path.
|
||||
const registrationNotice = renderProjectCacheNotice(cacheReport.projectCache)
|
||||
if (registrationNotice) {
|
||||
core.notice(registrationNotice)
|
||||
}
|
||||
|
||||
await jobSummary.generateJobSummary(buildResults, cacheReport, getProviderNote(cacheConfig), summaryConfig)
|
||||
reportSupportStatus(buildResults.map(result => result.gradleVersion))
|
||||
|
||||
markBuildResultsProcessed()
|
||||
|
||||
|
||||
@@ -1,60 +1,4 @@
|
||||
[
|
||||
{
|
||||
"version": "9.8.0-milestone-2",
|
||||
"checksum": "2b2e2cee3d8a8e5379b4f1c5902419404e83c1dba5ff55192ad5986e3f44cd6e"
|
||||
},
|
||||
{
|
||||
"version": "9.7.1",
|
||||
"checksum": "7a9ce74cff467ca1bf60a4fcd9f05185acceda4d0f382434d393e17864262c5d"
|
||||
},
|
||||
{
|
||||
"version": "9.8.0-milestone-1",
|
||||
"checksum": "2b2e2cee3d8a8e5379b4f1c5902419404e83c1dba5ff55192ad5986e3f44cd6e"
|
||||
},
|
||||
{
|
||||
"version": "9.7.0",
|
||||
"checksum": "7a9ce74cff467ca1bf60a4fcd9f05185acceda4d0f382434d393e17864262c5d"
|
||||
},
|
||||
{
|
||||
"version": "9.7.0-rc-3",
|
||||
"checksum": "7a9ce74cff467ca1bf60a4fcd9f05185acceda4d0f382434d393e17864262c5d"
|
||||
},
|
||||
{
|
||||
"version": "9.7.0-rc-2",
|
||||
"checksum": "7a9ce74cff467ca1bf60a4fcd9f05185acceda4d0f382434d393e17864262c5d"
|
||||
},
|
||||
{
|
||||
"version": "9.7.0-rc-1",
|
||||
"checksum": "7a9ce74cff467ca1bf60a4fcd9f05185acceda4d0f382434d393e17864262c5d"
|
||||
},
|
||||
{
|
||||
"version": "9.7.0-milestone-3",
|
||||
"checksum": "7a9ce74cff467ca1bf60a4fcd9f05185acceda4d0f382434d393e17864262c5d"
|
||||
},
|
||||
{
|
||||
"version": "9.7.0-milestone-2",
|
||||
"checksum": "7a9ce74cff467ca1bf60a4fcd9f05185acceda4d0f382434d393e17864262c5d"
|
||||
},
|
||||
{
|
||||
"version": "9.6.1",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.6.0",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.7.0-milestone-1",
|
||||
"checksum": "8a23bf708fd4e02674e77fb34b0fa7c02f0d53c2ad377385ab507422313d26d1"
|
||||
},
|
||||
{
|
||||
"version": "9.6.0-rc-3",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.6.0-rc-2",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.6.0-rc-1",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=acd53f1edaf02f1a8ff99879f8a34b302661a057d9b063ae9e35b552f804d20a
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
|
||||
Vendored
+2
-2
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh gradlew
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem gradlew startup script for Windows
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2
|
||||
|
||||
|
||||
|
||||
@rem Execute gradlew
|
||||
@rem Execute Gradle
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.5.1"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user