mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Compare commits
118 Commits
prerelease
...
v4.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc4fc85e6b | ||
|
|
e6a814661a | ||
|
|
e55599fc4d | ||
|
|
d85b0068a7 | ||
|
|
a09a3104fe | ||
|
|
333e9d9750 | ||
|
|
2aa49bf6a9 | ||
|
|
9ab6ee6757 | ||
|
|
fb5165dcd4 | ||
|
|
0e27ea7e6c | ||
|
|
f4845d289c | ||
|
|
094f2191c5 | ||
|
|
83709b49fe | ||
|
|
5f21a9bb99 | ||
|
|
52ee405746 | ||
|
|
7f20d0bf71 | ||
|
|
b6bc8c2f17 | ||
|
|
b12c3a65f2 | ||
|
|
d191577859 | ||
|
|
e726a12472 | ||
|
|
d30cc9ecf2 | ||
|
|
d0efa7b0e7 | ||
|
|
8422a6a674 | ||
|
|
19ff74e0a6 | ||
|
|
e03a1f068e | ||
|
|
084b95f65a | ||
|
|
1e2142185e | ||
|
|
07e0f1c008 | ||
|
|
af45dcfe3c | ||
|
|
d8b3a9fb11 | ||
|
|
9e8f2bcf56 | ||
|
|
5ac3e361a2 | ||
|
|
4a0951b3dc | ||
|
|
48353a25ca | ||
|
|
473878a77f | ||
|
|
f22ac61fd1 | ||
|
|
4ec844e551 | ||
|
|
24ca383271 | ||
|
|
4ca2d5d749 | ||
|
|
f31476bde2 | ||
|
|
c345cfbe93 | ||
|
|
b526f6673b | ||
|
|
93415e6645 | ||
|
|
6bc218d5d0 | ||
|
|
9d68e8b435 | ||
|
|
707359876a | ||
|
|
4103f31d4d | ||
|
|
15020cf347 | ||
|
|
ed43923279 | ||
|
|
6dafcf2d22 | ||
|
|
2ca30c9a83 | ||
|
|
bb0c460cbf | ||
|
|
0674891af5 | ||
|
|
1b7e89588d | ||
|
|
b0cc090202 | ||
|
|
872d6b954c | ||
|
|
61e4a25782 | ||
|
|
f4e0ea0cdd | ||
|
|
9f70748719 | ||
|
|
ff4a71656f | ||
|
|
b5e8e5f396 | ||
|
|
7605d180a5 | ||
|
|
d32c4bdc08 | ||
|
|
0d30c9111c | ||
|
|
cf8c435260 | ||
|
|
b4c01c399c | ||
|
|
340f8b64e0 | ||
|
|
36455cb5f4 | ||
|
|
e5c1381176 | ||
|
|
d156388eb1 | ||
|
|
2e93f415f7 | ||
|
|
ee8dc905e6 | ||
|
|
5fe9264c08 | ||
|
|
29d4d80ef6 | ||
|
|
478782dbb4 | ||
|
|
e6215edc51 | ||
|
|
765a73447c | ||
|
|
a122cf5aa7 | ||
|
|
5baa1ded34 | ||
|
|
7e0f050645 | ||
|
|
9291ac6ca5 | ||
|
|
6da85a08fb | ||
|
|
c3c8a18b22 | ||
|
|
9498413fd8 | ||
|
|
16bf8bc8fe | ||
|
|
faf4eeacd5 | ||
|
|
4b7cc6e174 | ||
|
|
0873530e60 | ||
|
|
f67327f0c8 | ||
|
|
d32a10b3ae | ||
|
|
e598a32529 | ||
|
|
d6c8cf816c | ||
|
|
79ea5b8f3e | ||
|
|
d77a030aaf | ||
|
|
a8a2fd2323 | ||
|
|
089bfb1063 | ||
|
|
ca7f3fa2f5 | ||
|
|
1c29763ff7 | ||
|
|
1bc1a6c922 | ||
|
|
b51fcf4d6c | ||
|
|
82758ea0fa | ||
|
|
835367424c | ||
|
|
1ac097f44e | ||
|
|
60851f5fb2 | ||
|
|
e7551dc2a9 | ||
|
|
e482045599 | ||
|
|
631bcacd15 | ||
|
|
d724da5563 | ||
|
|
228ce9b15b | ||
|
|
64869b1757 | ||
|
|
0b404a7148 | ||
|
|
4cb1dc0963 | ||
|
|
1eb9607ae7 | ||
|
|
a5a9e731f3 | ||
|
|
add58192d1 | ||
|
|
9edf610422 | ||
|
|
b1833c4c90 | ||
|
|
895252588e |
4
.github/actions/build-dist/action.yml
vendored
4
.github/actions/build-dist/action.yml
vendored
@@ -3,7 +3,7 @@ name: 'Build and upload distribution'
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -23,7 +23,7 @@ runs:
|
|||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
|
|
||||||
- name: Upload distribution
|
- name: Upload distribution
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|||||||
4
.github/actions/init-integ-test/action.yml
vendored
4
.github/actions/init-integ-test/action.yml
vendored
@@ -4,7 +4,7 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 11
|
java-version: 11
|
||||||
@@ -17,7 +17,7 @@ runs:
|
|||||||
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
|
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
|
||||||
- name: Download dist
|
- name: Download dist
|
||||||
if: ${{ env.SKIP_DIST != 'true' && !env.ACT }}
|
if: ${{ env.SKIP_DIST != 'true' && !env.ACT }}
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|||||||
14
.github/dependabot.yml
vendored
14
.github/dependabot.yml
vendored
@@ -47,40 +47,40 @@ updates:
|
|||||||
registries:
|
registries:
|
||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
- package-ecosystem: "gradle"
|
- package-ecosystem: "gradle"
|
||||||
directory: ".github/workflow-samples/groovy-dsl"
|
directory: ".github/workflow-samples/groovy-dsl"
|
||||||
registries:
|
registries:
|
||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
- package-ecosystem: "gradle"
|
- package-ecosystem: "gradle"
|
||||||
directory: ".github/workflow-samples/java-toolchain"
|
directory: ".github/workflow-samples/java-toolchain"
|
||||||
registries:
|
registries:
|
||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
- package-ecosystem: "gradle"
|
- package-ecosystem: "gradle"
|
||||||
directory: ".github/workflow-samples/kotlin-dsl"
|
directory: ".github/workflow-samples/kotlin-dsl"
|
||||||
registries:
|
registries:
|
||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
- package-ecosystem: "gradle"
|
- package-ecosystem: "gradle"
|
||||||
directory: ".github/workflow-samples/no-wrapper"
|
directory: ".github/workflow-samples/no-wrapper"
|
||||||
registries:
|
registries:
|
||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
- package-ecosystem: "gradle"
|
- package-ecosystem: "gradle"
|
||||||
directory: ".github/workflow-samples/no-wrapper-gradle-5"
|
directory: ".github/workflow-samples/no-wrapper-gradle-5"
|
||||||
registries:
|
registries:
|
||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
- package-ecosystem: "gradle"
|
- package-ecosystem: "gradle"
|
||||||
directory: "sources/test/init-scripts"
|
directory: "sources/test/init-scripts"
|
||||||
registries:
|
registries:
|
||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
|
|||||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
|
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
|
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.17.6"
|
id "com.gradle.develocity" version "3.18.2"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
|
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("org.apache.commons:commons-math3:3.6.1")
|
api("org.apache.commons:commons-math3:3.6.1")
|
||||||
implementation("com.google.guava:guava:33.2.1-jre")
|
implementation("com.google.guava:guava:33.3.1-jre")
|
||||||
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.3")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
|
|||||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
|
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.gradle.develocity") version "3.17.6"
|
id("com.gradle.develocity") version "3.18.2"
|
||||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.1"
|
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.17.6"
|
id "com.gradle.develocity" version "3.18.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.17.6"
|
id "com.gradle.develocity" version "3.18.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
|
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.17.6"
|
id "com.gradle.develocity" version "3.18.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
13
.github/workflows/ci-check-and-unit-test.yml
vendored
13
.github/workflows/ci-check-and-unit-test.yml
vendored
@@ -17,16 +17,23 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: sources/package-lock.json
|
cache-dependency-path: sources/package-lock.json
|
||||||
|
- name: Setup Gradle
|
||||||
|
# Use a released version to avoid breakages
|
||||||
|
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
|
||||||
|
env:
|
||||||
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||||
|
with:
|
||||||
|
gradle-version: "8.11"
|
||||||
|
|
||||||
- name: Check formatting and compile
|
- name: Check formatting and compile
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm clean-install
|
||||||
npm run check
|
npm run check
|
||||||
npm run compile
|
npm run compile
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v44
|
uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
dist/**
|
dist/**
|
||||||
|
|||||||
13
.github/workflows/ci-codeql.yml
vendored
13
.github/workflows/ci-codeql.yml
vendored
@@ -6,16 +6,15 @@ on:
|
|||||||
- 'main'
|
- 'main'
|
||||||
- 'release/**'
|
- 'release/**'
|
||||||
- 'dev/**' # Allow running Code QL on dev branches without a PR
|
- 'dev/**' # Allow running Code QL on dev branches without a PR
|
||||||
paths-ignore:
|
|
||||||
- 'dist/**'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
paths-ignore:
|
|
||||||
- 'dist/**'
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '25 23 * * 2'
|
- cron: '25 23 * * 2'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
@@ -32,11 +31,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
config: |
|
config: |
|
||||||
@@ -44,4 +43,4 @@ jobs:
|
|||||||
- sources/src
|
- sources/src
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4
|
||||||
|
|||||||
12
.github/workflows/ci-init-script-check.yml
vendored
12
.github/workflows/ci-init-script-check.yml
vendored
@@ -14,19 +14,25 @@ on:
|
|||||||
- 'sources/test/init-scripts/**'
|
- 'sources/test/init-scripts/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-init-scripts:
|
test-init-scripts:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 11
|
java-version: 11
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3 # Use a released version to avoid breakages
|
# Use a released version to avoid breakages
|
||||||
|
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
|
||||||
|
env:
|
||||||
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
working-directory: sources/test/init-scripts
|
working-directory: sources/test/init-scripts
|
||||||
run: ./gradlew check
|
run: ./gradlew check
|
||||||
|
|||||||
10
.github/workflows/ci-integ-test-full.yml
vendored
10
.github/workflows/ci-integ-test-full.yml
vendored
@@ -6,13 +6,13 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: integ-test-${{ github.ref }}
|
group: integ-test
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
caching-integ-tests:
|
caching-integ-tests:
|
||||||
uses: ./.github/workflows/suite-integ-test-caching.yml
|
uses: ./.github/workflows/suite-integ-test-caching.yml
|
||||||
@@ -25,6 +25,8 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
other-integ-tests:
|
other-integ-tests:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
uses: ./.github/workflows/suite-integ-test-other.yml
|
uses: ./.github/workflows/suite-integ-test-other.yml
|
||||||
concurrency:
|
concurrency:
|
||||||
group: CI-integ-test-full
|
group: CI-integ-test-full
|
||||||
|
|||||||
12
.github/workflows/ci-integ-test.yml
vendored
12
.github/workflows/ci-integ-test.yml
vendored
@@ -11,19 +11,19 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: integ-test-${{ github.ref }}
|
group: integ-test
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-distribution:
|
build-distribution:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Build and upload distribution
|
- name: Build and upload distribution
|
||||||
if: ${{ needs.determine-suite.outputs.suite != 'full' }}
|
if: ${{ needs.determine-suite.outputs.suite != 'full' }}
|
||||||
uses: ./.github/actions/build-dist
|
uses: ./.github/actions/build-dist
|
||||||
@@ -36,6 +36,8 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
other-integ-tests:
|
other-integ-tests:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/suite-integ-test-other.yml
|
uses: ./.github/workflows/suite-integ-test-other.yml
|
||||||
with:
|
with:
|
||||||
|
|||||||
57
.github/workflows/ci-ossf-scorecard.yml
vendored
Normal file
57
.github/workflows/ci-ossf-scorecard.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
name: CI-ossf-scorecard
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * 1'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analysis:
|
||||||
|
name: Scorecard analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
# Needed to upload the results to code-scanning dashboard.
|
||||||
|
security-events: write
|
||||||
|
# Needed to publish results and get a badge (see publish_results below).
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout code'
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
|
- name: 'Run analysis'
|
||||||
|
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||||
|
with:
|
||||||
|
results_file: results.sarif
|
||||||
|
results_format: sarif
|
||||||
|
|
||||||
|
# Public repositories:
|
||||||
|
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||||
|
# - Allows the repository to include the Scorecard badge.
|
||||||
|
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||||
|
# For private repositories:
|
||||||
|
# - `publish_results` will always be set to `false`, regardless
|
||||||
|
# of the value entered here.
|
||||||
|
publish_results: true
|
||||||
|
|
||||||
|
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||||
|
# format to the repository Actions tab.
|
||||||
|
- name: 'Upload artifact'
|
||||||
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||||
|
with:
|
||||||
|
name: SARIF file
|
||||||
|
path: results.sarif
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
|
- name: 'Upload to code-scanning'
|
||||||
|
uses: github/codeql-action/upload-sarif@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4
|
||||||
|
with:
|
||||||
|
sarif_file: results.sarif
|
||||||
16
.github/workflows/ci-update-dist.yml
vendored
16
.github/workflows/ci-update-dist.yml
vendored
@@ -10,19 +10,24 @@ on:
|
|||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-dist:
|
update-dist:
|
||||||
|
# Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch
|
||||||
|
# it would erroneously update `dist` on their branch (and the pull request)
|
||||||
|
if: github.repository == 'gradle/actions'
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -43,10 +48,7 @@ jobs:
|
|||||||
# Important: The push event will not trigger any other workflows, see
|
# 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
|
# 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
|
- name: Commit & push changes
|
||||||
# Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch
|
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
|
||||||
# it would erroneously update `dist` on their branch (and the pull request)
|
|
||||||
if: github.repository == 'gradle/actions'
|
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
|
||||||
with:
|
with:
|
||||||
commit_message: '[bot] Update dist directory'
|
commit_message: '[bot] Update dist directory'
|
||||||
file_pattern: dist
|
file_pattern: dist
|
||||||
|
|||||||
17
.github/workflows/ci-validate-wrappers.yml
vendored
Normal file
17
.github/workflows/ci-validate-wrappers.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: CI-validate-wrappers
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validation:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- uses: gradle/actions/wrapper-validation@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
|
||||||
|
with:
|
||||||
|
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||||
28
.github/workflows/demo-job-summary.yml
vendored
28
.github/workflows/demo-job-summary.yml
vendored
@@ -3,12 +3,15 @@ name: Demo Job Summary, for Gradle builds
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-distribution:
|
build-distribution:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Build and upload distribution
|
- name: Build and upload distribution
|
||||||
uses: ./.github/actions/build-dist
|
uses: ./.github/actions/build-dist
|
||||||
|
|
||||||
@@ -17,7 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -59,7 +62,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -79,7 +82,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -94,3 +97,20 @@ jobs:
|
|||||||
- name: Run build
|
- name: Run build
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
run: ./gradlew assemble
|
run: ./gradlew assemble
|
||||||
|
|
||||||
|
cache-read-only:
|
||||||
|
needs: build-distribution
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- name: Initialize integ-test
|
||||||
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: ./setup-gradle
|
||||||
|
with:
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Build kotlin-dsl project
|
||||||
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
|
run: ./gradlew assemble
|
||||||
|
|||||||
16
.github/workflows/demo-pr-build-scan-comment.yml
vendored
16
.github/workflows/demo-pr-build-scan-comment.yml
vendored
@@ -4,23 +4,25 @@ on:
|
|||||||
types: [assigned, review_requested]
|
types: [assigned, review_requested]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-distribution:
|
build-distribution:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Build and upload distribution
|
- name: Build and upload distribution
|
||||||
uses: ./.github/actions/build-dist
|
uses: ./.github/actions/build-dist
|
||||||
|
|
||||||
successful-build-with-always-comment:
|
successful-build-with-always-comment:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -34,11 +36,13 @@ jobs:
|
|||||||
run: ./gradlew build --scan
|
run: ./gradlew build --scan
|
||||||
|
|
||||||
successful-build-with-comment-on-failure:
|
successful-build-with-comment-on-failure:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -52,11 +56,13 @@ jobs:
|
|||||||
run: ./gradlew build --scan
|
run: ./gradlew build --scan
|
||||||
|
|
||||||
failing-build-with-comment-on-failure:
|
failing-build-with-comment-on-failure:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-scan-publish:
|
build-scan-publish:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -27,15 +30,10 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 11
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -51,7 +49,7 @@ jobs:
|
|||||||
run: gradle help
|
run: gradle help
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
12
.github/workflows/integ-test-cache-cleanup.yml
vendored
12
.github/workflows/integ-test-cache-cleanup.yml
vendored
@@ -18,16 +18,20 @@ env:
|
|||||||
# Requires a fresh cache entry each run
|
# Requires a fresh cache entry each run
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cache-cleanup-full-build:
|
cache-cleanup-full-build:
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -43,13 +47,14 @@ jobs:
|
|||||||
cache-cleanup-assemble-build:
|
cache-cleanup-assemble-build:
|
||||||
needs: cache-cleanup-full-build
|
needs: cache-cleanup-full-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -65,13 +70,14 @@ jobs:
|
|||||||
cache-cleanup-check-clean-cache:
|
cache-cleanup-check-clean-cache:
|
||||||
needs: cache-cleanup-assemble-build
|
needs: cache-cleanup-assemble-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
24
.github/workflows/integ-test-caching-config.yml
vendored
24
.github/workflows/integ-test-caching-config.yml
vendored
@@ -17,16 +17,20 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
caching-config-seed-build:
|
caching-config-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -50,13 +54,14 @@ jobs:
|
|||||||
caching-config-verify-build:
|
caching-config-verify-build:
|
||||||
needs: caching-config-seed-build
|
needs: caching-config-seed-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -78,13 +83,14 @@ jobs:
|
|||||||
# Test that build scans are captured when caching is explicitly disabled
|
# Test that build scans are captured when caching is explicitly disabled
|
||||||
caching-config-cache-disabled:
|
caching-config-cache-disabled:
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -98,7 +104,7 @@ jobs:
|
|||||||
run: ./gradlew help
|
run: ./gradlew help
|
||||||
- name: Check Build Scan url is captured
|
- name: Check Build Scan url is captured
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@@ -108,7 +114,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest # This test only runs on Ubuntu
|
runs-on: ubuntu-latest # This test only runs on Ubuntu
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -122,7 +128,7 @@ jobs:
|
|||||||
run: ./gradlew help
|
run: ./gradlew help
|
||||||
- name: Check Build Scan url is captured
|
- name: Check Build Scan url is captured
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@@ -132,13 +138,14 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -155,13 +162,14 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
|
||||||
needs: caching-config-seed-write-only
|
needs: caching-config-seed-write-only
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -13,24 +13,20 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependency-graph-groovy-upload:
|
dependency-graph-groovy-upload:
|
||||||
strategy:
|
runs-on: "ubuntu-latest"
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -43,11 +39,13 @@ jobs:
|
|||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
|
||||||
dependency-graph-groovy-submit:
|
dependency-graph-groovy-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: [dependency-graph-groovy-upload]
|
needs: [dependency-graph-groovy-upload]
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -59,14 +57,12 @@ jobs:
|
|||||||
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload
|
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload
|
||||||
|
|
||||||
dependency-graph-kotlin-generate-and-submit:
|
dependency-graph-kotlin-generate-and-submit:
|
||||||
strategy:
|
permissions:
|
||||||
fail-fast: false
|
contents: write
|
||||||
matrix:
|
runs-on: "ubuntu-latest"
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -79,14 +75,12 @@ jobs:
|
|||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
|
|
||||||
dependency-graph-multiple-builds:
|
dependency-graph-multiple-builds:
|
||||||
strategy:
|
permissions:
|
||||||
fail-fast: false
|
contents: write
|
||||||
matrix:
|
runs-on: "ubuntu-latest"
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -124,10 +118,12 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-graph-config-cache:
|
dependency-graph-config-cache:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,15 @@ env:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-failures-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-failures-${{ inputs.cache-key-prefix }}
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependency-submission-failures-failing-build:
|
dependency-submission-failures-failing-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -52,7 +55,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -83,7 +86,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -13,24 +13,27 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-${{ inputs.cache-key-prefix }}
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependency-submission-groovy-generate-and-upload:
|
dependency-submission-groovy-generate-and-upload:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -44,15 +47,18 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
|
||||||
|
|
||||||
dependency-submission-groovy-restore-cache:
|
dependency-submission-groovy-restore-cache:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: [dependency-submission-groovy-generate-and-upload]
|
needs: [dependency-submission-groovy-generate-and-upload]
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -65,15 +71,18 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
|
||||||
|
|
||||||
dependency-submission-groovy-download-and-submit:
|
dependency-submission-groovy-download-and-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: [dependency-submission-groovy-generate-and-upload]
|
needs: [dependency-submission-groovy-generate-and-upload]
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -85,14 +94,17 @@ jobs:
|
|||||||
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-generate-and-upload-${{ matrix.os }}
|
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-generate-and-upload-${{ matrix.os }}
|
||||||
|
|
||||||
dependency-submission-kotlin-generate-and-submit:
|
dependency-submission-kotlin-generate-and-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -102,14 +114,17 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/kotlin-dsl
|
build-root-directory: .github/workflow-samples/kotlin-dsl
|
||||||
|
|
||||||
dependency-submission-multiple-builds:
|
dependency-submission-multiple-builds:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -147,14 +162,17 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-submission-multiple-builds-upload:
|
dependency-submission-multiple-builds-upload:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -170,10 +188,12 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
|
||||||
dependency-submission-config-cache:
|
dependency-submission-config-cache:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -205,6 +225,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-submission-gradle-versions:
|
dependency-submission-gradle-versions:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -218,7 +240,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -229,10 +251,12 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
|
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
|
||||||
|
|
||||||
dependency-submission-with-setup-gradle:
|
dependency-submission-with-setup-gradle:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -264,10 +288,12 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-submission-with-includes-and-excludes:
|
dependency-submission-with-includes-and-excludes:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -298,14 +324,17 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
dependency-submission-custom-report-dir-submit:
|
dependency-submission-custom-report-dir-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -332,10 +361,12 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-submission-custom-report-dir-upload:
|
dependency-submission-custom-report-dir-upload:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -348,11 +379,13 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
|
||||||
custom-report-dir-download-and-submit:
|
custom-report-dir-download-and-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: [dependency-submission-custom-report-dir-upload]
|
needs: [dependency-submission-custom-report-dir-upload]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Test that pre-installed runner JDKs are detected
|
# Test that pre-installed runner JDKs are detected
|
||||||
detect-toolchains-pre-installed-jdks:
|
detect-toolchains-pre-installed-jdks:
|
||||||
@@ -27,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -57,17 +60,17 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java 20
|
- name: Setup Java 20
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 20
|
java-version: 20
|
||||||
- name: Setup Java 16
|
- name: Setup Java 16
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 16
|
java-version: 16
|
||||||
|
|||||||
@@ -20,38 +20,36 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
inject-develocity:
|
inject-develocity:
|
||||||
env:
|
env:
|
||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_URL: https://ge.solutions-team.gradle.com
|
DEVELOCITY_URL: https://ge.solutions-team.gradle.com
|
||||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0'
|
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
|
||||||
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [3.16.2, 3.17.6]
|
plugin-version: [3.16.2, 3.18.2]
|
||||||
include:
|
include:
|
||||||
- plugin-version: 3.16.2
|
- plugin-version: 3.16.2
|
||||||
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
||||||
- plugin-version: 3.17.6
|
- plugin-version: 3.18.2
|
||||||
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 11
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -64,7 +62,7 @@ jobs:
|
|||||||
run: gradle help
|
run: gradle help
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@@ -78,24 +76,19 @@ jobs:
|
|||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
||||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0'
|
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [3.16.2, 3.17.6]
|
plugin-version: [3.16.2, 3.18.2]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 8
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -114,7 +107,7 @@ jobs:
|
|||||||
run: "[ ${#GRADLE_ENTERPRISE_ACCESS_KEY} -gt 500 ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY does not look like a short lived token'; exit 1)"
|
run: "[ ${#GRADLE_ENTERPRISE_ACCESS_KEY} -gt 500 ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY does not look like a short lived token'; exit 1)"
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@@ -124,7 +117,7 @@ jobs:
|
|||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_URL: 'https://localhost:3333/'
|
DEVELOCITY_URL: 'https://localhost:3333/'
|
||||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0'
|
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
|
||||||
# Access key also set as an env var, we want to check it does not leak
|
# Access key also set as an env var, we want to check it does not leak
|
||||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||||
@@ -133,19 +126,14 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
|
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [ 3.16.2, 3.17.6 ]
|
plugin-version: [ 3.16.2, 3.18.2 ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 8
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -169,18 +157,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
|
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [ 3.16.2, 3.17.6 ]
|
plugin-version: [ 3.16.2, 3.18.2 ]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 8
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -196,7 +179,7 @@ jobs:
|
|||||||
run: gradle help
|
run: gradle help
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
@@ -18,18 +18,22 @@ env:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Tests for executing with different Gradle versions.
|
# Tests for executing with different Gradle versions.
|
||||||
# Each build verifies that it is executed with the expected Gradle version.
|
# Each build verifies that it is executed with the expected Gradle version.
|
||||||
provision-gradle:
|
provision-gradle:
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -65,7 +69,7 @@ jobs:
|
|||||||
run: gradle help
|
run: gradle help
|
||||||
- name: Check current version output parameter
|
- name: Check current version output parameter
|
||||||
if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '8.') }}
|
if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '8.') }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"')
|
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"')
|
||||||
@@ -74,7 +78,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: [8.9, 8.8, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1] # 8.8 is the latest installed on windows runners
|
gradle: ["8.11", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
include:
|
include:
|
||||||
- java-version: 11
|
- java-version: 11
|
||||||
@@ -91,12 +95,12 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
@@ -108,7 +112,7 @@ jobs:
|
|||||||
gradle-version: ${{ matrix.gradle }}
|
gradle-version: ${{ matrix.gradle }}
|
||||||
- name: Check output parameter
|
- name: Check output parameter
|
||||||
if: ${{ steps.setup-gradle.outputs.gradle-version != matrix.gradle }}
|
if: ${{ steps.setup-gradle.outputs.gradle-version != matrix.gradle }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.setup-gradle.outputs.gradle-version }}"')
|
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.setup-gradle.outputs.gradle-version }}"')
|
||||||
@@ -118,7 +122,7 @@ jobs:
|
|||||||
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
|
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
@@ -20,33 +20,31 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-cc-seed-build-groovy:
|
restore-cc-seed-build-groovy:
|
||||||
env:
|
env:
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
cache-write-only: true # Ensure we start with a clean cache entry
|
cache-write-only: true # Ensure we start with a clean cache entry
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Groovy build with configuration-cache enabled
|
- name: Groovy build with configuration-cache enabled
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
run: gradle test --configuration-cache
|
run: gradle test --configuration-cache
|
||||||
@@ -57,28 +55,23 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
|
||||||
needs: restore-cc-seed-build-groovy
|
needs: restore-cc-seed-build-groovy
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false
|
cache-read-only: false
|
||||||
cache-cleanup: on-success
|
cache-cleanup: on-success
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Groovy build with configuration-cache enabled
|
- name: Groovy build with configuration-cache enabled
|
||||||
id: execute
|
id: execute
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
@@ -98,27 +91,22 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
|
||||||
needs: restore-cc-verify-build-groovy
|
needs: restore-cc-verify-build-groovy
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Groovy build with configuration-cache enabled
|
- name: Groovy build with configuration-cache enabled
|
||||||
id: execute
|
id: execute
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
@@ -138,21 +126,17 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_x
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_x
|
||||||
needs: restore-cc-seed-build-groovy
|
needs: restore-cc-seed-build-groovy
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle with no extracted cache entries restored
|
- name: Setup Gradle with no extracted cache entries restored
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
env:
|
env:
|
||||||
@@ -160,7 +144,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Check execute Gradle build with configuration cache enabled (but not restored)
|
- name: Check execute Gradle build with configuration cache enabled (but not restored)
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
run: gradle test --configuration-cache
|
run: gradle test --configuration-cache
|
||||||
@@ -169,28 +152,23 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
cache-write-only: true # Ensure we start with a clean cache entry
|
cache-write-only: true # Ensure we start with a clean cache entry
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Execute 'help' with configuration-cache enabled
|
- name: Execute 'help' with configuration-cache enabled
|
||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
run: gradle help --configuration-cache
|
run: gradle help --configuration-cache
|
||||||
@@ -201,27 +179,22 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
|
||||||
needs: restore-cc-seed-build-kotlin
|
needs: restore-cc-seed-build-kotlin
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Execute 'test' with configuration-cache enabled
|
- name: Execute 'test' with configuration-cache enabled
|
||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
run: gradle test --configuration-cache
|
run: gradle test --configuration-cache
|
||||||
@@ -233,27 +206,22 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
|
||||||
needs: restore-cc-modify-build-kotlin
|
needs: restore-cc-modify-build-kotlin
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Execute 'test' again with configuration-cache enabled
|
- name: Execute 'test' again with configuration-cache enabled
|
||||||
id: execute
|
id: execute
|
||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
|
|||||||
@@ -14,13 +14,16 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-containerized-seed-build:
|
restore-containerized-seed-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: fedora:latest
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@ jobs:
|
|||||||
container: fedora:latest
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -14,12 +14,15 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-custom-gradle-home-seed-build:
|
restore-custom-gradle-home-seed-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -41,7 +44,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -63,7 +66,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -18,16 +18,20 @@ env:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-gradle-home-seed-build:
|
restore-gradle-home-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -43,13 +47,14 @@ jobs:
|
|||||||
restore-gradle-home-dependencies-cache:
|
restore-gradle-home-dependencies-cache:
|
||||||
needs: restore-gradle-home-seed-build
|
needs: restore-gradle-home-seed-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -65,13 +70,14 @@ jobs:
|
|||||||
restore-gradle-home-build-cache:
|
restore-gradle-home-build-cache:
|
||||||
needs: restore-gradle-home-seed-build
|
needs: restore-gradle-home-seed-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -87,13 +93,14 @@ jobs:
|
|||||||
restore-gradle-home-no-extracted-cache-entries-restored:
|
restore-gradle-home-no-extracted-cache-entries-restored:
|
||||||
needs: restore-gradle-home-seed-build
|
needs: restore-gradle-home-seed-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -111,13 +118,14 @@ jobs:
|
|||||||
restore-gradle-home-pre-existing-gradle-home:
|
restore-gradle-home-pre-existing-gradle-home:
|
||||||
needs: restore-gradle-home-seed-build
|
needs: restore-gradle-home-seed-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,20 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-java-toolchain-seed-build:
|
restore-java-toolchain-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -42,13 +46,14 @@ jobs:
|
|||||||
restore-java-toolchain-verify-build:
|
restore-java-toolchain-verify-build:
|
||||||
needs: restore-java-toolchain-seed-build
|
needs: restore-java-toolchain-seed-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,20 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sample-gradle-plugin-seed-build:
|
sample-gradle-plugin-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -41,13 +45,14 @@ jobs:
|
|||||||
sample-gradle-plugin-verify-build:
|
sample-gradle-plugin-verify-build:
|
||||||
needs: sample-gradle-plugin-seed-build
|
needs: sample-gradle-plugin-seed-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,20 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sample-kotlin-dsl-seed-build:
|
sample-kotlin-dsl-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -41,13 +45,14 @@ jobs:
|
|||||||
sample-kotlin-dsl-verify-build:
|
sample-kotlin-dsl-verify-build:
|
||||||
needs: sample-kotlin-dsl-seed-build
|
needs: sample-kotlin-dsl-seed-build
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wrapper-validation-setup-gradle:
|
wrapper-validation-setup-gradle:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -22,7 +25,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -45,7 +48,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -74,7 +77,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -107,7 +110,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -137,7 +140,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4 # Checkout the repository with no wrappers
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Checkout the repository with no wrappers
|
||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
.github/actions
|
.github/actions
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cache-cleanup:
|
cache-cleanup:
|
||||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||||
|
|||||||
3
.github/workflows/suite-integ-test-other.yml
vendored
3
.github/workflows/suite-integ-test-other.yml
vendored
@@ -10,6 +10,9 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-scan-publish:
|
build-scan-publish:
|
||||||
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
||||||
|
|||||||
14
.github/workflows/update-checksums-file.yml
vendored
14
.github/workflows/update-checksums-file.yml
vendored
@@ -7,20 +7,22 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-checksums:
|
update-checksums:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
name: Update checksums
|
name: Update checksums
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -28,7 +30,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
npm install typed-rest-client@1.8.11 --no-save
|
npm clean-install typed-rest-client@1.8.11 --no-save
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
|
|
||||||
- name: Update checksums file
|
- name: Update checksums file
|
||||||
@@ -37,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
# If there are no changes, this action will not create a pull request
|
# If there are no changes, this action will not create a pull request
|
||||||
- name: Create or update pull request
|
- name: Create or update pull request
|
||||||
uses: peter-evans/create-pull-request@v6
|
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
|
||||||
with:
|
with:
|
||||||
branch: bot/wrapper-checksums-update
|
branch: bot/wrapper-checksums-update
|
||||||
commit-message: Update known wrapper checksums
|
commit-message: Update known wrapper checksums
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
The `build` script in the project root provides a convenient way to perform many local build tasks:
|
The `build` script in the project root provides a convenient way to perform many local build tasks:
|
||||||
1. `./build` will lint and compile typescript sources
|
1. `./build` will lint and compile typescript sources
|
||||||
2. `./build all` will lint and compile typescript and run unit tests
|
2. `./build all` will lint and compile typescript and run unit tests
|
||||||
3. `./build init-scripts` will run the init-script integration tests
|
3. `./build install` will install npm packages followed by lint and compile
|
||||||
4. `./build act <act-commands>` will run `act` after building local changes (see below)
|
4. `./build init-scripts` will run the init-script integration tests
|
||||||
|
5. `./build act <act-commands>` will run `act` after building local changes (see below)
|
||||||
|
|
||||||
## Using `act` to run integ-test workflows locally
|
## Using `act` to run integ-test workflows locally
|
||||||
|
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -1,5 +1,7 @@
|
|||||||
# GitHub Actions for Gradle builds
|
# GitHub Actions for Gradle builds
|
||||||
|
|
||||||
|
[](https://scorecard.dev/viewer/?uri=github.com/gradle/actions)
|
||||||
|
|
||||||
This repository contains a set of GitHub Actions that are useful for building Gradle projects on GitHub.
|
This repository contains a set of GitHub Actions that are useful for building Gradle projects on GitHub.
|
||||||
|
|
||||||
## The `setup-gradle` action
|
## The `setup-gradle` action
|
||||||
@@ -30,7 +32,7 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
@@ -68,7 +70,7 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
|
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
|
||||||
@@ -79,6 +81,9 @@ The `wrapper-validation` action validates the checksums of _all_ [Gradle Wrapper
|
|||||||
|
|
||||||
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
|
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
|
||||||
|
|
||||||
|
Starting with v4 the `setup-gradle` action will [perform wrapper validation](docs/setup-gradle.md#gradle-wrapper-validation) on each execution.
|
||||||
|
If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
|
||||||
|
|
||||||
### Example workflow
|
### Example workflow
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -94,7 +99,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: gradle/actions/wrapper-validation@v3
|
- uses: gradle/actions/wrapper-validation@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.
|
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.
|
||||||
|
|||||||
49
RELEASING.md
49
RELEASING.md
@@ -5,58 +5,27 @@
|
|||||||
- Check that https://github.com/gradle/actions/actions is green for all workflows for the main branch.
|
- Check that https://github.com/gradle/actions/actions is green for all workflows for the main branch.
|
||||||
- This should include any workflows triggered by `[bot] Update dist directory`
|
- This should include any workflows triggered by `[bot] Update dist directory`
|
||||||
- Decide on the version number to use for the release. The action releases should follow semantic versioning.
|
- Decide on the version number to use for the release. The action releases should follow semantic versioning.
|
||||||
- By default, a patch release is assumed (eg. `3.0.0` → `3.0.1`)
|
- By default, a patch release is assumed (eg. `4.0.0` → `4.0.1`)
|
||||||
- If new features have been added, bump the minor version (eg `3.1.1` → `3.2.0`)
|
- 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 `3.1.1` → `4.0.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.
|
- 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 gradle/actions
|
## Release gradle/actions
|
||||||
- Create a tag for the release. The tag should have the format `v3.1.0`
|
- Create a tag for the release. The tag should have the format `v4.1.0`
|
||||||
- From CLI: `git tag v3.1.0 && git push --tags`
|
- From CLI: `git tag v4.1.0 && git push --tags`
|
||||||
- Go to https://github.com/gradle/actions/releases and "Draft new release"
|
- Go to https://github.com/gradle/actions/releases and "Draft new release"
|
||||||
- Use the newly created tag 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
|
- 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
|
- Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0
|
||||||
- Publish the release.
|
- Publish the release.
|
||||||
- Force push the `v3` 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.
|
- Force push the `v4` 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 -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
|
- From CLI: `git tag -f -a -m "v4.0.0" v4 v4.0.0 && git push -f --tags`
|
||||||
- Note that we set the commit message for the tag to the newly released version.
|
- Note that we set the commit message for the tag to the newly released version.
|
||||||
|
|
||||||
## Release gradle/gradle-build-action
|
|
||||||
|
|
||||||
During the 3.x release series, we will continue to publish parallel releases of `gradle/gradle-build-action`. These releases will simply delegate to `gradle/actions/setup-gradle` with the same version.
|
|
||||||
|
|
||||||
- Update the [gradle-build-action action.yml](https://github.com/gradle/gradle-build-action/blob/main/action.yml#L162) file to point to the newly released version of `gradle/actions/setup-gradle`.
|
|
||||||
- Ensure that any parameters that have been added to the setup-gradle action are added to the gradle-build-action definition, and that these are passed on to setup-gradle.
|
|
||||||
- Create and push a tag for the release.
|
|
||||||
- From CLI: `git tag v3.1.0 && git push --tags`
|
|
||||||
- Go to https://github.com/gradle/gradle-build-action/releases and "Draft new release"
|
|
||||||
- Use the newly created tag and copy the tag name exactly as the release title.
|
|
||||||
- In the release notes, point users to the gradle/actions release. Include a header informing users to switch to `gradle/actions/setup-gradle`.
|
|
||||||
- Publish the release.
|
|
||||||
- Force push the `v3` tag (or current major version) to point to the new release.
|
|
||||||
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
|
|
||||||
|
|
||||||
## Release gradle/wrapper-validation-action
|
|
||||||
|
|
||||||
During the 3.x release series, we will continue to publish parallel releases of `gradle/wrapper-validation-action`. These releases will simply delegate to `gradle/actions/wrapper-validation` with the same version.
|
|
||||||
|
|
||||||
- Update the [wrapper-validation-action action.yml](https://github.com/gradle/wrapper-validation-action/blob/main/action.yml#L162) file to point to the newly released version of `gradle/actions/wrapper-validation`.
|
|
||||||
- Ensure that any parameters that have been added to the `wrapper-validation` action (if any) are added to the action definition, and that these are passed on to setup-gradle.
|
|
||||||
- Create and push a tag for the release.
|
|
||||||
- From CLI: `git tag v3.1.0 && git push --tags`
|
|
||||||
- Go to https://github.com/gradle/wrapper-validation-action/releases and "Draft new release"
|
|
||||||
- Use the newly created tag and copy the tag name exactly as the release title.
|
|
||||||
- In the release notes, point users to the gradle/actions release. Include a header informing users to switch to `gradle/actions/wrapper-validation`.
|
|
||||||
- Publish the release.
|
|
||||||
- Force push the `v3` tag (or current major version) to point to the new release.
|
|
||||||
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
|
|
||||||
|
|
||||||
## Post release steps
|
## Post release steps
|
||||||
|
|
||||||
Submit PRs to update the GitHub starter workflow. Starter workflows contain content that should reference the Git hash of the current gradle/actions release:
|
Submit PRs to update the GitHub starter workflow. Starter workflows contain content that should reference the Git hash of the current gradle/actions release:
|
||||||
https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v2.1.4 update PR](https://github.com/actions/starter-workflows/pull/1489) for an example.
|
https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v4.0.0 update PR](https://github.com/actions/starter-workflows/pull/2468) for an example.
|
||||||
|
|
||||||
Submit PRs to update the GitHub documentation. The documentation contains content that should reference the Git hash of the current gradle/actions release:
|
Submit PRs to update the GitHub documentation. The documentation contains content that should reference the Git hash of the current gradle/actions release:
|
||||||
https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v2.1.4 update PR](https://github.com/github/docs/pull/16392) for an example.
|
https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v4.0.0 update PR](https://github.com/github/docs/pull/34239) for an example.
|
||||||
|
|
||||||
|
|||||||
17
build
17
build
@@ -4,12 +4,10 @@ cd sources
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
all)
|
all)
|
||||||
npm clean-install
|
|
||||||
npm run all
|
npm run all
|
||||||
;;
|
;;
|
||||||
act)
|
act)
|
||||||
# Build and copy outputs to the dist directory
|
# Build and copy outputs to the dist directory
|
||||||
npm install
|
|
||||||
npm run build
|
npm run build
|
||||||
cd ..
|
cd ..
|
||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
@@ -18,18 +16,21 @@ case "$1" in
|
|||||||
# Revert the changes to the dist directory
|
# Revert the changes to the dist directory
|
||||||
git checkout -- dist
|
git checkout -- dist
|
||||||
;;
|
;;
|
||||||
init-scripts)
|
|
||||||
cd test/init-scripts
|
|
||||||
./gradlew check
|
|
||||||
;;
|
|
||||||
dist)
|
dist)
|
||||||
npm install
|
npm clean-install
|
||||||
npm run build
|
npm run build
|
||||||
cd ..
|
cd ..
|
||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
;;
|
;;
|
||||||
|
init-scripts)
|
||||||
|
cd test/init-scripts
|
||||||
|
./gradlew check
|
||||||
|
;;
|
||||||
|
install)
|
||||||
|
npm clean-install
|
||||||
|
npm run build
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
npm install
|
|
||||||
npm run build
|
npm run build
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.
|
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ inputs:
|
|||||||
cache-cleanup:
|
cache-cleanup:
|
||||||
description: |
|
description: |
|
||||||
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
|
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
|
||||||
By default, no cleanup is performed. It can be configured to run every time, or only when all Gradle builds succeed for the Job.
|
By default ('on-success'), cleanup is performed when all Gradle builds succeed for the Job.
|
||||||
|
This behaviour can be disabled ('never'), or configured to always run irrespective of the build outcome ('always').
|
||||||
Valid values are 'never', 'on-success' and 'always'.
|
Valid values are 'never', 'on-success' and 'always'.
|
||||||
required: false
|
required: false
|
||||||
default: 'on-success'
|
default: 'on-success'
|
||||||
|
|||||||
78425
dist/dependency-submission/main/index.js
vendored
78425
dist/dependency-submission/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dependency-submission/main/index.js.map
vendored
2
dist/dependency-submission/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
44788
dist/dependency-submission/post/index.js
vendored
44788
dist/dependency-submission/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dependency-submission/post/index.js.map
vendored
2
dist/dependency-submission/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
78364
dist/setup-gradle/main/index.js
vendored
78364
dist/setup-gradle/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/setup-gradle/main/index.js.map
vendored
2
dist/setup-gradle/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
78362
dist/setup-gradle/post/index.js
vendored
78362
dist/setup-gradle/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/setup-gradle/post/index.js.map
vendored
2
dist/setup-gradle/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
42858
dist/wrapper-validation/main/index.js
vendored
42858
dist/wrapper-validation/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/wrapper-validation/main/index.js.map
vendored
2
dist/wrapper-validation/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -43,7 +43,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
### Gradle execution
|
### Gradle execution
|
||||||
@@ -68,7 +68,7 @@ Three input parameters are required, one to enable publishing and two more to ac
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
with:
|
with:
|
||||||
build-scan-publish: true
|
build-scan-publish: true
|
||||||
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
|
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
|
||||||
@@ -83,7 +83,7 @@ In some cases, the default action configuration will not be sufficient, and addi
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate and save dependency graph
|
- name: Generate and save dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
with:
|
with:
|
||||||
# Use a particular Gradle version instead of the configured wrapper.
|
# Use a particular Gradle version instead of the configured wrapper.
|
||||||
gradle-version: 8.6
|
gradle-version: 8.6
|
||||||
@@ -273,7 +273,7 @@ For example, if you want to exclude dependencies resolved by the `buildSrc` proj
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
with:
|
with:
|
||||||
# Exclude all dependencies that originate solely in the 'buildSrc' project
|
# Exclude all dependencies that originate solely in the 'buildSrc' project
|
||||||
dependency-graph-exclude-projets: ':buildSrc'
|
dependency-graph-exclude-projets: ':buildSrc'
|
||||||
@@ -317,10 +317,10 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
|
|
||||||
- name: Perform dependency review
|
- name: Perform dependency review
|
||||||
uses: actions/dependency-review-action@v3
|
uses: actions/dependency-review-action@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage with pull requests from public forked repositories
|
## Usage with pull requests from public forked repositories
|
||||||
@@ -353,7 +353,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Generate and save dependency graph
|
- name: Generate and save dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-upload
|
dependency-graph: generate-and-upload
|
||||||
```
|
```
|
||||||
@@ -376,7 +376,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download and submit dependency graph
|
- name: Download and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v3
|
uses: gradle/actions/dependency-submission@v4
|
||||||
with:
|
with:
|
||||||
dependency-graph: download-and-submit # Download saved dependency-graph and submit
|
dependency-graph: download-and-submit # Download saved dependency-graph and submit
|
||||||
```
|
```
|
||||||
@@ -403,7 +403,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Dependency Review'
|
- name: 'Dependency Review'
|
||||||
uses: actions/dependency-review-action@v3
|
uses: actions/dependency-review-action@v4
|
||||||
with:
|
with:
|
||||||
retry-on-snapshot-warnings: true
|
retry-on-snapshot-warnings: true
|
||||||
retry-on-snapshot-warnings-timeout: 600
|
retry-on-snapshot-warnings-timeout: 600
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ To convert your workflows, simply replace:
|
|||||||
```
|
```
|
||||||
with
|
with
|
||||||
```
|
```
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
|
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
|
||||||
@@ -40,7 +40,7 @@ To convert your workflows, simply replace:
|
|||||||
```
|
```
|
||||||
with
|
with
|
||||||
```
|
```
|
||||||
uses: gradle/actions/wrapper-validation@v3
|
uses: gradle/actions/wrapper-validation@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using the action to execute Gradle via the `arguments` parameter is deprecated
|
## Using the action to execute Gradle via the `arguments` parameter is deprecated
|
||||||
@@ -82,7 +82,7 @@ The exact syntax depends on whether or not your project is configured with the [
|
|||||||
|
|
||||||
```
|
```
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
- name: Assemble the project
|
- name: Assemble the project
|
||||||
run: ./gradlew assemble
|
run: ./gradlew assemble
|
||||||
@@ -99,9 +99,9 @@ The exact syntax depends on whether or not your project is configured with the [
|
|||||||
|
|
||||||
```
|
```
|
||||||
- name: Setup Gradle for a non-wrapper project
|
- name: Setup Gradle for a non-wrapper project
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
gradle-version: 8.9
|
gradle-version: "8.11"
|
||||||
|
|
||||||
- name: Assemble the project
|
- name: Assemble the project
|
||||||
run: gradle assemble
|
run: gradle assemble
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
- name: Execute Gradle build
|
- name: Execute Gradle build
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
@@ -57,11 +57,11 @@ The `setup-gradle` action can download and install a specified Gradle version, a
|
|||||||
Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid having to download them again later.
|
Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid having to download them again later.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle 8.5
|
- name: Setup Gradle 8.10
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
gradle-version: 8.5
|
gradle-version: "8.10" # Quotes required to prevent YAML converting to number
|
||||||
- name: Build with Gradle 8.5
|
- name: Build with Gradle 8.10
|
||||||
run: gradle build
|
run: gradle build
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- uses: gradle/actions/setup-gradle@v3
|
- uses: gradle/actions/setup-gradle@v4
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
with:
|
with:
|
||||||
gradle-version: release-candidate
|
gradle-version: release-candidate
|
||||||
@@ -196,6 +196,9 @@ When Gradle is executed with the [configuration-cache](https://docs.gradle.org/c
|
|||||||
in the project directory, at `<project-dir>/.gradle/configuration-cache`. Due to the way the configuration-cache works, [this file may contain stored credentials and other
|
in the project directory, at `<project-dir>/.gradle/configuration-cache`. Due to the way the configuration-cache works, [this file may contain stored credentials and other
|
||||||
secrets](https://docs.gradle.org/release-nightly/userguide/configuration_cache.html#config_cache:secrets), and this data needs to be encrypted to be safely stored in the GitHub Actions cache.
|
secrets](https://docs.gradle.org/release-nightly/userguide/configuration_cache.html#config_cache:secrets), and this data needs to be encrypted to be safely stored in the GitHub Actions cache.
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> To avoid potentially leaking secrets in the configuration-cache entry, the action will only save or restore configuration-cache data if the `cache-encryption-key` parameter is set.
|
||||||
|
|
||||||
To benefit from configuration caching in your GitHub Actions workflow, you must:
|
To benefit from configuration caching in your GitHub Actions workflow, you must:
|
||||||
- Execute your build with Gradle 8.6 or newer. This can be achieved directly or via the Gradle Wrapper.
|
- Execute your build with Gradle 8.6 or newer. This can be achieved directly or via the Gradle Wrapper.
|
||||||
- Enable the configuration cache for your build.
|
- Enable the configuration cache for your build.
|
||||||
@@ -213,14 +216,17 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- uses: gradle/actions/setup-gradle@v3
|
- uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
gradle-version: 8.6
|
gradle-version: 8.6
|
||||||
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
|
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
|
||||||
- run: gradle build --configuration-cache
|
- run: gradle build --configuration-cache
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!IMPORTANT]
|
Even with everything correctly configured, you may find that the configuration-cache entry is not reused in your workflow.
|
||||||
|
This is often due to a known issue: [Included builds containing build logic prevent configuration-cache reuse](https://github.com/gradle/actions/issues/21). Refer to the issue for more details.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
> The configuration cache cannot be saved or restored in workflows triggered by a pull requests from a repository fork.
|
> The configuration cache cannot be saved or restored in workflows triggered by a pull requests from a repository fork.
|
||||||
> This is because [GitHub secrets are not passed to workflows triggered by PRs from forks](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow).
|
> This is because [GitHub secrets are not passed to workflows triggered by PRs from forks](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow).
|
||||||
> This prevents a malicious PR from reading the configuration-cache data, which may encode secrets read by Gradle.
|
> This prevents a malicious PR from reading the configuration-cache data, which may encode secrets read by Gradle.
|
||||||
@@ -455,7 +461,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
add-job-summary-as-pr-comment: on-failure # Valid values are 'never' (default), 'always', and 'on-failure'
|
add-job-summary-as-pr-comment: on-failure # Valid values are 'never' (default), 'always', and 'on-failure'
|
||||||
|
|
||||||
@@ -492,17 +498,17 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
- name: Run build with Gradle wrapper
|
- name: Run build with Gradle wrapper
|
||||||
run: ./gradlew build --scan
|
run: ./gradlew build --scan
|
||||||
|
|
||||||
- name: Upload build reports
|
- name: Upload build reports
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: build-reports
|
name: build-reports
|
||||||
path: build/reports/
|
path: **/build/reports/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Use of custom init-scripts in Gradle User Home
|
### Use of custom init-scripts in Gradle User Home
|
||||||
@@ -523,7 +529,7 @@ If you do not want wrapper-validation to occur automatically, you can disable it
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
validate-wrappers: false
|
validate-wrappers: false
|
||||||
```
|
```
|
||||||
@@ -535,7 +541,7 @@ These are not allowed by default.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
validate-wrappers: true
|
validate-wrappers: true
|
||||||
allow-snapshot-wrappers: true
|
allow-snapshot-wrappers: true
|
||||||
@@ -600,7 +606,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle to generate and submit dependency graphs
|
- name: Setup Gradle to generate and submit dependency graphs
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
|
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
|
||||||
@@ -627,7 +633,7 @@ graph cannot be generated or submitted. You can enable this behavior with the `d
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted
|
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted
|
||||||
- uses: gradle/actions/setup-gradle@v3
|
- uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
dependency-graph-continue-on-failure: false
|
dependency-graph-continue-on-failure: false
|
||||||
@@ -652,7 +658,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle to generate and submit dependency graphs
|
- name: Setup Gradle to generate and submit dependency graphs
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
|
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
|
||||||
@@ -682,7 +688,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle to generate and submit dependency graphs
|
- name: Setup Gradle to generate and submit dependency graphs
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
- name: Build the app, generating a graph of dependencies required
|
- name: Build the app, generating a graph of dependencies required
|
||||||
@@ -718,20 +724,112 @@ To reduce storage costs for these artifacts, you can set the `artifact-retention
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate dependency graph, but only retain artifact for one day
|
- name: Generate dependency graph, but only retain artifact for one day
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate
|
dependency-graph: generate
|
||||||
artifact-retention-days: 1
|
artifact-retention-days: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
# Develocity plugin injection
|
# Develocity Build Scan® integration
|
||||||
|
|
||||||
The `setup-gradle` action provides support for injecting and configuring the Develocity Gradle plugin into any Gradle build, without any modification to the project sources.
|
Publishing a Develocity Build Scan can be very helpful for Gradle builds run on GitHub Actions. Each Build Scan provides a
|
||||||
This is achieved via an init-script installed into Gradle User Home, which is enabled and parameterized via environment variables.
|
detailed report of the execution of the build, including which tasks were executed and the results of any test execution.
|
||||||
|
|
||||||
|
The `setup-gradle` plugin provides a number of features to enable and enhance publishing Build Scans® to a Develocity instance.
|
||||||
|
|
||||||
|
## Publishing to scans.gradle.com
|
||||||
|
|
||||||
|
If you don't have a a private Develocity instance, you can easily publish Build Scans to the
|
||||||
|
free, public Develocity instance (https://scans.gradle.com).
|
||||||
|
|
||||||
|
To publish to https://scans.gradle.com, you must specify in your workflow that you accept the [Gradle Terms of Use](https://gradle.com/help/legal-terms-of-use).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Setup Gradle to publish build scans
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
with:
|
||||||
|
build-scan-publish: true
|
||||||
|
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
|
||||||
|
build-scan-terms-of-use-agree: "yes"
|
||||||
|
|
||||||
|
- name: Run a Gradle build - a build scan will be published automatically
|
||||||
|
run: ./gradlew build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Managing Develocity access keys
|
||||||
|
|
||||||
|
Develocity access keys are long-lived, creating risks if they are leaked. To mitigate this risk this,
|
||||||
|
the `setup-gradle` action can automatically attempt to obtain a [short-lived access token](https://docs.gradle.com/develocity/gradle-plugin/current/#short_lived_access_tokens)
|
||||||
|
to use when authenticating with Develocity.
|
||||||
|
The short-lived access token will then be used wherever a Develocity access key is required.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
with:
|
||||||
|
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
|
||||||
|
|
||||||
|
# Subsequent steps will automatically use a short-lived access token to authenticate with Develocity
|
||||||
|
- name: Run a Gradle build that is configured to publish to Develocity.
|
||||||
|
run: ./gradlew build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Increasing the expiry time for Develocity access tokens
|
||||||
|
|
||||||
|
By default, a short-lived Develocity access token will be valid for 2 hours from the time it is generated. If your workflows take longer than
|
||||||
|
2 hours to complete, you may see failure to publish Build Scans due to access token expiry.
|
||||||
|
|
||||||
|
To avoid this, use the `develocity-token-expiry` parameter to specify a different token expiry in hours.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
with:
|
||||||
|
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
||||||
|
develocity-token-expiry: 8 # The number of hours that the access token should remain valid (max 24).
|
||||||
|
```
|
||||||
|
|
||||||
|
### Develocity access key supplied as environment variable
|
||||||
|
|
||||||
|
The preferred mechanism is to supply the long-lived Develocity access key directly to `setup-gradle` via
|
||||||
|
the `develocity-access-key` input variable. However, the action will also detect an access key configured as an environment variable,
|
||||||
|
such as `DEVELOCITY_ACCESS_KEY` or `GRADLE_ENTERPRISE_ACCESS_KEY`. In this case, the environment variable value will be replaced by
|
||||||
|
a short-lived access token, thus hiding the long-lived access key from subsequent steps.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
env:
|
||||||
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-with-gradle:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
|
# The build will automatically use a short-lived access token to authenticate with Develocity
|
||||||
|
- name: Run a Gradle build that is configured to publish to Develocity.
|
||||||
|
run: ./gradlew build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Failure to obtain a short-lived access token
|
||||||
|
|
||||||
|
If a short-lived token cannot be retrieved (for example, if the Develocity server version is lower than `2024.1`):
|
||||||
|
- If the access key is provided via `develocity-access-key`, then no access token is set and authentication with Develocity will not succeed.
|
||||||
|
- If the access key is provided via an environment variable, a warning will be logged and the environment variable will be left as-is.
|
||||||
|
This can result in long-lived access keys being unintentionally exposed to other workflow steps.
|
||||||
|
For more information on short-lived tokens, see [Develocity API documentation](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens).
|
||||||
|
|
||||||
|
## Develocity plugin injection
|
||||||
|
|
||||||
|
The `setup-gradle` action provides support for transparently injecting and configuring the Develocity Gradle plugin into any Gradle build,
|
||||||
|
without any modification to the project sources. This allows Build Scans to be published for a repository without any changes to the project sources.
|
||||||
|
|
||||||
|
Develocity injection is achieved via an init-script installed into Gradle User Home, which is enabled and parameterized via environment variables.
|
||||||
|
|
||||||
The same auto-injection behavior is available for the Common Custom User Data Gradle plugin, which enriches any build scans published with additional useful information.
|
The same auto-injection behavior is available for the Common Custom User Data Gradle plugin, which enriches any build scans published with additional useful information.
|
||||||
|
|
||||||
## Enabling Develocity injection
|
### Enabling Develocity injection
|
||||||
|
|
||||||
To enable Develocity injection for your build, you must provide the required configuration via inputs.
|
To enable Develocity injection for your build, you must provide the required configuration via inputs.
|
||||||
|
|
||||||
@@ -739,7 +837,7 @@ Here's a minimal example:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
develocity-injection-enabled: true
|
develocity-injection-enabled: true
|
||||||
develocity-url: https://develocity.your-server.com
|
develocity-url: https://develocity.your-server.com
|
||||||
@@ -749,14 +847,14 @@ Here's a minimal example:
|
|||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
This configuration will automatically apply `v3.17.6` 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 `v3.18.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.
|
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:
|
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:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
||||||
|
|
||||||
@@ -770,14 +868,7 @@ In the likely scenario that your Develocity server requires authentication, you
|
|||||||
|
|
||||||
This access key will be used during the action execution to get a short-lived token and set it to the DEVELOCITY_ACCESS_KEY environment variable.
|
This access key will be used during the action execution to get a short-lived token and set it to the DEVELOCITY_ACCESS_KEY environment variable.
|
||||||
|
|
||||||
### Short-lived access tokens
|
### Configuring Develocity injection
|
||||||
Develocity access keys are long-lived, creating risks if they are leaked. To avoid this, users can use short-lived access tokens to authenticate with Develocity. Access tokens can be used wherever an access key would be used. Access tokens are only valid for the Develocity instance that created them.
|
|
||||||
If a short-lived token fails to be retrieved (for example, if the Develocity server version is lower than `2024.1`):
|
|
||||||
- if a `GRADLE_ENTERPRISE_ACCESS_KEY` env var has been set, we're falling back to it with a deprecation warning
|
|
||||||
- otherwise no access key env var will be set. In that case Develocity authenticated operations like build cache read/write and build scan publication will fail without failing the build.
|
|
||||||
For more information on short-lived tokens, see [Develocity API documentation](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens).
|
|
||||||
|
|
||||||
## Configuring Develocity injection
|
|
||||||
|
|
||||||
The `init-script` supports several additional configuration parameters that you may find useful. All configuration options (required and optional) are detailed below:
|
The `init-script` supports several additional configuration parameters that you may find useful. All configuration options (required and optional) are detailed below:
|
||||||
|
|
||||||
@@ -814,33 +905,16 @@ Here's an example using the env vars:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
- name: Run a Gradle build with Develocity injection enabled with environment variables
|
- name: Run a Gradle build with Develocity injection enabled with environment variables
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
env:
|
env:
|
||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_URL: https://develocity.your-server.com
|
DEVELOCITY_URL: https://develocity.your-server.com
|
||||||
DEVELOCITY_PLUGIN_VERSION: 3.17.6
|
DEVELOCITY_ENFORCE_URL: true
|
||||||
```
|
DEVELOCITY_PLUGIN_VERSION: "3.18.1"
|
||||||
|
DEVELOCITY_CCUD_PLUGIN_VERSION: "2.0.2"
|
||||||
## Publishing to scans.gradle.com
|
|
||||||
|
|
||||||
Develocity injection is designed to enable the publishing of build scans to a Develocity instance,
|
|
||||||
but is also useful for publishing to the public Build Scans instance (https://scans.gradle.com).
|
|
||||||
|
|
||||||
To publish to https://scans.gradle.com, you must specify in your workflow that you accept the [Gradle Terms of Use](https://gradle.com/help/legal-terms-of-use).
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Setup Gradle to publish build scans
|
|
||||||
uses: gradle/actions/setup-gradle@v3
|
|
||||||
with:
|
|
||||||
build-scan-publish: true
|
|
||||||
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
|
|
||||||
build-scan-terms-of-use-agree: "yes"
|
|
||||||
|
|
||||||
- name: Run a Gradle build - a build scan will be published automatically
|
|
||||||
run: ./gradlew build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Dependency verification
|
# Dependency verification
|
||||||
|
|||||||
@@ -4,8 +4,11 @@ This action validates the checksums of _all_ [Gradle Wrapper](https://docs.gradl
|
|||||||
|
|
||||||
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
|
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
|
||||||
|
|
||||||
The `setup-gradle` action will perform wrapper validation on each execution. If you are using `setup-gradle` in your
|
> [!NOTE]
|
||||||
workflows, it is unlikely that you will need to use this action.
|
> Starting with v4 the `setup-gradle` action will automatically [perform wrapper validation](../docs/setup-gradle.md#gradle-wrapper-validation)
|
||||||
|
> on each execution.
|
||||||
|
>
|
||||||
|
> If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
|
||||||
|
|
||||||
## The Gradle Wrapper Problem in Open Source
|
## The Gradle Wrapper Problem in Open Source
|
||||||
|
|
||||||
@@ -47,7 +50,7 @@ We created an example [Homoglyph attack PR here](https://github.com/JLLeitschuh/
|
|||||||
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
|
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: gradle/actions/wrapper-validation@v3
|
uses: gradle/actions/wrapper-validation@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
|
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
|
||||||
@@ -70,7 +73,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: gradle/actions/wrapper-validation@v3
|
- uses: gradle/actions/wrapper-validation@v4
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing to an external GitHub Repository
|
## Contributing to an external GitHub Repository
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ inputs:
|
|||||||
cache-cleanup:
|
cache-cleanup:
|
||||||
description: |
|
description: |
|
||||||
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
|
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
|
||||||
By default, no cleanup is performed. It can be configured to run every time, or only when all Gradle builds succeed for the Job.
|
By default ('on-success'), cleanup is performed when all Gradle builds succeed for the Job.
|
||||||
|
This behaviour can be disabled ('never'), or configured to always run irrespective of the build outcome ('always').
|
||||||
Valid values are 'never', 'on-success' and 'always'.
|
Valid values are 'never', 'on-success' and 'always'.
|
||||||
required: false
|
required: false
|
||||||
default: 'on-success'
|
default: 'on-success'
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Configuration file for asdf version manager
|
# Configuration file for asdf version manager
|
||||||
nodejs 20.10.0
|
nodejs 20.10.0
|
||||||
gradle 8.9
|
gradle 8.11
|
||||||
|
|||||||
2796
sources/package-lock.json
generated
2796
sources/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -32,41 +32,40 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/artifact": "2.1.4",
|
"@actions/artifact": "2.1.11",
|
||||||
"@actions/cache": "3.2.4",
|
"@actions/cache": "3.3.0",
|
||||||
"@actions/core": "1.10.1",
|
"@actions/core": "1.11.1",
|
||||||
"@actions/exec": "1.1.1",
|
"@actions/exec": "1.1.1",
|
||||||
"@actions/github": "6.0.0",
|
"@actions/github": "6.0.0",
|
||||||
"@actions/glob": "0.4.0",
|
"@actions/glob": "0.5.0",
|
||||||
"@actions/http-client": "2.2.1",
|
"@actions/http-client": "2.2.3",
|
||||||
"@actions/tool-cache": "2.0.1",
|
"@actions/tool-cache": "2.0.1",
|
||||||
"@octokit/rest": "20.1.0",
|
"@octokit/rest": "21.0.2",
|
||||||
"@octokit/webhooks-types": "7.5.0",
|
"@octokit/webhooks-types": "7.6.1",
|
||||||
"cheerio": "^1.0.0-rc.12",
|
"cheerio": "^1.0.0",
|
||||||
"semver": "7.6.0",
|
"semver": "7.6.3",
|
||||||
"string-argv": "0.3.2",
|
"string-argv": "0.3.2",
|
||||||
"typed-rest-client": "1.8.11",
|
"typed-rest-client": "2.1.0",
|
||||||
"unhomoglyph": "1.0.6",
|
"unhomoglyph": "1.0.6",
|
||||||
"which": "4.0.0"
|
"which": "5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "29.5.12",
|
"@types/jest": "29.5.14",
|
||||||
"@types/node": "20.12.4",
|
"@types/node": "20.17.6",
|
||||||
"@types/unzipper": "0.10.9",
|
"@types/unzipper": "0.10.10",
|
||||||
"@types/which": "3.0.4",
|
"@types/which": "3.0.4",
|
||||||
"@typescript-eslint/parser": "7.5.0",
|
"@typescript-eslint/parser": "7.18.0",
|
||||||
"@vercel/ncc": "0.38.1",
|
"@vercel/ncc": "0.38.3",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-github": "4.10.2",
|
"eslint-plugin-github": "5.0.2",
|
||||||
"eslint-plugin-jest": "27.9.0",
|
"eslint-plugin-jest": "28.9.0",
|
||||||
"eslint-plugin-prettier": "5.1.3",
|
|
||||||
"jest": "29.7.0",
|
"jest": "29.7.0",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"nock": "13.5.4",
|
"nock": "13.5.6",
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"patch-package": "8.0.0",
|
"patch-package": "8.0.0",
|
||||||
"prettier": "3.2.5",
|
"prettier": "3.3.3",
|
||||||
"ts-jest": "29.1.2",
|
"ts-jest": "29.2.5",
|
||||||
"typescript": "5.4.3"
|
"typescript": "5.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,22 +44,24 @@ export class CacheCleaner {
|
|||||||
settings.caches {
|
settings.caches {
|
||||||
cleanup = Cleanup.ALWAYS
|
cleanup = Cleanup.ALWAYS
|
||||||
|
|
||||||
releasedWrappers.removeUnusedEntriesOlderThan.set(cleanupTime)
|
releasedWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||||
snapshotWrappers.removeUnusedEntriesOlderThan.set(cleanupTime)
|
snapshotWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||||
downloadedResources.removeUnusedEntriesOlderThan.set(cleanupTime)
|
downloadedResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||||
createdResources.removeUnusedEntriesOlderThan.set(cleanupTime)
|
createdResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||||
buildCache.removeUnusedEntriesOlderThan.set(cleanupTime)
|
buildCache.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}')
|
fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}')
|
||||||
|
|
||||||
const executable = await provisioner.provisionGradle('current')
|
// Gradle >= 8.11 required for cache cleanup
|
||||||
|
// TODO: This is ineffective: we should be using the newest version of Gradle that ran a build, or a newer version if it's available on PATH.
|
||||||
|
const executable = await provisioner.provisionGradleAtLeast('8.11')
|
||||||
|
|
||||||
await core.group('Executing Gradle to clean up caches', async () => {
|
await core.group('Executing Gradle to clean up caches', async () => {
|
||||||
core.info(`Cleaning up caches last used before ${cleanTimestamp}`)
|
core.info(`Cleaning up caches last used before ${cleanTimestamp}`)
|
||||||
await this.executeCleanupBuild(executable!, cleanupProjectDir)
|
await this.executeCleanupBuild(executable, cleanupProjectDir)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,11 +79,8 @@ export class CacheCleaner {
|
|||||||
'noop'
|
'noop'
|
||||||
]
|
]
|
||||||
|
|
||||||
const result = await exec.getExecOutput(executable, args, {
|
await exec.exec(executable, args, {
|
||||||
cwd: cleanupProjectDir,
|
cwd: cleanupProjectDir
|
||||||
silent: true
|
|
||||||
})
|
})
|
||||||
|
|
||||||
core.info(result.stdout)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,10 +110,12 @@ export class CacheEntryListener {
|
|||||||
requestedRestoreKeys: string[] | undefined
|
requestedRestoreKeys: string[] | undefined
|
||||||
restoredKey: string | undefined
|
restoredKey: string | undefined
|
||||||
restoredSize: number | undefined
|
restoredSize: number | undefined
|
||||||
|
restoredTime: number | undefined
|
||||||
notRestored: string | undefined
|
notRestored: string | undefined
|
||||||
|
|
||||||
savedKey: string | undefined
|
savedKey: string | undefined
|
||||||
savedSize: number | undefined
|
savedSize: number | undefined
|
||||||
|
savedTime: number | undefined
|
||||||
notSaved: string | undefined
|
notSaved: string | undefined
|
||||||
|
|
||||||
constructor(entryName: string) {
|
constructor(entryName: string) {
|
||||||
@@ -130,9 +132,10 @@ export class CacheEntryListener {
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
markRestored(key: string, size: number | undefined): CacheEntryListener {
|
markRestored(key: string, size: number | undefined, time: number): CacheEntryListener {
|
||||||
this.restoredKey = key
|
this.restoredKey = key
|
||||||
this.restoredSize = size
|
this.restoredSize = size
|
||||||
|
this.restoredTime = time
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,9 +144,10 @@ export class CacheEntryListener {
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
markSaved(key: string, size: number | undefined): CacheEntryListener {
|
markSaved(key: string, size: number | undefined, time: number): CacheEntryListener {
|
||||||
this.savedKey = key
|
this.savedKey = key
|
||||||
this.savedSize = size
|
this.savedSize = size
|
||||||
|
this.savedTime = time
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,14 +186,16 @@ ${renderEntryTable(entries)}
|
|||||||
function renderEntryTable(entries: CacheEntryListener[]): string {
|
function renderEntryTable(entries: CacheEntryListener[]): string {
|
||||||
return `
|
return `
|
||||||
<table>
|
<table>
|
||||||
<tr><td></td><th>Count</th><th>Total Size (Mb)</th></tr>
|
<tr><td></td><th>Count</th><th>Total Size (Mb)</th><th>Total Time (ms)</tr>
|
||||||
<tr><td>Entries Restored</td>
|
<tr><td>Entries Restored</td>
|
||||||
<td>${getCount(entries, e => e.restoredSize)}</td>
|
<td>${getCount(entries, e => e.restoredSize)}</td>
|
||||||
<td>${getSize(entries, e => e.restoredSize)}</td>
|
<td>${getSize(entries, e => e.restoredSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.restoredTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td>Entries Saved</td>
|
<tr><td>Entries Saved</td>
|
||||||
<td>${getCount(entries, e => e.savedSize)}</td>
|
<td>${getCount(entries, e => e.savedSize)}</td>
|
||||||
<td>${getSize(entries, e => e.savedSize)}</td>
|
<td>${getSize(entries, e => e.savedSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.savedTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
`
|
`
|
||||||
@@ -202,9 +208,11 @@ function renderEntryDetails(listener: CacheListener): string {
|
|||||||
Requested Key : ${entry.requestedKey ?? ''}
|
Requested Key : ${entry.requestedKey ?? ''}
|
||||||
Restored Key : ${entry.restoredKey ?? ''}
|
Restored Key : ${entry.restoredKey ?? ''}
|
||||||
Size: ${formatSize(entry.restoredSize)}
|
Size: ${formatSize(entry.restoredSize)}
|
||||||
|
Time: ${formatTime(entry.restoredTime)}
|
||||||
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
||||||
Saved Key : ${entry.savedKey ?? ''}
|
Saved Key : ${entry.savedKey ?? ''}
|
||||||
Size: ${formatSize(entry.savedSize)}
|
Size: ${formatSize(entry.savedSize)}
|
||||||
|
Time: ${formatTime(entry.savedTime)}
|
||||||
${getSavedMessage(entry, listener.cacheReadOnly)}
|
${getSavedMessage(entry, listener.cacheReadOnly)}
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
@@ -264,9 +272,23 @@ function getSize(
|
|||||||
return Math.round(bytes / (1024 * 1024))
|
return Math.round(bytes / (1024 * 1024))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getTime(
|
||||||
|
cacheEntries: CacheEntryListener[],
|
||||||
|
predicate: (value: CacheEntryListener) => number | undefined
|
||||||
|
): number {
|
||||||
|
return cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0)
|
||||||
|
}
|
||||||
|
|
||||||
function formatSize(bytes: number | undefined): string {
|
function formatSize(bytes: number | undefined): string {
|
||||||
if (bytes === undefined || bytes === 0) {
|
if (bytes === undefined || bytes === 0) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`
|
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatTime(ms: number | undefined): string {
|
||||||
|
if (ms === undefined || ms === 0) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
return `${ms} ms`
|
||||||
|
}
|
||||||
|
|||||||
@@ -38,13 +38,16 @@ export async function restoreCache(
|
|||||||
): Promise<cache.CacheEntry | undefined> {
|
): Promise<cache.CacheEntry | undefined> {
|
||||||
listener.markRequested(cacheKey, cacheRestoreKeys)
|
listener.markRequested(cacheKey, cacheRestoreKeys)
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now()
|
||||||
// Only override the read timeout if the SEGMENT_DOWNLOAD_TIMEOUT_MINS env var has NOT been set
|
// Only override the read timeout if the SEGMENT_DOWNLOAD_TIMEOUT_MINS env var has NOT been set
|
||||||
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
||||||
? {}
|
? {}
|
||||||
: {segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT}
|
: {segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT}
|
||||||
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions)
|
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions)
|
||||||
if (restoredEntry !== undefined) {
|
if (restoredEntry !== undefined) {
|
||||||
listener.markRestored(restoredEntry.key, restoredEntry.size)
|
const restoreTime = Date.now() - startTime
|
||||||
|
listener.markRestored(restoredEntry.key, restoredEntry.size, restoreTime)
|
||||||
|
core.info(`Restored cache entry with key ${cacheKey} to ${cachePath.join()} in ${restoreTime}ms`)
|
||||||
}
|
}
|
||||||
return restoredEntry
|
return restoredEntry
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -56,8 +59,11 @@ export async function restoreCache(
|
|||||||
|
|
||||||
export async function saveCache(cachePath: string[], cacheKey: string, listener: CacheEntryListener): Promise<void> {
|
export async function saveCache(cachePath: string[], cacheKey: string, listener: CacheEntryListener): Promise<void> {
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now()
|
||||||
const savedEntry = await cache.saveCache(cachePath, cacheKey)
|
const savedEntry = await cache.saveCache(cachePath, cacheKey)
|
||||||
listener.markSaved(savedEntry.key, savedEntry.size)
|
const saveTime = Date.now() - startTime
|
||||||
|
listener.markSaved(savedEntry.key, savedEntry.size, saveTime)
|
||||||
|
core.info(`Saved cache entry with key ${cacheKey} from ${cachePath.join()} in ${saveTime}ms`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof cache.ReserveCacheError) {
|
if (error instanceof cache.ReserveCacheError) {
|
||||||
listener.markAlreadyExists(cacheKey)
|
listener.markAlreadyExists(cacheKey)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import path from 'path'
|
|||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as glob from '@actions/glob'
|
import * as glob from '@actions/glob'
|
||||||
import * as semver from 'semver'
|
|
||||||
|
|
||||||
import {CacheEntryListener, CacheListener} from './cache-reporting'
|
import {CacheEntryListener, CacheListener} from './cache-reporting'
|
||||||
import {cacheDebug, hashFileNames, isCacheDebuggingEnabled, restoreCache, saveCache, tryDelete} from './cache-utils'
|
import {cacheDebug, hashFileNames, isCacheDebuggingEnabled, restoreCache, saveCache, tryDelete} from './cache-utils'
|
||||||
@@ -10,6 +9,7 @@ import {cacheDebug, hashFileNames, isCacheDebuggingEnabled, restoreCache, saveCa
|
|||||||
import {BuildResult, loadBuildResults} from '../build-results'
|
import {BuildResult, loadBuildResults} from '../build-results'
|
||||||
import {CacheConfig, ACTION_METADATA_DIR} from '../configuration'
|
import {CacheConfig, ACTION_METADATA_DIR} from '../configuration'
|
||||||
import {getCacheKeyBase} from './cache-key'
|
import {getCacheKeyBase} from './cache-key'
|
||||||
|
import {versionIsAtLeast} from '../execution/gradle'
|
||||||
|
|
||||||
const SKIP_RESTORE_VAR = 'GRADLE_BUILD_ACTION_SKIP_RESTORE'
|
const SKIP_RESTORE_VAR = 'GRADLE_BUILD_ACTION_SKIP_RESTORE'
|
||||||
const CACHE_PROTOCOL_VERSION = 'v1'
|
const CACHE_PROTOCOL_VERSION = 'v1'
|
||||||
@@ -132,9 +132,8 @@ abstract class AbstractEntryExtractor {
|
|||||||
pattern: string,
|
pattern: string,
|
||||||
listener: CacheEntryListener
|
listener: CacheEntryListener
|
||||||
): Promise<ExtractedCacheEntry> {
|
): Promise<ExtractedCacheEntry> {
|
||||||
const restoredEntry = await restoreCache([pattern], cacheKey, [], listener)
|
const restoredEntry = await restoreCache(pattern.split('\n'), cacheKey, [], listener)
|
||||||
if (restoredEntry) {
|
if (restoredEntry) {
|
||||||
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`)
|
|
||||||
return new ExtractedCacheEntry(artifactType, pattern, cacheKey)
|
return new ExtractedCacheEntry(artifactType, pattern, cacheKey)
|
||||||
} else {
|
} else {
|
||||||
core.info(`Did not restore ${artifactType} with key ${cacheKey} to ${pattern}`)
|
core.info(`Did not restore ${artifactType} with key ${cacheKey} to ${pattern}`)
|
||||||
@@ -232,8 +231,7 @@ abstract class AbstractEntryExtractor {
|
|||||||
cacheDebug(`No change to previously restored ${artifactType}. Not saving.`)
|
cacheDebug(`No change to previously restored ${artifactType}. Not saving.`)
|
||||||
entryListener.markNotSaved('contents unchanged')
|
entryListener.markNotSaved('contents unchanged')
|
||||||
} else {
|
} else {
|
||||||
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`)
|
await saveCache(pattern.split('\n'), cacheKey, entryListener)
|
||||||
await saveCache([pattern], cacheKey, entryListener)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const file of matchingFiles) {
|
for (const file of matchingFiles) {
|
||||||
@@ -434,8 +432,7 @@ export class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
|
|||||||
// If any associated build result used Gradle < 8.6, then mark it as not cacheable
|
// If any associated build result used Gradle < 8.6, then mark it as not cacheable
|
||||||
if (
|
if (
|
||||||
pathResults.find(result => {
|
pathResults.find(result => {
|
||||||
const gradleVersion = semver.coerce(result.gradleVersion)
|
return !versionIsAtLeast(result.gradleVersion, '8.6.0')
|
||||||
return gradleVersion && semver.lt(gradleVersion, '8.6.0')
|
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
core.info(
|
core.info(
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ export class GradleUserHomeCache {
|
|||||||
restoreKeys:[${cacheKey.restoreKeys}]`
|
restoreKeys:[${cacheKey.restoreKeys}]`
|
||||||
)
|
)
|
||||||
|
|
||||||
const cacheResult = await restoreCache(this.getCachePath(), cacheKey.key, cacheKey.restoreKeys, entryListener)
|
const cachePath = this.getCachePath()
|
||||||
|
const cacheResult = await restoreCache(cachePath, cacheKey.key, cacheKey.restoreKeys, entryListener)
|
||||||
if (!cacheResult) {
|
if (!cacheResult) {
|
||||||
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`)
|
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`)
|
||||||
return
|
return
|
||||||
@@ -68,8 +69,6 @@ export class GradleUserHomeCache {
|
|||||||
|
|
||||||
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key)
|
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key)
|
||||||
|
|
||||||
core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.afterRestore(listener)
|
await this.afterRestore(listener)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -120,10 +119,8 @@ export class GradleUserHomeCache {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`)
|
|
||||||
const cachePath = this.getCachePath()
|
const cachePath = this.getCachePath()
|
||||||
await saveCache(cachePath, cacheKey, gradleHomeEntryListener)
|
await saveCache(cachePath, cacheKey, gradleHomeEntryListener)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,6 @@ import {setupToken} from './short-lived-token'
|
|||||||
export async function setup(config: BuildScanConfig): Promise<void> {
|
export async function setup(config: BuildScanConfig): Promise<void> {
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_INIT_SCRIPT_NAME', 'gradle-actions.inject-develocity.init.gradle')
|
maybeExportVariable('DEVELOCITY_INJECTION_INIT_SCRIPT_NAME', 'gradle-actions.inject-develocity.init.gradle')
|
||||||
maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions')
|
maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions')
|
||||||
if (config.getBuildScanPublishEnabled()) {
|
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
|
||||||
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.17.6')
|
|
||||||
maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '2.0')
|
|
||||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
|
|
||||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())
|
|
||||||
}
|
|
||||||
|
|
||||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_ENABLED', config.getDevelocityInjectionEnabled())
|
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_ENABLED', config.getDevelocityInjectionEnabled())
|
||||||
maybeExportVariableNotEmpty('DEVELOCITY_URL', config.getDevelocityUrl())
|
maybeExportVariableNotEmpty('DEVELOCITY_URL', config.getDevelocityUrl())
|
||||||
@@ -19,10 +12,22 @@ export async function setup(config: BuildScanConfig): Promise<void> {
|
|||||||
maybeExportVariableNotEmpty('DEVELOCITY_CAPTURE_FILE_FINGERPRINTS', config.getDevelocityCaptureFileFingerprints())
|
maybeExportVariableNotEmpty('DEVELOCITY_CAPTURE_FILE_FINGERPRINTS', config.getDevelocityCaptureFileFingerprints())
|
||||||
maybeExportVariableNotEmpty('DEVELOCITY_ENFORCE_URL', config.getDevelocityEnforceUrl())
|
maybeExportVariableNotEmpty('DEVELOCITY_ENFORCE_URL', config.getDevelocityEnforceUrl())
|
||||||
maybeExportVariableNotEmpty('DEVELOCITY_PLUGIN_VERSION', config.getDevelocityPluginVersion())
|
maybeExportVariableNotEmpty('DEVELOCITY_PLUGIN_VERSION', config.getDevelocityPluginVersion())
|
||||||
|
maybeExportVariableNotEmpty('DEVELOCITY_CCUD_PLUGIN_VERSION', config.getDevelocityCcudPluginVersion())
|
||||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_URL', config.getGradlePluginRepositoryUrl())
|
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_URL', config.getGradlePluginRepositoryUrl())
|
||||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_USERNAME', config.getGradlePluginRepositoryUsername())
|
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_USERNAME', config.getGradlePluginRepositoryUsername())
|
||||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_PASSWORD', config.getGradlePluginRepositoryPassword())
|
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_PASSWORD', config.getGradlePluginRepositoryPassword())
|
||||||
|
|
||||||
|
// If build-scan-publish is enabled, ensure the environment variables are set
|
||||||
|
// The DEVELOCITY_PLUGIN_VERSION and DEVELOCITY_CCUD_PLUGIN_VERSION are set to the latest versions
|
||||||
|
// except if they are defined in the configuration
|
||||||
|
if (config.getBuildScanPublishEnabled()) {
|
||||||
|
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
||||||
|
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.18.2')
|
||||||
|
maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '2.0.2')
|
||||||
|
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
|
||||||
|
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())
|
||||||
|
}
|
||||||
|
|
||||||
return setupToken(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry())
|
return setupToken(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class ShortLivedTokenClient {
|
|||||||
retryInterval = 1000
|
retryInterval = 1000
|
||||||
|
|
||||||
async fetchToken(serverUrl: string, accessKey: HostnameAccessKey, expiry: string): Promise<HostnameAccessKey> {
|
async fetchToken(serverUrl: string, accessKey: HostnameAccessKey, expiry: string): Promise<HostnameAccessKey> {
|
||||||
const queryParams = expiry ? `?expiresInHours${expiry}` : ''
|
const queryParams = expiry ? `?expiresInHours=${expiry}` : ''
|
||||||
const sanitizedServerUrl = !serverUrl.endsWith('/') ? `${serverUrl}/` : serverUrl
|
const sanitizedServerUrl = !serverUrl.endsWith('/') ? `${serverUrl}/` : serverUrl
|
||||||
const headers = {
|
const headers = {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as exec from '@actions/exec'
|
import * as exec from '@actions/exec'
|
||||||
|
|
||||||
|
import which from 'which'
|
||||||
|
import * as semver from 'semver'
|
||||||
import * as provisioner from './provision'
|
import * as provisioner from './provision'
|
||||||
import * as gradlew from './gradlew'
|
import * as gradlew from './gradlew'
|
||||||
|
|
||||||
@@ -31,3 +33,42 @@ async function executeGradleBuild(executable: string | undefined, root: string,
|
|||||||
core.setFailed(`Gradle build failed: see console output for details`)
|
core.setFailed(`Gradle build failed: see console output for details`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function versionIsAtLeast(actualVersion: string, requiredVersion: string): boolean {
|
||||||
|
const splitVersion = actualVersion.split('-')
|
||||||
|
const coreVersion = splitVersion[0]
|
||||||
|
const prerelease = splitVersion.length > 1
|
||||||
|
|
||||||
|
const actualSemver = semver.coerce(coreVersion)!
|
||||||
|
const comparisonSemver = semver.coerce(requiredVersion)!
|
||||||
|
|
||||||
|
if (prerelease) {
|
||||||
|
return semver.gt(actualSemver, comparisonSemver)
|
||||||
|
} else {
|
||||||
|
return semver.gte(actualSemver, comparisonSemver)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function findGradleVersionOnPath(): Promise<GradleExecutable | undefined> {
|
||||||
|
const gradleExecutable = await which('gradle', {nothrow: true})
|
||||||
|
if (gradleExecutable) {
|
||||||
|
const output = await exec.getExecOutput(gradleExecutable, ['-v'], {silent: true})
|
||||||
|
const version = parseGradleVersionFromOutput(output.stdout)
|
||||||
|
return version ? new GradleExecutable(version, gradleExecutable) : undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
export function parseGradleVersionFromOutput(output: string): string | undefined {
|
||||||
|
const regex = /Gradle (\d+\.\d+(\.\d+)?(-.*)?)/
|
||||||
|
const versionString = output.match(regex)?.[1]
|
||||||
|
return versionString
|
||||||
|
}
|
||||||
|
|
||||||
|
class GradleExecutable {
|
||||||
|
constructor(
|
||||||
|
readonly version: string,
|
||||||
|
readonly executable: string
|
||||||
|
) {}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import which from 'which'
|
|
||||||
import * as httpm from '@actions/http-client'
|
import * as httpm from '@actions/http-client'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as cache from '@actions/cache'
|
import * as cache from '@actions/cache'
|
||||||
import * as exec from '@actions/exec'
|
|
||||||
import * as toolCache from '@actions/tool-cache'
|
import * as toolCache from '@actions/tool-cache'
|
||||||
|
|
||||||
|
import {findGradleVersionOnPath, versionIsAtLeast} from './gradle'
|
||||||
import * as gradlew from './gradlew'
|
import * as gradlew from './gradlew'
|
||||||
import {handleCacheFailure} from '../caching/cache-utils'
|
import {handleCacheFailure} from '../caching/cache-utils'
|
||||||
import {CacheConfig} from '../configuration'
|
import {CacheConfig} from '../configuration'
|
||||||
@@ -26,6 +25,16 @@ export async function provisionGradle(gradleVersion: string): Promise<string | u
|
|||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure that the Gradle version on PATH is no older than the specified version.
|
||||||
|
* If the version on PATH is older, install the specified version and add it to the PATH.
|
||||||
|
* @return Installed Gradle executable or undefined if no version configured.
|
||||||
|
*/
|
||||||
|
export async function provisionGradleAtLeast(gradleVersion: string): Promise<string> {
|
||||||
|
const installedVersion = await installGradleVersionAtLeast(await gradleRelease(gradleVersion))
|
||||||
|
return addToPath(installedVersion)
|
||||||
|
}
|
||||||
|
|
||||||
async function addToPath(executable: string): Promise<string> {
|
async function addToPath(executable: string): Promise<string> {
|
||||||
core.addPath(path.dirname(executable))
|
core.addPath(path.dirname(executable))
|
||||||
return executable
|
return executable
|
||||||
@@ -51,7 +60,7 @@ async function resolveGradleVersion(version: string): Promise<GradleVersionInfo>
|
|||||||
case 'release-nightly':
|
case 'release-nightly':
|
||||||
return gradleReleaseNightly()
|
return gradleReleaseNightly()
|
||||||
default:
|
default:
|
||||||
return gradle(version)
|
return gradleRelease(version)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +85,7 @@ async function gradleReleaseNightly(): Promise<GradleVersionInfo> {
|
|||||||
return await gradleVersionDeclaration(`${gradleVersionsBaseUrl}/release-nightly`)
|
return await gradleVersionDeclaration(`${gradleVersionsBaseUrl}/release-nightly`)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function gradle(version: string): Promise<GradleVersionInfo> {
|
async function gradleRelease(version: string): Promise<GradleVersionInfo> {
|
||||||
const versionInfo = await findGradleVersionDeclaration(version)
|
const versionInfo = await findGradleVersionDeclaration(version)
|
||||||
if (!versionInfo) {
|
if (!versionInfo) {
|
||||||
throw new Error(`Gradle version ${version} does not exists`)
|
throw new Error(`Gradle version ${version} does not exists`)
|
||||||
@@ -97,10 +106,24 @@ async function findGradleVersionDeclaration(version: string): Promise<GradleVers
|
|||||||
|
|
||||||
async function installGradleVersion(versionInfo: GradleVersionInfo): Promise<string> {
|
async function installGradleVersion(versionInfo: GradleVersionInfo): Promise<string> {
|
||||||
return core.group(`Provision Gradle ${versionInfo.version}`, async () => {
|
return core.group(`Provision Gradle ${versionInfo.version}`, async () => {
|
||||||
const preInstalledGradle = await findGradleVersionOnPath(versionInfo)
|
const gradleOnPath = await findGradleVersionOnPath()
|
||||||
if (preInstalledGradle !== undefined) {
|
if (gradleOnPath?.version === versionInfo.version) {
|
||||||
core.info(`Gradle version ${versionInfo.version} is already available on PATH. Not installing.`)
|
core.info(`Gradle version ${versionInfo.version} is already available on PATH. Not installing.`)
|
||||||
return preInstalledGradle
|
return gradleOnPath.executable
|
||||||
|
}
|
||||||
|
|
||||||
|
return locateGradleAndDownloadIfRequired(versionInfo)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function installGradleVersionAtLeast(versionInfo: GradleVersionInfo): Promise<string> {
|
||||||
|
return core.group(`Provision Gradle >= ${versionInfo.version}`, async () => {
|
||||||
|
const gradleOnPath = await findGradleVersionOnPath()
|
||||||
|
if (gradleOnPath && versionIsAtLeast(gradleOnPath.version, versionInfo.version)) {
|
||||||
|
core.info(
|
||||||
|
`Gradle version ${gradleOnPath.version} is available on PATH and >= ${versionInfo.version}. Not installing.`
|
||||||
|
)
|
||||||
|
return gradleOnPath.executable
|
||||||
}
|
}
|
||||||
|
|
||||||
return locateGradleAndDownloadIfRequired(versionInfo)
|
return locateGradleAndDownloadIfRequired(versionInfo)
|
||||||
@@ -192,15 +215,3 @@ interface GradleVersionInfo {
|
|||||||
version: string
|
version: string
|
||||||
downloadUrl: string
|
downloadUrl: string
|
||||||
}
|
}
|
||||||
|
|
||||||
async function findGradleVersionOnPath(versionInfo: GradleVersionInfo): Promise<string | undefined> {
|
|
||||||
const gradleExecutable = await which('gradle', {nothrow: true})
|
|
||||||
if (gradleExecutable) {
|
|
||||||
const output = await exec.getExecOutput(gradleExecutable, ['-v'], {silent: true})
|
|
||||||
if (output.stdout.includes(`Gradle ${versionInfo.version}`)) {
|
|
||||||
return gradleExecutable
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export async function generateJobSummary(
|
|||||||
async function addPRComment(jobSummary: string): Promise<void> {
|
async function addPRComment(jobSummary: string): Promise<void> {
|
||||||
const context = github.context
|
const context = github.context
|
||||||
if (context.payload.pull_request == null) {
|
if (context.payload.pull_request == null) {
|
||||||
core.info('No pull_request trigger: not adding PR comment')
|
core.info('No pull_request trigger detected: not adding PR comment')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,15 +32,19 @@ if (isTopLevelBuild) {
|
|||||||
|
|
||||||
// Use the Develocity plugin to also capture build scan links, when available
|
// Use the Develocity plugin to also capture build scan links, when available
|
||||||
settingsEvaluated { settings ->
|
settingsEvaluated { settings ->
|
||||||
settings.pluginManager.withPlugin(GE_PLUGIN_ID) {
|
def captureBuildScanLink = {
|
||||||
// Only execute if develocity plugin isn't applied.
|
// Prefer the 'develocity' extension, if available
|
||||||
if (!settings.extensions.findByName(DEVELOCITY_EXTENSION)) {
|
if (settings.extensions.findByName(DEVELOCITY_EXTENSION)) {
|
||||||
|
captureUsingBuildScanPublished(settings.extensions[DEVELOCITY_EXTENSION].buildScan, invocationId, resultsWriter)
|
||||||
|
} else {
|
||||||
captureUsingBuildScanPublished(settings.extensions[GE_EXTENSION].buildScan, invocationId, resultsWriter)
|
captureUsingBuildScanPublished(settings.extensions[GE_EXTENSION].buildScan, invocationId, resultsWriter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
settings.pluginManager.withPlugin(GE_PLUGIN_ID, captureBuildScanLink)
|
||||||
settings.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
settings.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
||||||
captureUsingBuildScanPublished(settings.extensions[DEVELOCITY_EXTENSION].buildScan, invocationId, resultsWriter)
|
// Develocity plugin applies GE plugin: avoid duplicate call
|
||||||
|
if (settings.pluginManager.hasPlugin(GE_PLUGIN_ID)) return
|
||||||
|
captureBuildScanLink()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (atLeastGradle3) {
|
} else if (atLeastGradle3) {
|
||||||
@@ -48,15 +52,21 @@ if (isTopLevelBuild) {
|
|||||||
// By default, use 'buildFinished' to capture build results
|
// By default, use 'buildFinished' to capture build results
|
||||||
captureUsingBuildFinished(gradle, invocationId, resultsWriter)
|
captureUsingBuildFinished(gradle, invocationId, resultsWriter)
|
||||||
|
|
||||||
gradle.rootProject.pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID) {
|
def captureBuildScanLink = {
|
||||||
// Only execute if develocity plugin isn't applied.
|
// Prefer the 'develocity' extension, if available
|
||||||
if (!gradle.rootProject.extensions.findByName(DEVELOCITY_EXTENSION)) {
|
if (gradle.rootProject.extensions.findByName(DEVELOCITY_EXTENSION)) {
|
||||||
|
captureUsingBuildScanPublished(gradle.rootProject.extensions[DEVELOCITY_EXTENSION].buildScan, invocationId, resultsWriter)
|
||||||
|
} else {
|
||||||
captureUsingBuildScanPublished(gradle.rootProject.extensions[BUILD_SCAN_EXTENSION], invocationId, resultsWriter)
|
captureUsingBuildScanPublished(gradle.rootProject.extensions[BUILD_SCAN_EXTENSION], invocationId, resultsWriter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gradle.rootProject.pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID, captureBuildScanLink)
|
||||||
|
|
||||||
gradle.rootProject.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
gradle.rootProject.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
||||||
captureUsingBuildScanPublished(gradle.rootProject.extensions[DEVELOCITY_EXTENSION].buildScan, invocationId, resultsWriter)
|
// Develocity plugin applies Build Scan plugin: avoid duplicate call
|
||||||
|
if (gradle.rootProject.pluginManager.hasPlugin(BUILD_SCAN_PLUGIN_ID)) return
|
||||||
|
captureBuildScanLink()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export const KNOWN_CHECKSUMS = loadKnownChecksums()
|
|||||||
export async function fetchUnknownChecksums(
|
export async function fetchUnknownChecksums(
|
||||||
allowSnapshots: boolean,
|
allowSnapshots: boolean,
|
||||||
knownChecksums: WrapperChecksums
|
knownChecksums: WrapperChecksums
|
||||||
): Promise<Set<string>> {
|
): Promise<WrapperChecksums> {
|
||||||
const all = await httpGetJsonArray('https://services.gradle.org/versions/all')
|
const all = await httpGetJsonArray('https://services.gradle.org/versions/all')
|
||||||
const withChecksum = all.filter(
|
const withChecksum = all.filter(
|
||||||
entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl')
|
entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl')
|
||||||
@@ -51,20 +51,21 @@ export async function fetchUnknownChecksums(
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
(entry: any) => !knownChecksums.versions.has(entry.version)
|
(entry: any) => !knownChecksums.versions.has(entry.version)
|
||||||
)
|
)
|
||||||
const checksumUrls = notKnown.map(
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
(entry: any) => entry.wrapperChecksumUrl as string
|
const checksumUrls = notKnown.map((entry: any) => [entry.version, entry.wrapperChecksumUrl] as [string, string])
|
||||||
)
|
|
||||||
if (allowSnapshots) {
|
if (allowSnapshots) {
|
||||||
await addDistributionSnapshotChecksums(checksumUrls)
|
await addDistributionSnapshotChecksumUrls(checksumUrls)
|
||||||
}
|
}
|
||||||
const checksums = await Promise.all(
|
|
||||||
checksumUrls.map(async (url: string) => {
|
const wrapperChecksums = new WrapperChecksums()
|
||||||
// console.log(`Fetching checksum from ${url}`)
|
await Promise.all(
|
||||||
return httpGetText(url)
|
checksumUrls.map(async ([version, url]) => {
|
||||||
|
const checksum = await httpGetText(url)
|
||||||
|
wrapperChecksums.add(version, checksum)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
return new Set(checksums)
|
return wrapperChecksums
|
||||||
}
|
}
|
||||||
|
|
||||||
async function httpGetJsonArray(url: string): Promise<unknown[]> {
|
async function httpGetJsonArray(url: string): Promise<unknown[]> {
|
||||||
@@ -76,21 +77,20 @@ async function httpGetText(url: string): Promise<string> {
|
|||||||
return await response.readBody()
|
return await response.readBody()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Public for testing
|
async function addDistributionSnapshotChecksumUrls(checksumUrls: [string, string][]): Promise<void> {
|
||||||
export async function addDistributionSnapshotChecksums(checksumUrls: string[]): Promise<void> {
|
// Load the index page of the distribution snapshot repository into cheerio
|
||||||
// Load the index page of the distribution snapshot repository
|
|
||||||
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/')
|
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/')
|
||||||
|
|
||||||
// // Extract all wrapper checksum from the index page. These end in -wrapper.jar.sha256
|
|
||||||
// // Load the HTML into cheerio
|
|
||||||
const $ = cheerio.load(indexPage)
|
const $ = cheerio.load(indexPage)
|
||||||
|
|
||||||
// // Find all links ending with '-wrapper.jar.sha256'
|
// // Find all links ending with '-wrapper.jar.sha256'
|
||||||
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]')
|
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]')
|
||||||
|
|
||||||
// build the absolute URL for each wrapper checksum
|
|
||||||
wrapperChecksumLinks.each((index, element) => {
|
wrapperChecksumLinks.each((index, element) => {
|
||||||
const url = $(element).attr('href')
|
const url = $(element).attr('href')!
|
||||||
checksumUrls.push(`https://services.gradle.org${url}`)
|
|
||||||
|
// Extract the version from the url
|
||||||
|
const version = url.match(/\/distributions-snapshots\/gradle-(.*?)-wrapper\.jar\.sha256/)?.[1]
|
||||||
|
if (version) {
|
||||||
|
checksumUrls.push([version, `https://services.gradle.org${url}`])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,14 @@ async function recursivelyListFiles(baseDir: string): Promise<string[]> {
|
|||||||
const childrenPaths = await Promise.all(
|
const childrenPaths = await Promise.all(
|
||||||
childrenNames.map(async childName => {
|
childrenNames.map(async childName => {
|
||||||
const childPath = path.resolve(baseDir, childName)
|
const childPath = path.resolve(baseDir, childName)
|
||||||
return fs.lstatSync(childPath).isDirectory()
|
const stat = fs.lstatSync(childPath, {throwIfNoEntry: false})
|
||||||
? recursivelyListFiles(childPath)
|
if (stat === undefined) {
|
||||||
: new Promise(resolve => resolve([childPath]))
|
return []
|
||||||
|
} else if (stat.isDirectory()) {
|
||||||
|
return recursivelyListFiles(childPath)
|
||||||
|
} else {
|
||||||
|
return new Promise(resolve => resolve([childPath]))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
return Array.prototype.concat(...childrenPaths)
|
return Array.prototype.concat(...childrenPaths)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export async function findInvalidWrapperJars(
|
|||||||
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums)
|
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums)
|
||||||
|
|
||||||
for (const wrapperJar of notYetValidatedWrappers) {
|
for (const wrapperJar of notYetValidatedWrappers) {
|
||||||
if (!fetchedValidChecksums.has(wrapperJar.checksum)) {
|
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
|
||||||
result.invalid.push(wrapperJar)
|
result.invalid.push(wrapperJar)
|
||||||
} else {
|
} else {
|
||||||
result.valid.push(wrapperJar)
|
result.valid.push(wrapperJar)
|
||||||
|
|||||||
@@ -1,4 +1,44 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "8.11",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.11-rc-3",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.11-rc-2",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.11-rc-1",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.11-milestone-1",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.10.2",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.10.2-milestone-1",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.10.1",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.10",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.10-rc-1",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "8.9",
|
"version": "8.9",
|
||||||
"checksum": "498495120a03b9a6ab5d155f5de3c8f0d986a449153702fb80fc80e134484f17"
|
"checksum": "498495120a03b9a6ab5d155f5de3c8f0d986a449153702fb80fc80e134484f17"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ dependencies {
|
|||||||
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
|
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
|
||||||
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
|
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
|
||||||
}
|
}
|
||||||
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.17.2'
|
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.18.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|||||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
|
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.17.6"
|
id "com.gradle.develocity" version "3.18.2"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -16,25 +16,28 @@ import java.nio.file.Files
|
|||||||
import java.util.zip.GZIPOutputStream
|
import java.util.zip.GZIPOutputStream
|
||||||
|
|
||||||
class BaseInitScriptTest extends Specification {
|
class BaseInitScriptTest extends Specification {
|
||||||
static final String DEVELOCITY_PLUGIN_VERSION = '3.17.6'
|
static final String DEVELOCITY_PLUGIN_VERSION = '3.18.2'
|
||||||
static final String CCUD_PLUGIN_VERSION = '2.0.1'
|
static final String CCUD_PLUGIN_VERSION = '2.0.2'
|
||||||
|
|
||||||
static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
|
static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
|
||||||
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
|
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
|
||||||
static final TestGradleVersion GRADLE_5_X = new TestGradleVersion(GradleVersion.version('5.6.4'), 8, 12)
|
static final TestGradleVersion GRADLE_5_X = new TestGradleVersion(GradleVersion.version('5.6.4'), 8, 12)
|
||||||
|
static final TestGradleVersion GRADLE_6_0 = new TestGradleVersion(GradleVersion.version('6.0.1'), 8, 13)
|
||||||
static final TestGradleVersion GRADLE_6_NO_BUILD_SERVICE = new TestGradleVersion(GradleVersion.version('6.5.1'), 8, 14)
|
static final TestGradleVersion GRADLE_6_NO_BUILD_SERVICE = new TestGradleVersion(GradleVersion.version('6.5.1'), 8, 14)
|
||||||
static final TestGradleVersion GRADLE_6_X = new TestGradleVersion(GradleVersion.version('6.9.4'), 8, 15)
|
static final TestGradleVersion GRADLE_6_X = new TestGradleVersion(GradleVersion.version('6.9.4'), 8, 15)
|
||||||
static final TestGradleVersion GRADLE_7_1 = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
|
static final TestGradleVersion GRADLE_7_1 = new TestGradleVersion(GradleVersion.version('7.1.1'), 8, 16)
|
||||||
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
|
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
|
||||||
static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19)
|
static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19)
|
||||||
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.9'), 8, 22)
|
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.11'), 8, 23)
|
||||||
|
|
||||||
static final List<TestGradleVersion> ALL_VERSIONS = [
|
static final List<TestGradleVersion> ALL_VERSIONS = [
|
||||||
GRADLE_3_X, // First version where TestKit supports environment variables
|
GRADLE_3_X, // First version where TestKit supports environment variables
|
||||||
GRADLE_4_X,
|
GRADLE_4_X,
|
||||||
GRADLE_5_X,
|
GRADLE_5_X,
|
||||||
|
GRADLE_6_0,
|
||||||
GRADLE_6_NO_BUILD_SERVICE, // Last version without build service support
|
GRADLE_6_NO_BUILD_SERVICE, // Last version without build service support
|
||||||
GRADLE_6_X,
|
GRADLE_6_X,
|
||||||
|
GRADLE_7_1,
|
||||||
GRADLE_7_X,
|
GRADLE_7_X,
|
||||||
GRADLE_8_0,
|
GRADLE_8_0,
|
||||||
GRADLE_8_X,
|
GRADLE_8_X,
|
||||||
@@ -44,7 +47,7 @@ class BaseInitScriptTest extends Specification {
|
|||||||
[GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
|
[GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
|
||||||
|
|
||||||
static final List<TestGradleVersion> SETTINGS_PLUGIN_VERSIONS =
|
static final List<TestGradleVersion> SETTINGS_PLUGIN_VERSIONS =
|
||||||
[GRADLE_6_X, GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
|
[GRADLE_6_X, GRADLE_7_1, GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
|
||||||
|
|
||||||
static final String PUBLIC_BUILD_SCAN_ID = 'i2wepy2gr7ovw'
|
static final String PUBLIC_BUILD_SCAN_ID = 'i2wepy2gr7ovw'
|
||||||
static final String DEFAULT_SCAN_UPLOAD_TOKEN = 'scan-upload-token'
|
static final String DEFAULT_SCAN_UPLOAD_TOKEN = 'scan-upload-token'
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ class TestBuildResultRecorder extends BaseInitScriptTest {
|
|||||||
when:
|
when:
|
||||||
settingsFile.text = """
|
settingsFile.text = """
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gradle.develocity' version '3.17.6' apply(false)
|
id 'com.gradle.develocity' version '3.18.2' apply(false)
|
||||||
}
|
}
|
||||||
gradle.settingsEvaluated {
|
gradle.settingsEvaluated {
|
||||||
apply plugin: 'com.gradle.develocity'
|
apply plugin: 'com.gradle.develocity'
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ test('will cleanup unused gradle versions', async () => {
|
|||||||
const transforms3 = path.resolve(gradleUserHome, "caches/transforms-3")
|
const transforms3 = path.resolve(gradleUserHome, "caches/transforms-3")
|
||||||
const metadata100 = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.100")
|
const metadata100 = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.100")
|
||||||
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
|
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
|
||||||
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.9")
|
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.11")
|
||||||
const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.106")
|
const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.107")
|
||||||
|
|
||||||
expect(fs.existsSync(gradle802)).toBe(true)
|
expect(fs.existsSync(gradle802)).toBe(true)
|
||||||
expect(fs.existsSync(transforms3)).toBe(true)
|
expect(fs.existsSync(transforms3)).toBe(true)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import exp from 'constants'
|
||||||
import {CacheEntryListener, CacheListener} from '../../src/caching/cache-reporting'
|
import {CacheEntryListener, CacheListener} from '../../src/caching/cache-reporting'
|
||||||
|
|
||||||
describe('caching report', () => {
|
describe('caching report', () => {
|
||||||
@@ -5,7 +6,7 @@ describe('caching report', () => {
|
|||||||
it('with one requested entry report', async () => {
|
it('with one requested entry report', async () => {
|
||||||
const report = new CacheListener()
|
const report = new CacheListener()
|
||||||
report.entry('foo').markRequested('1', ['2'])
|
report.entry('foo').markRequested('1', ['2'])
|
||||||
report.entry('bar').markRequested('3').markRestored('4', 500)
|
report.entry('bar').markRequested('3').markRestored('4', 500, 1000)
|
||||||
expect(report.fullyRestored).toBe(false)
|
expect(report.fullyRestored).toBe(false)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -22,13 +23,13 @@ describe('caching report', () => {
|
|||||||
})
|
})
|
||||||
it('with restored entry report', async () => {
|
it('with restored entry report', async () => {
|
||||||
const report = new CacheListener()
|
const report = new CacheListener()
|
||||||
report.entry('bar').markRequested('3').markRestored('4', 300)
|
report.entry('bar').markRequested('3').markRestored('4', 300, 1000)
|
||||||
expect(report.fullyRestored).toBe(true)
|
expect(report.fullyRestored).toBe(true)
|
||||||
})
|
})
|
||||||
it('with multiple restored entry reportss', async () => {
|
it('with multiple restored entry reportss', async () => {
|
||||||
const report = new CacheListener()
|
const report = new CacheListener()
|
||||||
report.entry('foo').markRestored('4', 3300)
|
report.entry('foo').markRestored('4', 3300, 111)
|
||||||
report.entry('bar').markRequested('3').markRestored('4', 333)
|
report.entry('bar').markRequested('3').markRestored('4', 333, 1000)
|
||||||
expect(report.fullyRestored).toBe(true)
|
expect(report.fullyRestored).toBe(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -64,7 +65,7 @@ describe('caching report', () => {
|
|||||||
const report = new CacheListener()
|
const report = new CacheListener()
|
||||||
const entryReport = report.entry('foo')
|
const entryReport = report.entry('foo')
|
||||||
entryReport.markRequested('1', ['2', '3'])
|
entryReport.markRequested('1', ['2', '3'])
|
||||||
entryReport.markSaved('4', 100)
|
entryReport.markSaved('4', 100, 1000)
|
||||||
|
|
||||||
const stringRep = report.stringify()
|
const stringRep = report.stringify()
|
||||||
const reportClone: CacheListener = CacheListener.rehydrate(stringRep)
|
const reportClone: CacheListener = CacheListener.rehydrate(stringRep)
|
||||||
@@ -73,6 +74,8 @@ describe('caching report', () => {
|
|||||||
expect(entryClone.requestedKey).toBe('1')
|
expect(entryClone.requestedKey).toBe('1')
|
||||||
expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
|
expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
|
||||||
expect(entryClone.savedKey).toBe('4')
|
expect(entryClone.savedKey).toBe('4')
|
||||||
|
expect(entryClone.savedSize).toBe(100)
|
||||||
|
expect(entryClone.savedTime).toBe(1000)
|
||||||
})
|
})
|
||||||
it('with live entry report', async () => {
|
it('with live entry report', async () => {
|
||||||
const report = new CacheListener()
|
const report = new CacheListener()
|
||||||
@@ -85,7 +88,7 @@ describe('caching report', () => {
|
|||||||
|
|
||||||
// Check type and call method on rehydrated entry report
|
// Check type and call method on rehydrated entry report
|
||||||
expect(entryClone).toBeInstanceOf(CacheEntryListener)
|
expect(entryClone).toBeInstanceOf(CacheEntryListener)
|
||||||
entryClone.markSaved('4', 100)
|
entryClone.markSaved('4', 100, 1000)
|
||||||
|
|
||||||
expect(entryClone.requestedKey).toBe('1')
|
expect(entryClone.requestedKey).toBe('1')
|
||||||
expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
|
expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
|
||||||
|
|||||||
104
sources/test/jest/gradle-version.test.ts
Normal file
104
sources/test/jest/gradle-version.test.ts
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
import { describe } from 'node:test'
|
||||||
|
import { versionIsAtLeast, parseGradleVersionFromOutput } from '../../src/execution/gradle'
|
||||||
|
|
||||||
|
describe('gradle', () => {
|
||||||
|
describe('can compare version with', () => {
|
||||||
|
it('same version', async () => {
|
||||||
|
expect(versionIsAtLeast('6.7.1', '6.7.1')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('7.0', '7.0')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('7.0', '7.0.0')).toBe(true)
|
||||||
|
})
|
||||||
|
it('newer version', async () => {
|
||||||
|
expect(versionIsAtLeast('6.7.1', '6.7.2')).toBe(false)
|
||||||
|
expect(versionIsAtLeast('7.0', '8.0')).toBe(false)
|
||||||
|
expect(versionIsAtLeast('7.0', '7.0.1')).toBe(false)
|
||||||
|
})
|
||||||
|
it('older version', async () => {
|
||||||
|
expect(versionIsAtLeast('6.7.2', '6.7.1')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('8.0', '7.0')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('7.0.1', '7.0')).toBe(true)
|
||||||
|
})
|
||||||
|
it('rc version', async () => {
|
||||||
|
expect(versionIsAtLeast('8.0.2-rc-1', '8.0.1')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('8.0.2-rc-1', '8.0.2')).toBe(false)
|
||||||
|
expect(versionIsAtLeast('8.1-rc-1', '8.0')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('8.0-rc-1', '8.0')).toBe(false)
|
||||||
|
})
|
||||||
|
it('snapshot version', async () => {
|
||||||
|
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.10')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.10.1')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.11')).toBe(false)
|
||||||
|
|
||||||
|
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10.1')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10.2')).toBe(false)
|
||||||
|
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.11')).toBe(false)
|
||||||
|
|
||||||
|
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.0')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.0.1')).toBe(true)
|
||||||
|
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.1')).toBe(false)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
describe('can parse version from output', () => {
|
||||||
|
it('major version', async () => {
|
||||||
|
const output = `
|
||||||
|
------------------------------------------------------------
|
||||||
|
Gradle 8.9
|
||||||
|
------------------------------------------------------------
|
||||||
|
`
|
||||||
|
const version = await parseGradleVersionFromOutput(output)!
|
||||||
|
expect(version).toBe('8.9')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('patch version', async () => {
|
||||||
|
const output = `
|
||||||
|
------------------------------------------------------------
|
||||||
|
Gradle 8.9.1
|
||||||
|
------------------------------------------------------------
|
||||||
|
`
|
||||||
|
const version = await parseGradleVersionFromOutput(output)!
|
||||||
|
expect(version).toBe('8.9.1')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('rc version', async () => {
|
||||||
|
const output = `
|
||||||
|
------------------------------------------------------------
|
||||||
|
Gradle 8.9-rc-1
|
||||||
|
------------------------------------------------------------
|
||||||
|
`
|
||||||
|
const version = await parseGradleVersionFromOutput(output)!
|
||||||
|
expect(version).toBe('8.9-rc-1')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('milestone version', async () => {
|
||||||
|
const output = `
|
||||||
|
------------------------------------------------------------
|
||||||
|
Gradle 8.0-milestone-6
|
||||||
|
------------------------------------------------------------
|
||||||
|
`
|
||||||
|
const version = await parseGradleVersionFromOutput(output)!
|
||||||
|
expect(version).toBe('8.0-milestone-6')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('snapshot version', async () => {
|
||||||
|
const output = `
|
||||||
|
------------------------------------------------------------
|
||||||
|
Gradle 8.10.2-20240828012138+0000
|
||||||
|
------------------------------------------------------------
|
||||||
|
`
|
||||||
|
const version = await parseGradleVersionFromOutput(output)!
|
||||||
|
expect(version).toBe('8.10.2-20240828012138+0000')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('branch version', async () => {
|
||||||
|
const output = `
|
||||||
|
------------------------------------------------------------
|
||||||
|
Gradle 9.0-branch-provider_api_migration_public_api_changes-20240830060514+0000
|
||||||
|
------------------------------------------------------------
|
||||||
|
`
|
||||||
|
const version = await parseGradleVersionFromOutput(output)!
|
||||||
|
expect(version).toBe('9.0-branch-provider_api_migration_public_api_changes-20240830060514+0000')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user