mirror of
https://hub.gitmirror.com/https://github.com/gradle/actions.git
synced 2025-11-01 18:40:01 +08:00
Compare commits
No commits in common. "main" and "v4.2.2" have entirely different histories.
6
.github/actions/build-dist/action.yml
vendored
6
.github/actions/build-dist/action.yml
vendored
@ -3,9 +3,9 @@ name: 'Build and upload distribution'
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: sources/package-lock.json
|
cache-dependency-path: sources/package-lock.json
|
||||||
- name: Build distribution
|
- name: Build distribution
|
||||||
@ -23,7 +23,7 @@ runs:
|
|||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
|
|
||||||
- name: Upload distribution
|
- name: Upload distribution
|
||||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|||||||
12
.github/actions/init-integ-test/action.yml
vendored
12
.github/actions/init-integ-test/action.yml
vendored
@ -1,19 +1,13 @@
|
|||||||
name: 'Initialize integ-test'
|
name: 'Initialize integ-test'
|
||||||
|
|
||||||
inputs:
|
|
||||||
java-version:
|
|
||||||
description: 'Java version to use'
|
|
||||||
required: false
|
|
||||||
default: '17'
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: ${{ inputs.java-version }}
|
java-version: 11
|
||||||
|
|
||||||
- name: Configure environment
|
- name: Configure environment
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -23,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@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|||||||
@ -1,2 +0,0 @@
|
|||||||
# This file was generated by the Gradle 'init' task.
|
|
||||||
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
|
|
||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
12
.github/workflow-samples/gradle-plugin/gradlew
vendored
12
.github/workflow-samples/gradle-plugin/gradlew
vendored
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -86,7 +86,8 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@ -114,6 +115,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@ -171,6 +173,7 @@ fi
|
|||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if "$cygwin" || "$msys" ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
@ -203,14 +206,15 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|||||||
@ -70,10 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
60
.github/workflow-samples/gradle-plugin/plugin/build.gradle
vendored
Normal file
60
.github/workflow-samples/gradle-plugin/plugin/build.gradle
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* This file was generated by the Gradle 'init' task.
|
||||||
|
*
|
||||||
|
* This generated file contains a sample Gradle plugin project to get you started.
|
||||||
|
* For more details take a look at the Writing Custom Plugins chapter in the Gradle
|
||||||
|
* User Manual available at https://docs.gradle.org/7.3/userguide/custom_plugins.html
|
||||||
|
* This project uses @Incubating APIs which are subject to change.
|
||||||
|
*/
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
|
||||||
|
id 'java-gradle-plugin'
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
// Use Maven Central for resolving dependencies.
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
testing {
|
||||||
|
suites {
|
||||||
|
// Configure the built-in test suite
|
||||||
|
test {
|
||||||
|
// Use JUnit Jupiter test framework
|
||||||
|
useJUnitJupiter('5.7.2')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a new test suite
|
||||||
|
functionalTest(JvmTestSuite) {
|
||||||
|
dependencies {
|
||||||
|
// functionalTest test suite depends on the production code in tests
|
||||||
|
implementation(project(':plugin'))
|
||||||
|
}
|
||||||
|
|
||||||
|
targets {
|
||||||
|
all {
|
||||||
|
// This test suite should run after the built-in test suite has run its tests
|
||||||
|
testTask.configure { shouldRunAfter(test) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gradlePlugin {
|
||||||
|
// Define the plugin
|
||||||
|
plugins {
|
||||||
|
greeting {
|
||||||
|
id = 'org.example.gradle.plugin.greeting'
|
||||||
|
implementationClass = 'org.example.gradle.plugin.GradlePluginPlugin'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gradlePlugin.testSourceSets(sourceSets.functionalTest)
|
||||||
|
|
||||||
|
tasks.named('check') {
|
||||||
|
// Include functionalTest as part of the check lifecycle
|
||||||
|
dependsOn(testing.suites.functionalTest)
|
||||||
|
}
|
||||||
@ -1,40 +0,0 @@
|
|||||||
plugins {
|
|
||||||
`java-gradle-plugin`
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
testing {
|
|
||||||
suites {
|
|
||||||
val test by getting(JvmTestSuite::class) {
|
|
||||||
useJUnitJupiter()
|
|
||||||
}
|
|
||||||
|
|
||||||
val functionalTest by registering(JvmTestSuite::class) {
|
|
||||||
dependencies {
|
|
||||||
implementation(project())
|
|
||||||
}
|
|
||||||
|
|
||||||
targets {
|
|
||||||
all {
|
|
||||||
testTask.configure { shouldRunAfter(test) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gradlePlugin {
|
|
||||||
val greeting by plugins.creating {
|
|
||||||
id = "org.example.greeting"
|
|
||||||
implementationClass = "org.example.GradlePluginPlugin"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gradlePlugin.testSourceSets.add(sourceSets["functionalTest"])
|
|
||||||
|
|
||||||
tasks.named<Task>("check") {
|
|
||||||
dependsOn(testing.suites.named("functionalTest"))
|
|
||||||
}
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This source file was generated by the Gradle 'init' task
|
* This Java source file was generated by the Gradle 'init' task.
|
||||||
*/
|
*/
|
||||||
package org.example;
|
package org.example.gradle.plugin;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -15,7 +15,7 @@ import org.junit.jupiter.api.io.TempDir;
|
|||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple functional test for the 'org.example.greeting' plugin.
|
* A simple functional test for the 'org.example.gradle.plugin.greeting' plugin.
|
||||||
*/
|
*/
|
||||||
class GradlePluginPluginFunctionalTest {
|
class GradlePluginPluginFunctionalTest {
|
||||||
@TempDir
|
@TempDir
|
||||||
@ -29,23 +29,24 @@ class GradlePluginPluginFunctionalTest {
|
|||||||
return new File(projectDir, "settings.gradle");
|
return new File(projectDir, "settings.gradle");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test void canRunTask() throws IOException {
|
@Test void canRunTaskWithGradle691() throws IOException {
|
||||||
writeString(getSettingsFile(), "");
|
writeString(getSettingsFile(), "");
|
||||||
writeString(getBuildFile(),
|
writeString(getBuildFile(),
|
||||||
"plugins {" +
|
"plugins {" +
|
||||||
" id('org.example.greeting')" +
|
" id('org.example.gradle.plugin.greeting')" +
|
||||||
"}");
|
"}");
|
||||||
|
|
||||||
// Run the build
|
// Run the build
|
||||||
GradleRunner runner = GradleRunner.create();
|
GradleRunner runner = GradleRunner.create();
|
||||||
runner.forwardOutput();
|
runner.forwardOutput();
|
||||||
|
runner.withGradleVersion("6.9.1");
|
||||||
runner.withPluginClasspath();
|
runner.withPluginClasspath();
|
||||||
runner.withArguments("greeting");
|
runner.withArguments("greeting");
|
||||||
runner.withProjectDir(projectDir);
|
runner.withProjectDir(projectDir);
|
||||||
BuildResult result = runner.build();
|
BuildResult result = runner.build();
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
assertTrue(result.getOutput().contains("Hello from plugin 'org.example.greeting'"));
|
assertTrue(result.getOutput().contains("Hello from plugin 'org.example.gradle.plugin.greeting'"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeString(File file, String string) throws IOException {
|
private void writeString(File file, String string) throws IOException {
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This source file was generated by the Gradle 'init' task
|
* This Java source file was generated by the Gradle 'init' task.
|
||||||
*/
|
*/
|
||||||
package org.example;
|
package org.example.gradle.plugin;
|
||||||
|
|
||||||
import org.gradle.api.Project;
|
import org.gradle.api.Project;
|
||||||
import org.gradle.api.Plugin;
|
import org.gradle.api.Plugin;
|
||||||
@ -13,7 +13,7 @@ public class GradlePluginPlugin implements Plugin<Project> {
|
|||||||
public void apply(Project project) {
|
public void apply(Project project) {
|
||||||
// Register a task
|
// Register a task
|
||||||
project.getTasks().register("greeting", task -> {
|
project.getTasks().register("greeting", task -> {
|
||||||
task.doLast(s -> System.out.println("Hello from plugin 'org.example.greeting'"));
|
task.doLast(s -> System.out.println("Hello from plugin 'org.example.gradle.plugin.greeting'"));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This source file was generated by the Gradle 'init' task
|
* This Java source file was generated by the Gradle 'init' task.
|
||||||
*/
|
*/
|
||||||
package org.example;
|
package org.example.gradle.plugin;
|
||||||
|
|
||||||
import org.gradle.testfixtures.ProjectBuilder;
|
import org.gradle.testfixtures.ProjectBuilder;
|
||||||
import org.gradle.api.Project;
|
import org.gradle.api.Project;
|
||||||
@ -9,13 +9,13 @@ import org.junit.jupiter.api.Test;
|
|||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple unit test for the 'org.example.greeting' plugin.
|
* A simple unit test for the 'org.example.gradle.plugin.greeting' plugin.
|
||||||
*/
|
*/
|
||||||
class GradlePluginPluginTest {
|
class GradlePluginPluginTest {
|
||||||
@Test void pluginRegistersATask() {
|
@Test void pluginRegistersATask() {
|
||||||
// Create a test project and apply the plugin
|
// Create a test project and apply the plugin
|
||||||
Project project = ProjectBuilder.builder().build();
|
Project project = ProjectBuilder.builder().build();
|
||||||
project.getPlugins().apply("org.example.greeting");
|
project.getPlugins().apply("org.example.gradle.plugin.greeting");
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
assertNotNull(project.getTasks().findByName("greeting"));
|
assertNotNull(project.getTasks().findByName("greeting"));
|
||||||
12
.github/workflow-samples/gradle-plugin/settings.gradle
vendored
Normal file
12
.github/workflow-samples/gradle-plugin/settings.gradle
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/*
|
||||||
|
* This file was generated by the Gradle 'init' task.
|
||||||
|
*
|
||||||
|
* The settings file is used to specify which projects to include in your build.
|
||||||
|
*
|
||||||
|
* Detailed information about configuring a multi-project build in Gradle can be found
|
||||||
|
* in the user manual at https://docs.gradle.org/7.3/userguide/multi_project_builds.html
|
||||||
|
* This project uses @Incubating APIs which are subject to change.
|
||||||
|
*/
|
||||||
|
|
||||||
|
rootProject.name = 'gradle-plugin'
|
||||||
|
include('plugin')
|
||||||
@ -1,2 +0,0 @@
|
|||||||
rootProject.name = "gradle-plugin-2"
|
|
||||||
include("plugin")
|
|
||||||
@ -6,12 +6,8 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
testing {
|
dependencies {
|
||||||
suites {
|
testImplementation('junit:junit:4.13.2')
|
||||||
test {
|
|
||||||
useJUnit()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("test").configure {
|
tasks.named("test").configure {
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
12
.github/workflow-samples/groovy-dsl/gradlew
vendored
12
.github/workflow-samples/groovy-dsl/gradlew
vendored
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -86,7 +86,8 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@ -114,6 +115,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@ -171,6 +173,7 @@ fi
|
|||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if "$cygwin" || "$msys" ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
@ -203,14 +206,15 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|||||||
@ -70,10 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "4.2.2"
|
id "com.gradle.develocity" version "3.19"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
id 'java'
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
@ -12,10 +12,6 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
testing {
|
dependencies {
|
||||||
suites {
|
testImplementation('junit:junit:4.13.2')
|
||||||
val test by getting(JvmTestSuite::class) {
|
}
|
||||||
useJUnit()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
12
.github/workflow-samples/java-toolchain/gradlew
vendored
12
.github/workflow-samples/java-toolchain/gradlew
vendored
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -86,7 +86,8 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@ -114,6 +115,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@ -171,6 +173,7 @@ fi
|
|||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if "$cygwin" || "$msys" ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
@ -203,14 +206,15 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|||||||
@ -70,10 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
5
.github/workflow-samples/java-toolchain/settings.gradle
vendored
Normal file
5
.github/workflow-samples/java-toolchain/settings.gradle
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
plugins {
|
||||||
|
id("org.gradle.toolchains.foojay-resolver-convention") version("0.7.0")
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = 'basic'
|
||||||
@ -1,6 +0,0 @@
|
|||||||
plugins {
|
|
||||||
// Apply the foojay-resolver plugin to allow automatic download of JDKs
|
|
||||||
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = "java-toolchains"
|
|
||||||
@ -8,15 +8,13 @@ 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.5.0-jre")
|
implementation("com.google.guava:guava:33.4.0-jre")
|
||||||
|
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
|
||||||
}
|
}
|
||||||
|
|
||||||
testing {
|
tasks.test {
|
||||||
suites {
|
useJUnitPlatform()
|
||||||
val test by getting(JvmTestSuite::class) {
|
|
||||||
useJUnitJupiter()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("test").configure {
|
tasks.named("test").configure {
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
12
.github/workflow-samples/kotlin-dsl/gradlew
vendored
12
.github/workflow-samples/kotlin-dsl/gradlew
vendored
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -86,7 +86,8 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@ -114,6 +115,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@ -171,6 +173,7 @@ fi
|
|||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if "$cygwin" || "$msys" ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
@ -203,14 +206,15 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|||||||
@ -70,10 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.gradle.develocity") version "4.2.2"
|
id("com.gradle.develocity") version "3.19"
|
||||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.4.0"
|
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 "4.2.2"
|
id "com.gradle.develocity" version "3.19"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "4.2.2"
|
id "com.gradle.develocity" version "3.19"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "4.2.2"
|
id "com.gradle.develocity" version "3.19"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
24
.github/workflows/ci-check-and-unit-test.yml
vendored
24
.github/workflows/ci-check-and-unit-test.yml
vendored
@ -15,43 +15,29 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
check-format-and-unit-test:
|
check-format-and-unit-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
- 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
|
- name: Setup Gradle
|
||||||
# Use a released version to avoid breakages
|
# Use a released version to avoid breakages
|
||||||
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
|
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
|
||||||
env:
|
env:
|
||||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||||
with:
|
with:
|
||||||
gradle-version: '8.14.2'
|
gradle-version: "8.11.1"
|
||||||
|
|
||||||
- name: Install npm dependencies
|
|
||||||
run: |
|
|
||||||
npm clean-install
|
|
||||||
working-directory: sources
|
|
||||||
|
|
||||||
- name: Check formatting and compile
|
- name: Check formatting and compile
|
||||||
run: |
|
run: |
|
||||||
|
npm clean-install
|
||||||
npm run check
|
npm run check
|
||||||
npm run compile
|
npm run compile
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
env:
|
|
||||||
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
|
|
||||||
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
|
||||||
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: |
|
run: |
|
||||||
npm test
|
npm test
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
env:
|
|
||||||
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
|
|
||||||
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
|
||||||
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
|
||||||
|
|||||||
@ -15,13 +15,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
|
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45.0.5
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
dist/**
|
dist/**
|
||||||
|
|||||||
6
.github/workflows/ci-codeql.yml
vendored
6
.github/workflows/ci-codeql.yml
vendored
@ -31,11 +31,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
|
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
config: |
|
config: |
|
||||||
@ -43,4 +43,4 @@ jobs:
|
|||||||
- sources/src
|
- sources/src
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
|
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
|
||||||
|
|||||||
24
.github/workflows/ci-combine-bot-prs.yml
vendored
Normal file
24
.github/workflows/ci-combine-bot-prs.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Combine Bot PRs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
combine-wrapperbot-prs:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
checks: read
|
||||||
|
if: github.repository == 'gradle/actions'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: combine-wrapperbot-prs
|
||||||
|
uses: github/combine-prs@2909f404763c3177a456e052bdb7f2e85d3a7cb3 # v5.2.0
|
||||||
|
with:
|
||||||
|
branch_prefix: wrapperbot
|
||||||
|
combine_branch_name: wrapperbot/combined-wrapper-updates
|
||||||
|
pr_title: 'Bump Gradle Wrappers'
|
||||||
|
ci_required: "false"
|
||||||
8
.github/workflows/ci-init-script-check.yml
vendored
8
.github/workflows/ci-init-script-check.yml
vendored
@ -22,15 +22,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 11
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
# Use a released version to avoid breakages
|
# Use a released version to avoid breakages
|
||||||
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
|
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
|
||||||
env:
|
env:
|
||||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
|
|||||||
2
.github/workflows/ci-integ-test-full.yml
vendored
2
.github/workflows/ci-integ-test-full.yml
vendored
@ -3,8 +3,6 @@ name: CI-integ-test-full
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- 'main'
|
|
||||||
paths:
|
paths:
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/ci-integ-test.yml
vendored
2
.github/workflows/ci-integ-test.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|||||||
8
.github/workflows/ci-ossf-scorecard.yml
vendored
8
.github/workflows/ci-ossf-scorecard.yml
vendored
@ -21,13 +21,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout code'
|
- name: 'Checkout code'
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
||||||
- name: 'Run analysis'
|
- name: 'Run analysis'
|
||||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||||
with:
|
with:
|
||||||
results_file: results.sarif
|
results_file: results.sarif
|
||||||
results_format: sarif
|
results_format: sarif
|
||||||
@ -44,7 +44,7 @@ jobs:
|
|||||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||||
# format to the repository Actions tab.
|
# format to the repository Actions tab.
|
||||||
- name: 'Upload artifact'
|
- name: 'Upload artifact'
|
||||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||||
with:
|
with:
|
||||||
name: SARIF file
|
name: SARIF file
|
||||||
path: results.sarif
|
path: results.sarif
|
||||||
@ -52,6 +52,6 @@ jobs:
|
|||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: 'Upload to code-scanning'
|
- name: 'Upload to code-scanning'
|
||||||
uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
|
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
33
.github/workflows/ci-update-dist.yml
vendored
33
.github/workflows/ci-update-dist.yml
vendored
@ -3,9 +3,8 @@ name: CI-update-dist
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
- 'prerelease/**'
|
|
||||||
- 'release/**'
|
- 'release/**'
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
@ -23,53 +22,33 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- 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@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
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: Install npm dependencies
|
|
||||||
run: |
|
|
||||||
npm clean-install
|
|
||||||
working-directory: sources
|
|
||||||
|
|
||||||
- name: Build distribution
|
- name: Build distribution
|
||||||
run: |
|
run: |
|
||||||
|
npm clean-install
|
||||||
npm run check
|
npm run check
|
||||||
npm run compile
|
npm run compile
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
env:
|
|
||||||
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
|
|
||||||
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
|
||||||
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
|
||||||
|
|
||||||
- name: Copy the generated sources/dist directory to the top-level dist
|
- name: Copy the generated sources/dist directory to the top-level dist
|
||||||
run: |
|
run: |
|
||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
|
|
||||||
- name: Import GPG key to sign commits
|
|
||||||
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
|
|
||||||
with:
|
|
||||||
gpg_private_key: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
|
|
||||||
passphrase: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
|
|
||||||
git_user_signingkey: true
|
|
||||||
git_commit_gpgsign: true
|
|
||||||
git_config_global: true
|
|
||||||
|
|
||||||
# Commit and push changes; has no effect if the files did not change
|
# Commit and push changes; has no effect if the files did not change
|
||||||
# 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
|
||||||
uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
|
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
|
||||||
with:
|
with:
|
||||||
commit_author: bot-githubaction <bot-githubaction@gradle.com>
|
|
||||||
commit_user_name: bot-githubaction
|
|
||||||
commit_user_email: bot-githubaction@gradle.com
|
|
||||||
commit_message: '[bot] Update dist directory'
|
commit_message: '[bot] Update dist directory'
|
||||||
file_pattern: dist
|
file_pattern: dist
|
||||||
|
|||||||
4
.github/workflows/ci-validate-wrappers.yml
vendored
4
.github/workflows/ci-validate-wrappers.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
validation:
|
validation:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
|
- uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
|
||||||
with:
|
with:
|
||||||
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||||
|
|||||||
10
.github/workflows/demo-job-summary.yml
vendored
10
.github/workflows/demo-job-summary.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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,7 +42,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -25,27 +25,14 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '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)}}
|
||||||
include:
|
|
||||||
- java-version: 17
|
|
||||||
- gradle: '8.14.3'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '7.6.2'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '6.9.4'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '5.6.4'
|
|
||||||
java-version: 11
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java-version }}
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
@ -54,15 +41,15 @@ jobs:
|
|||||||
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
|
||||||
gradle-version: ${{ matrix.gradle }}
|
gradle-version: ${{ matrix.gradle }}
|
||||||
build-scan-publish: true
|
build-scan-publish: true
|
||||||
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
|
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
|
||||||
build-scan-terms-of-use-agree: 'yes'
|
build-scan-terms-of-use-agree: "yes"
|
||||||
- name: Run Gradle build
|
- name: Run Gradle build
|
||||||
id: gradle
|
id: gradle
|
||||||
working-directory: .github/workflow-samples/no-ge
|
working-directory: .github/workflow-samples/no-ge
|
||||||
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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
.github/workflows/integ-test-caching-config.yml
vendored
17
.github/workflows/integ-test-caching-config.yml
vendored
@ -30,11 +30,10 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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 Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
@ -62,7 +61,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -91,7 +90,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -105,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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@ -115,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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -129,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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@ -146,7 +145,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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,7 +169,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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 +45,7 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ jobs:
|
|||||||
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -153,40 +153,3 @@ jobs:
|
|||||||
ls -l dependency-graph-reports
|
ls -l dependency-graph-reports
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-graph-generate-submit-and-upload:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
runs-on: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
- name: Initialize integ-test
|
|
||||||
uses: ./.github/actions/init-integ-test
|
|
||||||
|
|
||||||
- name: Setup Gradle for dependency-graph generate
|
|
||||||
uses: ./setup-gradle
|
|
||||||
with:
|
|
||||||
dependency-graph: generate-submit-and-upload
|
|
||||||
- name: Run gradle build
|
|
||||||
id: gradle-build
|
|
||||||
run: ./gradlew build
|
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
|
||||||
|
|
||||||
dependency-graph-generate-submit-and-upload-check:
|
|
||||||
needs: [dependency-graph-generate-submit-and-upload]
|
|
||||||
runs-on: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- name: Download dependency-graph artifact
|
|
||||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
|
||||||
with:
|
|
||||||
path: downloaded-dependency-graphs
|
|
||||||
pattern: dependency-graph_*dependency-graph-generate-submit-and-upload.json
|
|
||||||
- name: Check for downloaded dependency graphs
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
ls -A "${{ github.workspace }}/downloaded-dependency-graphs"
|
|
||||||
if [ -z "$(ls -A "${{ github.workspace }}/downloaded-dependency-graphs")" ]; then
|
|
||||||
echo "No dependency graph files found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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 +63,7 @@ jobs:
|
|||||||
id: gradle-build
|
id: gradle-build
|
||||||
uses: ./dependency-submission
|
uses: ./dependency-submission
|
||||||
with:
|
with:
|
||||||
gradle-version: '7.0.1'
|
gradle-version: 7.0.1
|
||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Check step failed
|
- name: Check step failed
|
||||||
@ -86,7 +86,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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,7 +124,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ jobs:
|
|||||||
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -231,35 +231,19 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
gradle: ['9.0.0', '8.14.3', '8.0.2', '7.6.4', '7.1.1', '6.9.4', '6.0.1', '5.6.4', '5.2.1']
|
gradle: [8.0.2, 7.6.4, 7.1.1, 6.9.4, 6.0.1, 5.6.4, 5.2.1]
|
||||||
include:
|
include:
|
||||||
- java-version: 17
|
- gradle: 5.6.4
|
||||||
- gradle: '8.14.3'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '8.0.2'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '7.6.4'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '7.1.1'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '6.9.4'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '6.0.1'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '5.6.4'
|
|
||||||
java-version: 11
|
|
||||||
build-root-suffix: -gradle-5
|
build-root-suffix: -gradle-5
|
||||||
- gradle: '5.2.1'
|
- gradle: 5.2.1
|
||||||
java-version: 11
|
|
||||||
build-root-suffix: -gradle-5
|
build-root-suffix: -gradle-5
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java-version }}
|
|
||||||
- name: Generate and submit dependencies
|
- name: Generate and submit dependencies
|
||||||
uses: ./dependency-submission
|
uses: ./dependency-submission
|
||||||
with:
|
with:
|
||||||
@ -272,7 +256,7 @@ jobs:
|
|||||||
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -309,7 +293,7 @@ jobs:
|
|||||||
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -350,7 +334,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -382,7 +366,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -401,7 +385,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
run: |
|
run: |
|
||||||
grep -q 'Eclipse Temurin JDK 8' output.txt || (echo "::error::Did not detect preinstalled JDK 8" && exit 1)
|
grep -q 'Eclipse Temurin JDK 1.8' output.txt || (echo "::error::Did not detect preinstalled JDK 1.8" && exit 1)
|
||||||
grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
|
grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
|
||||||
grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
|
grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
|
||||||
grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
|
grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
|
||||||
@ -60,20 +60,20 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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 16
|
|
||||||
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
|
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: 16
|
|
||||||
- name: Setup Java 20
|
- name: Setup Java 20
|
||||||
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 20
|
java-version: 20
|
||||||
|
- name: Setup Java 16
|
||||||
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: 16
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
- name: List detected toolchains
|
- name: List detected toolchains
|
||||||
@ -92,7 +92,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
run: |
|
run: |
|
||||||
grep -q 'Eclipse Temurin JDK 8' output.txt || (echo "::error::Did not detect preinstalled JDK 8" && exit 1)
|
grep -q 'Eclipse Temurin JDK 1.8' output.txt || (echo "::error::Did not detect preinstalled JDK 1.8" && exit 1)
|
||||||
grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
|
grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
|
||||||
grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
|
grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
|
||||||
grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
|
grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
|
||||||
|
|||||||
114
.github/workflows/integ-test-inject-develocity.yml
vendored
114
.github/workflows/integ-test-inject-develocity.yml
vendored
@ -25,41 +25,31 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
inject-develocity:
|
inject-develocity:
|
||||||
|
env:
|
||||||
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
|
DEVELOCITY_URL: https://ge.solutions-team.gradle.com
|
||||||
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
|
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
|
||||||
|
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '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', '4.2.2']
|
plugin-version: [3.16.2, 3.19]
|
||||||
include:
|
include:
|
||||||
- java-version: 17
|
- plugin-version: 3.16.2
|
||||||
- gradle: '8.14.3'
|
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
||||||
java-version: 11
|
- plugin-version: 3.19
|
||||||
- gradle: '7.6.2'
|
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
||||||
java-version: 11
|
|
||||||
- gradle: '6.9.4'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '5.6.4'
|
|
||||||
java-version: 11
|
|
||||||
- plugin-version: '3.16.2'
|
|
||||||
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
|
||||||
- plugin-version: '4.2.2'
|
|
||||||
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
env:
|
|
||||||
DEVELOCITY_INJECTION_ENABLED: true
|
|
||||||
DEVELOCITY_INJECTION_URL: https://ge.solutions-team.gradle.com
|
|
||||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
|
||||||
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1'
|
|
||||||
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java-version }}
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@ -72,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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@ -84,33 +74,21 @@ jobs:
|
|||||||
inject-develocity-with-access-key:
|
inject-develocity-with-access-key:
|
||||||
env:
|
env:
|
||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_INJECTION_URL: 'https://ge.solutions-team.gradle.com'
|
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
||||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1'
|
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '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', '4.2.2']
|
plugin-version: [3.16.2, 3.19]
|
||||||
include:
|
|
||||||
- java-version: 17
|
|
||||||
- gradle: '8.14.3'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '7.6.2'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '6.9.4'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '5.6.4'
|
|
||||||
java-version: 11
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java-version }}
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@ -129,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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@ -137,41 +115,29 @@ jobs:
|
|||||||
inject-develocity-short-lived-token-failed:
|
inject-develocity-short-lived-token-failed:
|
||||||
env:
|
env:
|
||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_INJECTION_URL: 'https://localhost:3333/'
|
DEVELOCITY_URL: 'https://localhost:3333/'
|
||||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.1'
|
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 }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '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', '4.2.2' ]
|
plugin-version: [ 3.16.2, 3.19 ]
|
||||||
include:
|
|
||||||
- java-version: 17
|
|
||||||
- gradle: '8.14.3'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '7.6.2'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '6.9.4'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '5.6.4'
|
|
||||||
java-version: 11
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java-version }}
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
gradle-version: ${{ matrix.gradle }}
|
|
||||||
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
|
||||||
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||||
- name: Run Gradle build
|
- name: Run Gradle build
|
||||||
@ -189,27 +155,15 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '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', '4.2.2' ]
|
plugin-version: [ 3.16.2, 3.19 ]
|
||||||
include:
|
|
||||||
- java-version: 17
|
|
||||||
- gradle: '8.14.3'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '7.6.2'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '6.9.4'
|
|
||||||
java-version: 11
|
|
||||||
- gradle: '5.6.4'
|
|
||||||
java-version: 11
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java-version }}
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@ -225,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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
@ -33,33 +33,25 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: '11'
|
|
||||||
|
|
||||||
- name: Setup Gradle with v6.9
|
- name: Setup Gradle with v6.9
|
||||||
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
|
||||||
gradle-version: '6.9'
|
gradle-version: 6.9
|
||||||
- name: Test uses Gradle v6.9
|
- name: Test uses Gradle v6.9
|
||||||
working-directory: .github/workflow-samples/no-wrapper
|
working-directory: .github/workflow-samples/no-wrapper
|
||||||
run: gradle help "-DgradleVersionCheck=6.9"
|
run: gradle help "-DgradleVersionCheck=6.9"
|
||||||
- name: Setup Gradle with v7.1.1
|
- name: Setup Gradle with v7.1.1
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
gradle-version: '7.1.1'
|
gradle-version: 7.1.1
|
||||||
- name: Test uses Gradle v7.1.1
|
- name: Test uses Gradle v7.1.1
|
||||||
working-directory: .github/workflow-samples/no-wrapper
|
working-directory: .github/workflow-samples/no-wrapper
|
||||||
run: gradle help "-DgradleVersionCheck=7.1.1"
|
run: gradle help "-DgradleVersionCheck=7.1.1"
|
||||||
# Configure JDK 17 for Gradle 9 and later
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle with release-candidate
|
- name: Setup Gradle with release-candidate
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
@ -76,41 +68,39 @@ jobs:
|
|||||||
working-directory: .github/workflow-samples/no-wrapper
|
working-directory: .github/workflow-samples/no-wrapper
|
||||||
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 , '9.') }}
|
if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '8.') }}
|
||||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
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 }}"')
|
||||||
|
|
||||||
provision-gradle-version:
|
provision-gradle-version:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: ['9.0.0', '8.14.2', '8.12', '8.12-rc-1', '8.9', '8.1', '7.6.4', '6.9.4', '5.6.4', '4.10.3', '3.5.1']
|
gradle: ["8.11.1", 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
|
||||||
- gradle: '9.0.0'
|
- gradle: 5.6.4
|
||||||
java-version: 17
|
|
||||||
- gradle: '5.6.4'
|
|
||||||
build-root-suffix: -gradle-5
|
build-root-suffix: -gradle-5
|
||||||
- gradle: '4.10.3'
|
- gradle: 4.10.3
|
||||||
build-root-suffix: -gradle-4
|
build-root-suffix: -gradle-4
|
||||||
- gradle: '3.5.1'
|
- gradle: 3.5.1
|
||||||
build-root-suffix: -gradle-4
|
build-root-suffix: -gradle-4
|
||||||
java-version: 8
|
java-version: 8
|
||||||
exclude:
|
exclude:
|
||||||
- os: macos-latest # Java 8 is not supported on macos-latest, so we cannot test Gradle 3.5.1
|
- os: macos-latest # Java 8 is not supported on macos-latest, so we cannot test Gradle 3.5.1
|
||||||
gradle: '3.5.1'
|
gradle: 3.5.1
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
@ -122,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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
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 }}"')
|
||||||
@ -132,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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
@ -35,7 +35,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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 +98,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ jobs:
|
|||||||
container: fedora:latest
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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,7 +42,7 @@ jobs:
|
|||||||
container: fedora:latest
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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,7 +44,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -30,11 +30,9 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@ -55,11 +53,9 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
|
|||||||
@ -30,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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 +52,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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 +52,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
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
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.2.2 # 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
|
||||||
|
|||||||
2
.github/workflows/update-checksums-file.js
vendored
2
.github/workflows/update-checksums-file.js
vendored
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
const httpm = require('../../sources/node_modules/@actions/http-client')
|
const httpm = require('../../sources/node_modules/typed-rest-client/HttpClient')
|
||||||
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
|||||||
17
.github/workflows/update-checksums-file.yml
vendored
17
.github/workflows/update-checksums-file.yml
vendored
@ -19,10 +19,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
@ -37,22 +37,11 @@ jobs:
|
|||||||
run: node ../.github/workflows/update-checksums-file.js
|
run: node ../.github/workflows/update-checksums-file.js
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
|
|
||||||
- name: Import GPG key to sign commits
|
|
||||||
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
|
|
||||||
with:
|
|
||||||
gpg_private_key: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
|
|
||||||
passphrase: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
|
|
||||||
git_user_signingkey: true
|
|
||||||
git_commit_gpgsign: true
|
|
||||||
git_config_global: true
|
|
||||||
|
|
||||||
# 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@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
|
||||||
with:
|
with:
|
||||||
branch: bot/wrapper-checksums-update
|
branch: bot/wrapper-checksums-update
|
||||||
author: bot-githubaction <bot-githubaction@gradle.com>
|
|
||||||
committer: bot-githubaction <bot-githubaction@gradle.com>
|
|
||||||
commit-message: Update known wrapper checksums
|
commit-message: Update known wrapper checksums
|
||||||
title: Update known wrapper checksums
|
title: Update known wrapper checksums
|
||||||
# Note: Unfortunately this action cannot trigger the regular workflows for the PR automatically, see
|
# Note: Unfortunately this action cannot trigger the regular workflows for the PR automatically, see
|
||||||
|
|||||||
@ -32,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@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
@ -70,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@v5
|
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.
|
||||||
@ -99,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@v5
|
- 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.
|
||||||
|
|||||||
11
RELEASING.md
11
RELEASING.md
@ -11,17 +11,16 @@
|
|||||||
- 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 `v5.0.0`
|
- Create a tag for the release. The tag should have the format `v4.1.0`
|
||||||
- From CLI: `git tag -s -m "v5.0.0" v5.0.0 && git push --tags`
|
- From CLI: `git tag v4.1.0 && git push --tags`
|
||||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
|
||||||
- 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 `v5` 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 -s -a -m "v5.0.0" v5 v5.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 sign the tag and 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.
|
||||||
|
|
||||||
## Post release steps
|
## Post release steps
|
||||||
|
|
||||||
|
|||||||
10
build
10
build
@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
cd sources
|
cd sources
|
||||||
|
|
||||||
if [[ -f ~/.gradle/develocity/keys.properties ]]; then
|
|
||||||
export NODE_OPTIONS='-r @gradle-tech/develocity-agent/preload'
|
|
||||||
export DEVELOCITY_URL=https://ge.solutions-team.gradle.com
|
|
||||||
export DEVELOCITY_ACCESS_KEY=$(paste -sd ';' ~/.gradle/develocity/keys.properties)
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
all)
|
all)
|
||||||
npm run all
|
npm run all
|
||||||
@ -36,10 +30,6 @@ case "$1" in
|
|||||||
npm clean-install
|
npm clean-install
|
||||||
npm run build
|
npm run build
|
||||||
;;
|
;;
|
||||||
test)
|
|
||||||
shift
|
|
||||||
npm test -- $@
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
npm run build
|
npm run build
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -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@v5
|
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.
|
||||||
|
|||||||
@ -96,20 +96,17 @@ inputs:
|
|||||||
# Dependency Graph configuration
|
# Dependency Graph configuration
|
||||||
dependency-graph:
|
dependency-graph:
|
||||||
description: |
|
description: |
|
||||||
Specifies how the dependency-graph should be handled by this action.
|
Specifies how the dependency-graph should be handled by this action. By default a dependency-graph will be generated and submitted.
|
||||||
By default a dependency-graph will be generated, submitted to the dependency-submission API, and saved as a workflow artifact.
|
|
||||||
Valid values are:
|
Valid values are:
|
||||||
'generate-and-submit': Generates a dependency graph for the project and submits it in the same Job.
|
'generate-and-submit' (default): Generates a dependency graph for the project and submits it in the same Job.
|
||||||
'generate-submit-and-upload (default)': As per 'generate-and-submit', but also saves the dependency graph as a workflow artifact.
|
'generate-and-upload': Generates a dependency graph for the project and saves it as a workflow artifact.
|
||||||
'generate-and-upload': Generates a dependency graph for the project and saves it as a workflow artifact. Does not submit it to the repository.
|
|
||||||
'download-and-submit': Retrieves a previously saved dependency-graph and submits it to the repository.
|
'download-and-submit': Retrieves a previously saved dependency-graph and submits it to the repository.
|
||||||
|
|
||||||
Use `generate-and-submit` if you prefer not to save the dependency-graph as a workflow artifact.
|
|
||||||
The `generate-and-upload` and `download-and-submit` options are designed to be used in an untrusted workflow scenario,
|
The `generate-and-upload` and `download-and-submit` options are designed to be used in an untrusted workflow scenario,
|
||||||
where the workflow generating the dependency-graph cannot (or should not) be given the `contents: write` permissions
|
where the workflow generating the dependency-graph cannot (or should not) be given the `contents: write` permissions
|
||||||
required to submit via the Dependency Submission API.
|
required to submit via the Dependency Submission API.
|
||||||
required: false
|
required: false
|
||||||
default: 'generate-submit-and-upload'
|
default: 'generate-and-submit'
|
||||||
|
|
||||||
dependency-graph-report-dir:
|
dependency-graph-report-dir:
|
||||||
description: |
|
description: |
|
||||||
@ -150,6 +147,7 @@ inputs:
|
|||||||
artifact-retention-days:
|
artifact-retention-days:
|
||||||
description: Specifies the number of days to retain any artifacts generated by the action. If not set, the default retention settings for the repository will apply.
|
description: Specifies the number of days to retain any artifacts generated by the action. If not set, the default retention settings for the repository will apply.
|
||||||
required: false
|
required: false
|
||||||
|
default: 1
|
||||||
|
|
||||||
# Build Scan configuration
|
# Build Scan configuration
|
||||||
build-scan-publish:
|
build-scan-publish:
|
||||||
@ -222,7 +220,7 @@ outputs:
|
|||||||
description: Version of Gradle that was setup by the action
|
description: Version of Gradle that was setup by the action
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node24'
|
using: 'node20'
|
||||||
main: '../dist/dependency-submission/main/index.js'
|
main: '../dist/dependency-submission/main/index.js'
|
||||||
post: '../dist/dependency-submission/post/index.js'
|
post: '../dist/dependency-submission/post/index.js'
|
||||||
|
|
||||||
|
|||||||
142229
dist/dependency-submission/main/index.js
vendored
142229
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
128084
dist/dependency-submission/post/index.js
vendored
128084
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
142229
dist/setup-gradle/main/index.js
vendored
142229
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
142229
dist/setup-gradle/post/index.js
vendored
142229
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
119611
dist/wrapper-validation/main/index.js
vendored
119611
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@v5
|
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@v5
|
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,10 +83,10 @@ 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@v5
|
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
|
||||||
|
|
||||||
# The gradle project is not in the root of the repository.
|
# The gradle project is not in the root of the repository.
|
||||||
build-root-directory: my-gradle-project
|
build-root-directory: my-gradle-project
|
||||||
@ -103,9 +103,6 @@ In some cases, the default action configuration will not be sufficient, and addi
|
|||||||
# Do not attempt to submit the dependency-graph. Save it as a workflow artifact.
|
# Do not attempt to submit the dependency-graph. Save it as a workflow artifact.
|
||||||
dependency-graph: generate-and-upload
|
dependency-graph: generate-and-upload
|
||||||
|
|
||||||
# Change the number of days that workflow artifacts are retained. (Default is 30 days).
|
|
||||||
artifact-retention-days: 5
|
|
||||||
|
|
||||||
# Specify the location where dependency graph files will be generated.
|
# Specify the location where dependency graph files will be generated.
|
||||||
dependency-graph-report-dir: custom-report-dir
|
dependency-graph-report-dir: custom-report-dir
|
||||||
|
|
||||||
@ -121,29 +118,6 @@ The `GitHub Dependency Graph Gradle Plugin` can be further
|
|||||||
These will be automatically set by the `dependency-submission` action, but you may override these values
|
These will be automatically set by the `dependency-submission` action, but you may override these values
|
||||||
by setting them explicitly in your workflow file.
|
by setting them explicitly in your workflow file.
|
||||||
|
|
||||||
### Reducing storage costs for saved dependency graph artifacts
|
|
||||||
|
|
||||||
By default, the dependency graph that is generated is stored as a workflow artifact.
|
|
||||||
To reduce storage costs for these artifacts, you can:
|
|
||||||
|
|
||||||
1. Set the `artifact-retention-days`:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Generate dependency graph but only store workflow artifacts for 1 day
|
|
||||||
uses: gradle/actions/dependency-submission@v5
|
|
||||||
with:
|
|
||||||
artifact-retention-days: 1 # Default is 30 days or as configured for repository
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Disable storing dependency-graph artifacts using `generate-and-submit`
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Generate and submit dependency graph but do not store as workflow artifact
|
|
||||||
uses: gradle/actions/dependency-submission@v5
|
|
||||||
with:
|
|
||||||
dependency-graph: 'generate-and-submit' # Default value is 'generate-submit-and-upload'
|
|
||||||
```
|
|
||||||
|
|
||||||
# Resolving a dependency vulnerability
|
# Resolving a dependency vulnerability
|
||||||
|
|
||||||
## Finding the source of a dependency vulnerability
|
## Finding the source of a dependency vulnerability
|
||||||
@ -299,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@v5
|
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-projects: ':buildSrc'
|
dependency-graph-exclude-projects: ':buildSrc'
|
||||||
@ -321,19 +295,12 @@ The GitHub [dependency-review-action](https://github.com/actions/dependency-revi
|
|||||||
understand dependency changes (and the security impact of these changes) for a pull request,
|
understand dependency changes (and the security impact of these changes) for a pull request,
|
||||||
by comparing the dependency graph for the pull-request with that of the HEAD commit.
|
by comparing the dependency graph for the pull-request with that of the HEAD commit.
|
||||||
|
|
||||||
Integrating the Dependency Review Action requires 2 changes to your workflows:
|
Example of a pull request workflow that executes a build for a pull request and runs the `dependency-review-action`:
|
||||||
|
|
||||||
#### 1. Add a `pull_request` trigger to your existing Dependency Submission workflow.
|
|
||||||
|
|
||||||
In order to perform Dependency Review on a pull request, the dependency graph must be submitted for the pull request.
|
|
||||||
To do this, simply add a `pull_request` trigger to your existing dependency submission workflow.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: Dependency Submission
|
name: Dependency review for pull requests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [ 'main' ]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@ -350,38 +317,12 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v4
|
||||||
```
|
|
||||||
|
|
||||||
#### 2. Add a dedicated Dependency Review workflow
|
- name: Perform dependency review
|
||||||
|
|
||||||
The Dependency Review workflow will be triggered directly on `pull_request`, but will wait until the dependency graph results are
|
|
||||||
submitted before the dependency review can complete. The period to wait is controlled by the `retry-on-snapshot-warnings` input parameters.
|
|
||||||
|
|
||||||
Here's an example of a separate "Dependency Review" workflow that will wait up to 10 minutes for dependency submission to complete.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: Dependency Review
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dependency-review:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: 'Dependency Review'
|
|
||||||
uses: actions/dependency-review-action@v4
|
uses: actions/dependency-review-action@v4
|
||||||
with:
|
|
||||||
retry-on-snapshot-warnings: true
|
|
||||||
retry-on-snapshot-warnings-timeout: 600
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The `retry-on-snapshot-warnings-timeout` (in seconds) needs to be long enough to allow the modified dependency-submission workflow to complete.
|
|
||||||
|
|
||||||
## Usage with pull requests from public forked repositories
|
## Usage with pull requests from public forked repositories
|
||||||
|
|
||||||
This `contents: write` permission is [not available for any workflow that is triggered by a pull request submitted from a public forked repository](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token).
|
This `contents: write` permission is [not available for any workflow that is triggered by a pull request submitted from a public forked repository](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token).
|
||||||
@ -412,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@v5
|
uses: gradle/actions/dependency-submission@v4
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-upload
|
dependency-graph: generate-and-upload
|
||||||
```
|
```
|
||||||
@ -435,11 +376,41 @@ 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@v5
|
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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Integrating `dependency-review-action` for pull requests from public forked repositories
|
||||||
|
|
||||||
|
To integrate the `dependency-review-action` into the pull request workflows above, a third workflow file is required.
|
||||||
|
This workflow will be triggered directly on `pull_request`, but will wait until the dependency graph results are
|
||||||
|
submitted before the dependency review can complete. The period to wait is controlled by the `retry-on-snapshot-warnings` input parameters.
|
||||||
|
|
||||||
|
Here's an example of a separate "Dependency Review" workflow that will wait for 10 minutes for the above PR check workflow to complete.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: dependency-review
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dependency-review:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 'Dependency Review'
|
||||||
|
uses: actions/dependency-review-action@v4
|
||||||
|
with:
|
||||||
|
retry-on-snapshot-warnings: true
|
||||||
|
retry-on-snapshot-warnings-timeout: 600
|
||||||
|
```
|
||||||
|
|
||||||
|
The `retry-on-snapshot-warnings-timeout` (in seconds) needs to be long enough to allow the entire `Generate and save dependency graph` and `Download and submit dependency graph` workflows (above) to complete.
|
||||||
|
|
||||||
# Gradle version compatibility
|
# Gradle version compatibility
|
||||||
|
|
||||||
Dependency-graph generation is compatible with most versions of Gradle >= `5.2`, and is tested regularly against
|
Dependency-graph generation is compatible with most versions of Gradle >= `5.2`, and is tested regularly against
|
||||||
|
|||||||
@ -20,7 +20,7 @@ To convert your workflows, simply replace:
|
|||||||
```
|
```
|
||||||
with
|
with
|
||||||
```
|
```
|
||||||
uses: gradle/actions/setup-gradle@v5
|
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@v5
|
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@v5
|
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@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
gradle-version: '8.11'
|
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@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
- name: Execute Gradle build
|
- name: Execute Gradle build
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
@ -58,9 +58,9 @@ Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid havi
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle 8.10
|
- name: Setup Gradle 8.10
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
gradle-version: '8.10' # Quotes required to prevent YAML converting to number
|
gradle-version: "8.10" # Quotes required to prevent YAML converting to number
|
||||||
- name: Build with Gradle 8.10
|
- 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@v5
|
- uses: gradle/actions/setup-gradle@v4
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
with:
|
with:
|
||||||
gradle-version: release-candidate
|
gradle-version: release-candidate
|
||||||
@ -218,10 +218,10 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- uses: gradle/actions/setup-gradle@v5
|
- uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
gradle-version: '8.6'
|
gradle-version: 8.6
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
|
||||||
- run: gradle build --configuration-cache
|
- run: gradle build --configuration-cache
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -438,15 +438,6 @@ so that a Job Summary is never generated, or so that a Job Summary is only gener
|
|||||||
add-job-summary: 'on-failure' # Valid values are 'always' (default), 'never', and 'on-failure'
|
add-job-summary: 'on-failure' # Valid values are 'always' (default), 'never', and 'on-failure'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Excluding specific Gradle builds from Job Summary
|
|
||||||
|
|
||||||
The Job Summary works by installing an init-script in Gradle User Home which will record details of any Gradle execution during the workflow.
|
|
||||||
This means that any Gradle excecution sharing the same Gradle User Home will show up in the Job Summary, which may include Gradle executions
|
|
||||||
run as part of integration testing.
|
|
||||||
|
|
||||||
To avoid having these test builds show up in the Job Summary, add the `GRADLE_ACTIONS_SKIP_BUILD_RESULT_CAPTURE=true` environment variable
|
|
||||||
to the process that executes Gradle. This will stop the init-script from collecting any build results.
|
|
||||||
|
|
||||||
### Adding Job Summary as a Pull Request comment
|
### Adding Job Summary as a Pull Request comment
|
||||||
|
|
||||||
It is sometimes more convenient to view the results of a GitHub Actions Job directly from the Pull Request that triggered
|
It is sometimes more convenient to view the results of a GitHub Actions Job directly from the Pull Request that triggered
|
||||||
@ -472,9 +463,9 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
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'
|
||||||
|
|
||||||
- run: ./gradlew build --scan
|
- run: ./gradlew build --scan
|
||||||
```
|
```
|
||||||
@ -509,7 +500,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
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
|
||||||
@ -540,7 +531,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@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
validate-wrappers: false
|
validate-wrappers: false
|
||||||
```
|
```
|
||||||
@ -552,7 +543,7 @@ These are not allowed by default.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
validate-wrappers: true
|
validate-wrappers: true
|
||||||
allow-snapshot-wrappers: true
|
allow-snapshot-wrappers: true
|
||||||
@ -617,7 +608,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@v5
|
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)
|
||||||
@ -644,7 +635,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@v5
|
- 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
|
||||||
@ -669,13 +660,13 @@ 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@v5
|
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
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
env:
|
env:
|
||||||
GRADLE_PLUGIN_REPOSITORY_URL: 'https://gradle-plugins-proxy.mycorp.com'
|
GRADLE_PLUGIN_REPOSITORY_URL: "https://gradle-plugins-proxy.mycorp.com"
|
||||||
|
|
||||||
# Set the following variables if your custom plugin repository requires authentication
|
# Set the following variables if your custom plugin repository requires authentication
|
||||||
# GRADLE_PLUGIN_REPOSITORY_USERNAME: "username"
|
# GRADLE_PLUGIN_REPOSITORY_USERNAME: "username"
|
||||||
@ -699,7 +690,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@v5
|
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
|
||||||
@ -727,6 +718,20 @@ A known exception to this is that Gradle `7.0`, `7.0.1`, and `7.0.2` are not sup
|
|||||||
|
|
||||||
See [here](https://github.com/gradle/github-dependency-graph-gradle-plugin?tab=readme-ov-file#gradle-compatibility) for complete compatibility information.
|
See [here](https://github.com/gradle/github-dependency-graph-gradle-plugin?tab=readme-ov-file#gradle-compatibility) for complete compatibility information.
|
||||||
|
|
||||||
|
### Reducing storage costs for saved dependency graph artifacts
|
||||||
|
|
||||||
|
When `generate` or `generate-and-submit` is used with the action, the dependency graph that is generated is stored as a workflow artifact.
|
||||||
|
By default, these artifacts are retained for 30 days (or as configured for the repository).
|
||||||
|
To reduce storage costs for these artifacts, you can set the `artifact-retention-days` value to a lower number.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Generate dependency graph, but only retain artifact for one day
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
with:
|
||||||
|
dependency-graph: generate
|
||||||
|
artifact-retention-days: 1
|
||||||
|
```
|
||||||
|
|
||||||
# Develocity Build Scan® integration
|
# Develocity Build Scan® integration
|
||||||
|
|
||||||
Publishing a Develocity Build Scan can be very helpful for Gradle builds run on GitHub Actions. Each Build Scan provides a
|
Publishing a Develocity Build Scan can be very helpful for Gradle builds run on GitHub Actions. Each Build Scan provides a
|
||||||
@ -743,19 +748,16 @@ To publish to https://scans.gradle.com, you must specify in your workflow that y
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle to publish build scans
|
- name: Setup Gradle to publish build scans
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
build-scan-publish: true
|
build-scan-publish: true
|
||||||
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
|
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
|
||||||
build-scan-terms-of-use-agree: 'yes'
|
build-scan-terms-of-use-agree: "yes"
|
||||||
|
|
||||||
- name: Run a Gradle build - a build scan will be published automatically
|
- name: Run a Gradle build - a build scan will be published automatically
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
If your build is configured to [publish on demand](https://docs.gradle.com/develocity/gradle-plugin/current/#publishing_on_demand)
|
|
||||||
using `onlyIf { false }`, setting `build-scan-publish: true` will not force a scan to be published.
|
|
||||||
|
|
||||||
## Managing Develocity access keys
|
## Managing Develocity access keys
|
||||||
|
|
||||||
Develocity access keys are long-lived, creating risks if they are leaked. To mitigate this risk this,
|
Develocity access keys are long-lived, creating risks if they are leaked. To mitigate this risk this,
|
||||||
@ -765,7 +767,7 @@ The short-lived access token will then be used wherever a Develocity access key
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
|
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
|
||||||
|
|
||||||
@ -783,10 +785,10 @@ To avoid this, use the `develocity-token-expiry` parameter to specify a differen
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
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-token-expiry: 8 # The number of hours that the access token should remain valid (max 24).
|
||||||
```
|
```
|
||||||
|
|
||||||
### Develocity access key supplied as environment variable
|
### Develocity access key supplied as environment variable
|
||||||
@ -805,7 +807,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
# The build will automatically use a short-lived access token to authenticate with Develocity
|
# 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.
|
- name: Run a Gradle build that is configured to publish to Develocity.
|
||||||
@ -837,33 +839,33 @@ Here's a minimal example:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
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
|
||||||
develocity-plugin-version: '4.0'
|
develocity-plugin-version: 3.17.5
|
||||||
|
|
||||||
- name: Run a Gradle build with Develocity injection enabled
|
- name: Run a Gradle build with Develocity injection enabled
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
This configuration will automatically apply `v4.2.2` 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.19` 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@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
||||||
|
|
||||||
- name: Run a Gradle build with Develocity injection enabled
|
- name: Run a Gradle build with Develocity injection enabled
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
with:
|
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: '4.0'
|
DEVELOCITY_PLUGIN_VERSION: 3.17
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
||||||
@ -873,7 +875,7 @@ This access key will be used during the action execution to get a short-lived to
|
|||||||
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:
|
||||||
|
|
||||||
| Variable | Required | Description |
|
| Variable | Required | Description |
|
||||||
|--------------------------------------| :---: |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|--------------------------------------| --- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| develocity-injection-enabled | :white_check_mark: | enables Develocity injection |
|
| develocity-injection-enabled | :white_check_mark: | enables Develocity injection |
|
||||||
| develocity-url | :white_check_mark: | the URL of the Develocity server |
|
| develocity-url | :white_check_mark: | the URL of the Develocity server |
|
||||||
| develocity-allow-untrusted-server | | allow communication with an untrusted server; set to _true_ if your Develocity instance is using a self-signed certificate |
|
| develocity-allow-untrusted-server | | allow communication with an untrusted server; set to _true_ if your Develocity instance is using a self-signed certificate |
|
||||||
@ -887,34 +889,34 @@ The `init-script` supports several additional configuration parameters that you
|
|||||||
|
|
||||||
The input parameters can be expressed as environment variables following the relationships outlined in the table below:
|
The input parameters can be expressed as environment variables following the relationships outlined in the table below:
|
||||||
|
|
||||||
| Input | Environment Variable |
|
| Input | Environment Variable |
|
||||||
|--------------------------------------|------------------------------------------------|
|
|--------------------------------------|--------------------------------------|
|
||||||
| develocity-injection-enabled | DEVELOCITY_INJECTION_ENABLED |
|
| develocity-injection-enabled | DEVELOCITY_INJECTION_ENABLED |
|
||||||
| develocity-url | DEVELOCITY_INJECTION_URL |
|
| develocity-url | DEVELOCITY_URL |
|
||||||
| develocity-enforce-url | DEVELOCITY_INJECTION_ENFORCE_URL |
|
| develocity-allow-untrusted-server | DEVELOCITY_ALLOW_UNTRUSTED_SERVER |
|
||||||
| develocity-allow-untrusted-server | DEVELOCITY_INJECTION_ALLOW_UNTRUSTED_SERVER |
|
| develocity-capture-file-fingerprints | DEVELOCITY_CAPTURE_FILE_FINGERPRINTS |
|
||||||
| develocity-capture-file-fingerprints | DEVELOCITY_INJECTION_CAPTURE_FILE_FINGERPRINTS |
|
| develocity-enforce-url | DEVELOCITY_ENFORCE_URL |
|
||||||
| develocity-plugin-version | DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION |
|
| develocity-plugin-version | DEVELOCITY_PLUGIN_VERSION |
|
||||||
| develocity-ccud-plugin-version | DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION |
|
| develocity-ccud-plugin-version | DEVELOCITY_CCUD_PLUGIN_VERSION |
|
||||||
| gradle-plugin-repository-url | DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_URL |
|
| gradle-plugin-repository-url | GRADLE_PLUGIN_REPOSITORY_URL |
|
||||||
| gradle-plugin-repository-username | DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_USERNAME|
|
| gradle-plugin-repository-username | GRADLE_PLUGIN_REPOSITORY_USERNAME |
|
||||||
| gradle-plugin-repository-password | DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_PASSWORD|
|
| gradle-plugin-repository-password | GRADLE_PLUGIN_REPOSITORY_PASSWORD |
|
||||||
|
|
||||||
|
|
||||||
Here's an example using the env vars:
|
Here's an example using the env vars:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
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_INJECTION_URL: https://develocity.your-server.com
|
DEVELOCITY_URL: https://develocity.your-server.com
|
||||||
DEVELOCITY_INJECTION_ENFORCE_URL: true
|
DEVELOCITY_ENFORCE_URL: true
|
||||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: '4.0'
|
DEVELOCITY_PLUGIN_VERSION: "3.19"
|
||||||
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1'
|
DEVELOCITY_CCUD_PLUGIN_VERSION: "2.0.2"
|
||||||
```
|
```
|
||||||
|
|
||||||
# Dependency verification
|
# Dependency verification
|
||||||
|
|||||||
@ -50,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@v5
|
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`.
|
||||||
@ -73,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@v5
|
- 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@v5
|
uses: gradle/actions/setup-gradle@v4
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|||||||
@ -80,7 +80,7 @@ inputs:
|
|||||||
dependency-graph:
|
dependency-graph:
|
||||||
description: |
|
description: |
|
||||||
Specifies if a GitHub dependency snapshot should be generated for each Gradle build, and if so, how.
|
Specifies if a GitHub dependency snapshot should be generated for each Gradle build, and if so, how.
|
||||||
Valid values are 'disabled' (default), 'generate', 'generate-and-submit', 'generate-submit-and-upload', 'generate-and-upload', and 'download-and-submit'.
|
Valid values are 'disabled' (default), 'generate', 'generate-and-submit', 'generate-and-upload', and 'download-and-submit'.
|
||||||
required: false
|
required: false
|
||||||
default: 'disabled'
|
default: 'disabled'
|
||||||
|
|
||||||
@ -239,10 +239,9 @@ outputs:
|
|||||||
description: Version of Gradle that was setup by the action
|
description: Version of Gradle that was setup by the action
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node24'
|
using: 'node20'
|
||||||
main: '../dist/setup-gradle/main/index.js'
|
main: '../dist/setup-gradle/main/index.js'
|
||||||
post: '../dist/setup-gradle/post/index.js'
|
post: '../dist/setup-gradle/post/index.js'
|
||||||
post-if: '!cancelled()'
|
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
icon: 'box'
|
icon: 'box'
|
||||||
|
|||||||
3
sources/.eslintignore
Normal file
3
sources/.eslintignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
dist/
|
||||||
|
lib/
|
||||||
|
node_modules/
|
||||||
57
sources/.eslintrc.json
Normal file
57
sources/.eslintrc.json
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"plugins": ["jest", "@typescript-eslint"],
|
||||||
|
"extends": ["plugin:github/recommended"],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 9,
|
||||||
|
"sourceType": "module",
|
||||||
|
"project": "./tsconfig.json"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"eslint-comments/no-use": "off",
|
||||||
|
"import/no-namespace": "off",
|
||||||
|
"i18n-text/no-en": "off",
|
||||||
|
"no-unused-vars": "off",
|
||||||
|
"no-shadow": "off",
|
||||||
|
"sort-imports": "off",
|
||||||
|
"github/array-foreach": "off",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
|
||||||
|
"@typescript-eslint/no-require-imports": "error",
|
||||||
|
"@typescript-eslint/array-type": "error",
|
||||||
|
"@typescript-eslint/await-thenable": "error",
|
||||||
|
"camelcase": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
|
||||||
|
"@typescript-eslint/func-call-spacing": ["error", "never"],
|
||||||
|
"@typescript-eslint/no-array-constructor": "error",
|
||||||
|
"@typescript-eslint/no-empty-interface": "error",
|
||||||
|
"@typescript-eslint/no-explicit-any": "error",
|
||||||
|
"@typescript-eslint/no-extraneous-class": "error",
|
||||||
|
"@typescript-eslint/no-for-in-array": "error",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "error",
|
||||||
|
"@typescript-eslint/no-misused-new": "error",
|
||||||
|
"@typescript-eslint/no-namespace": "error",
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
"@typescript-eslint/no-shadow": "error",
|
||||||
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||||
|
"@typescript-eslint/no-useless-constructor": "error",
|
||||||
|
"@typescript-eslint/no-var-requires": "error",
|
||||||
|
"@typescript-eslint/prefer-for-of": "warn",
|
||||||
|
"@typescript-eslint/prefer-function-type": "warn",
|
||||||
|
"@typescript-eslint/prefer-includes": "error",
|
||||||
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
||||||
|
"@typescript-eslint/promise-function-async": "error",
|
||||||
|
"@typescript-eslint/require-array-sort-compare": ["error", {"ignoreStringArrays": true}],
|
||||||
|
"@typescript-eslint/restrict-plus-operands": "error",
|
||||||
|
"semi": "off",
|
||||||
|
"@typescript-eslint/semi": ["error", "never"],
|
||||||
|
"@typescript-eslint/type-annotation-spacing": "error",
|
||||||
|
"@typescript-eslint/unbound-method": "error"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"es6": true,
|
||||||
|
"jest/globals": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,3 +1,3 @@
|
|||||||
# Configuration file for asdf version manager
|
# Configuration file for asdf version manager
|
||||||
nodejs 24.3.0
|
nodejs 20.10.0
|
||||||
gradle 8.14.2
|
gradle 8.11.1
|
||||||
|
|||||||
@ -1,70 +0,0 @@
|
|||||||
import globals from "globals";
|
|
||||||
import typescriptParser from "@typescript-eslint/parser";
|
|
||||||
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
plugins: {
|
|
||||||
"@typescript-eslint": typescriptPlugin,
|
|
||||||
},
|
|
||||||
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.node,
|
|
||||||
},
|
|
||||||
|
|
||||||
ecmaVersion: 9,
|
|
||||||
sourceType: "module",
|
|
||||||
|
|
||||||
parser: typescriptParser,
|
|
||||||
parserOptions: {
|
|
||||||
project: "./tsconfig.json",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
files: ['**/*.ts', '**/*.tsx'],
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
camelcase: "off",
|
|
||||||
semi: "off",
|
|
||||||
|
|
||||||
"@typescript-eslint/explicit-member-accessibility": ["error", {
|
|
||||||
accessibility: "no-public",
|
|
||||||
}],
|
|
||||||
|
|
||||||
"@typescript-eslint/no-require-imports": "error",
|
|
||||||
"@typescript-eslint/array-type": "error",
|
|
||||||
"@typescript-eslint/await-thenable": "error",
|
|
||||||
|
|
||||||
"@typescript-eslint/explicit-function-return-type": ["error", {
|
|
||||||
allowExpressions: true,
|
|
||||||
}],
|
|
||||||
|
|
||||||
"@typescript-eslint/no-array-constructor": "error",
|
|
||||||
"@typescript-eslint/no-empty-interface": "error",
|
|
||||||
"@typescript-eslint/no-explicit-any": "error",
|
|
||||||
"@typescript-eslint/no-extraneous-class": "error",
|
|
||||||
"@typescript-eslint/no-for-in-array": "error",
|
|
||||||
"@typescript-eslint/no-inferrable-types": "error",
|
|
||||||
"@typescript-eslint/no-misused-new": "error",
|
|
||||||
"@typescript-eslint/no-namespace": "error",
|
|
||||||
"@typescript-eslint/no-non-null-assertion": "off",
|
|
||||||
"@typescript-eslint/no-shadow": "error",
|
|
||||||
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
||||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
||||||
"@typescript-eslint/no-useless-constructor": "error",
|
|
||||||
"@typescript-eslint/no-var-requires": "error",
|
|
||||||
"@typescript-eslint/prefer-for-of": "warn",
|
|
||||||
"@typescript-eslint/prefer-function-type": "warn",
|
|
||||||
"@typescript-eslint/prefer-includes": "error",
|
|
||||||
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
||||||
"@typescript-eslint/promise-function-async": "error",
|
|
||||||
|
|
||||||
"@typescript-eslint/require-array-sort-compare": ["error", {
|
|
||||||
ignoreStringArrays: true,
|
|
||||||
}],
|
|
||||||
|
|
||||||
"@typescript-eslint/restrict-plus-operands": "error",
|
|
||||||
"@typescript-eslint/unbound-method": "error",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@ -6,9 +6,5 @@ module.exports = {
|
|||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest'
|
'^.+\\.ts$': 'ts-jest'
|
||||||
},
|
},
|
||||||
reporters: [
|
|
||||||
'default',
|
|
||||||
'@gradle-tech/develocity-agent/jest-reporter',
|
|
||||||
],
|
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
|
|||||||
16113
sources/package-lock.json
generated
16113
sources/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -31,50 +31,41 @@
|
|||||||
"gradle"
|
"gradle"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
|
||||||
"node": ">=24.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/artifact": "2.3.2",
|
"@actions/artifact": "2.1.11",
|
||||||
"@actions/cache": "4.0.5",
|
"@actions/cache": "4.0.0",
|
||||||
"@actions/core": "1.11.1",
|
"@actions/core": "1.11.1",
|
||||||
"@actions/exec": "1.1.1",
|
"@actions/exec": "1.1.1",
|
||||||
"@actions/github": "6.0.1",
|
"@actions/github": "6.0.0",
|
||||||
"@actions/glob": "0.5.0",
|
"@actions/glob": "0.5.0",
|
||||||
"@actions/http-client": "2.2.3",
|
"@actions/http-client": "2.2.3",
|
||||||
"@actions/tool-cache": "2.0.2",
|
"@actions/tool-cache": "2.0.1",
|
||||||
|
"@octokit/rest": "21.0.2",
|
||||||
"@octokit/webhooks-types": "7.6.1",
|
"@octokit/webhooks-types": "7.6.1",
|
||||||
"cheerio": "1.1.2",
|
"cheerio": "^1.0.0",
|
||||||
"semver": "7.7.2",
|
"semver": "7.6.3",
|
||||||
"string-argv": "0.3.2",
|
"string-argv": "0.3.2",
|
||||||
|
"typed-rest-client": "2.1.0",
|
||||||
"unhomoglyph": "1.0.6",
|
"unhomoglyph": "1.0.6",
|
||||||
"which": "5.0.0"
|
"which": "5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gradle-tech/develocity-agent": "2.0.2",
|
"@types/jest": "29.5.14",
|
||||||
"@jest/globals": "30.1.2",
|
"@types/node": "20.17.10",
|
||||||
"@types/jest": "30.0.0",
|
"@types/unzipper": "0.10.10",
|
||||||
"@types/node": "24.5.2",
|
|
||||||
"@types/semver": "7.7.1",
|
|
||||||
"@types/unzipper": "0.10.11",
|
|
||||||
"@types/which": "3.0.4",
|
"@types/which": "3.0.4",
|
||||||
"@typescript-eslint/eslint-plugin": "8.44.1",
|
"@typescript-eslint/parser": "7.18.0",
|
||||||
"@vercel/ncc": "0.38.4",
|
"@vercel/ncc": "0.38.3",
|
||||||
"dedent": "1.7.0",
|
"eslint": "8.57.1",
|
||||||
"eslint": "9.24.0",
|
"eslint-plugin-github": "5.1.4",
|
||||||
"globals": "16.4.0",
|
"eslint-plugin-jest": "28.9.0",
|
||||||
"jest": "30.1.3",
|
"jest": "29.7.0",
|
||||||
|
"js-yaml": "4.1.0",
|
||||||
"nock": "13.5.6",
|
"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.6.2",
|
"prettier": "3.4.2",
|
||||||
"ts-jest": "29.4.4",
|
"ts-jest": "29.2.5",
|
||||||
"typescript": "5.9.2"
|
"typescript": "5.7.2"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"@azure/logger": "1.1.4",
|
|
||||||
"@octokit/request": "8.4.1",
|
|
||||||
"@octokit/request-error": "5.1.1",
|
|
||||||
"@octokit/plugin-paginate-rest": "9.2.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
183
sources/patches/@actions+cache+4.0.0.patch
Normal file
183
sources/patches/@actions+cache+4.0.0.patch
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
|
||||||
|
index ef0928b..4e2f570 100644
|
||||||
|
--- a/node_modules/@actions/cache/lib/cache.d.ts
|
||||||
|
+++ b/node_modules/@actions/cache/lib/cache.d.ts
|
||||||
|
@@ -21,7 +21,7 @@ export declare function isFeatureAvailable(): boolean;
|
||||||
|
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
||||||
|
* @returns string returns the key for the cache hit, otherwise returns undefined
|
||||||
|
*/
|
||||||
|
-export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<string | undefined>;
|
||||||
|
+export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry | undefined>;
|
||||||
|
/**
|
||||||
|
* Saves a list of files with the specified key
|
||||||
|
*
|
||||||
|
@@ -31,4 +31,12 @@ export declare function restoreCache(paths: string[], primaryKey: string, restor
|
||||||
|
* @param options cache upload options
|
||||||
|
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
||||||
|
*/
|
||||||
|
-export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<number>;
|
||||||
|
+export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry>;
|
||||||
|
+
|
||||||
|
+// PATCHED: Add `CacheEntry` as return type for save/restore functions
|
||||||
|
+// This allows us to track and report on cache entry sizes.
|
||||||
|
+export declare class CacheEntry {
|
||||||
|
+ key: string;
|
||||||
|
+ size?: number;
|
||||||
|
+ constructor(key: string, size?: number);
|
||||||
|
+}
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
|
||||||
|
index 45201b6..2654e4b 100644
|
||||||
|
--- a/node_modules/@actions/cache/lib/cache.js
|
||||||
|
+++ b/node_modules/@actions/cache/lib/cache.js
|
||||||
|
@@ -154,18 +154,21 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
||||||
|
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
||||||
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
||||||
|
core.info('Cache restored successfully');
|
||||||
|
- return cacheEntry.cacheKey;
|
||||||
|
- }
|
||||||
|
- catch (error) {
|
||||||
|
- const typedError = error;
|
||||||
|
- if (typedError.name === ValidationError.name) {
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- // Supress all non-validation cache related errors because caching should be optional
|
||||||
|
- core.warning(`Failed to restore: ${error.message}`);
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ // PATCHED - Include size of restored entry
|
||||||
|
+ return new CacheEntry(cacheEntry.cacheKey, archiveFileSize);;
|
||||||
|
}
|
||||||
|
+ // PATCHED - propagate errors
|
||||||
|
+ // catch (error) {
|
||||||
|
+ // const typedError = error;
|
||||||
|
+ // if (typedError.name === ValidationError.name) {
|
||||||
|
+ // throw error;
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // // Supress all non-validation cache related errors because caching should be optional
|
||||||
|
+ // core.warning(`Failed to restore: ${error.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
@@ -232,18 +235,21 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
||||||
|
}
|
||||||
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
||||||
|
core.info('Cache restored successfully');
|
||||||
|
- return response.matchedKey;
|
||||||
|
- }
|
||||||
|
- catch (error) {
|
||||||
|
- const typedError = error;
|
||||||
|
- if (typedError.name === ValidationError.name) {
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- // Supress all non-validation cache related errors because caching should be optional
|
||||||
|
- core.warning(`Failed to restore: ${error.message}`);
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ // PATCHED - Include size of restored entry
|
||||||
|
+ return new CacheEntry(response.matchedKey, archiveFileSize);;
|
||||||
|
}
|
||||||
|
+ // PATCHED - propagate errors
|
||||||
|
+ // catch (error) {
|
||||||
|
+ // const typedError = error;
|
||||||
|
+ // if (typedError.name === ValidationError.name) {
|
||||||
|
+ // throw error;
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // // Supress all non-validation cache related errors because caching should be optional
|
||||||
|
+ // core.warning(`Failed to restore: ${error.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
if (archivePath) {
|
||||||
|
@@ -334,19 +340,23 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) {
|
||||||
|
}
|
||||||
|
core.debug(`Saving Cache (ID: ${cacheId})`);
|
||||||
|
yield cacheHttpClient.saveCache(cacheId, archivePath, '', options);
|
||||||
|
+
|
||||||
|
+ // PATCHED - Include size of saved entry
|
||||||
|
+ return new CacheEntry(key, archiveFileSize);
|
||||||
|
}
|
||||||
|
- catch (error) {
|
||||||
|
- const typedError = error;
|
||||||
|
- if (typedError.name === ValidationError.name) {
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- else if (typedError.name === ReserveCacheError.name) {
|
||||||
|
- core.info(`Failed to save: ${typedError.message}`);
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- core.warning(`Failed to save: ${typedError.message}`);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ // PATCHED - propagate errors
|
||||||
|
+ // catch (error) {
|
||||||
|
+ // const typedError = error;
|
||||||
|
+ // if (typedError.name === ValidationError.name) {
|
||||||
|
+ // throw error;
|
||||||
|
+ // }
|
||||||
|
+ // else if (typedError.name === ReserveCacheError.name) {
|
||||||
|
+ // core.info(`Failed to save: ${typedError.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // core.warning(`Failed to save: ${typedError.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
@@ -422,19 +432,23 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
|
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||||
|
}
|
||||||
|
cacheId = parseInt(finalizeResponse.entryId);
|
||||||
|
+
|
||||||
|
+ // PATCHED - Include size of saved entry
|
||||||
|
+ return new CacheEntry(key, archiveFileSize);
|
||||||
|
}
|
||||||
|
- catch (error) {
|
||||||
|
- const typedError = error;
|
||||||
|
- if (typedError.name === ValidationError.name) {
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- else if (typedError.name === ReserveCacheError.name) {
|
||||||
|
- core.info(`Failed to save: ${typedError.message}`);
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- core.warning(`Failed to save: ${typedError.message}`);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ // PATCHED - propagate errors
|
||||||
|
+ // catch (error) {
|
||||||
|
+ // const typedError = error;
|
||||||
|
+ // if (typedError.name === ValidationError.name) {
|
||||||
|
+ // throw error;
|
||||||
|
+ // }
|
||||||
|
+ // else if (typedError.name === ReserveCacheError.name) {
|
||||||
|
+ // core.info(`Failed to save: ${typedError.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // core.warning(`Failed to save: ${typedError.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
@@ -447,4 +461,11 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
|
return cacheId;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
+// PATCHED - CacheEntry class
|
||||||
|
+class CacheEntry {
|
||||||
|
+ constructor(key, size) {
|
||||||
|
+ this.key = key;
|
||||||
|
+ this.size = size;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
//# sourceMappingURL=cache.js.map
|
||||||
|
\ No newline at end of file
|
||||||
@ -1,248 +0,0 @@
|
|||||||
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
|
|
||||||
index ef0928b..d06e675 100644
|
|
||||||
--- a/node_modules/@actions/cache/lib/cache.d.ts
|
|
||||||
+++ b/node_modules/@actions/cache/lib/cache.d.ts
|
|
||||||
@@ -21,7 +21,8 @@ export declare function isFeatureAvailable(): boolean;
|
|
||||||
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
|
||||||
* @returns string returns the key for the cache hit, otherwise returns undefined
|
|
||||||
*/
|
|
||||||
-export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<string | undefined>;
|
|
||||||
+export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry | undefined>;
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* Saves a list of files with the specified key
|
|
||||||
*
|
|
||||||
@@ -31,4 +32,12 @@ export declare function restoreCache(paths: string[], primaryKey: string, restor
|
|
||||||
* @param options cache upload options
|
|
||||||
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
|
||||||
*/
|
|
||||||
-export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<number>;
|
|
||||||
+export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry>;
|
|
||||||
+
|
|
||||||
+// PATCHED: Add `CacheEntry` as return type for save/restore functions
|
|
||||||
+// This allows us to track and report on cache entry sizes.
|
|
||||||
+export declare class CacheEntry {
|
|
||||||
+ key: string;
|
|
||||||
+ size?: number;
|
|
||||||
+ constructor(key: string, size?: number);
|
|
||||||
+}
|
|
||||||
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
|
|
||||||
index 41f2a37..2fe1600 100644
|
|
||||||
--- a/node_modules/@actions/cache/lib/cache.js
|
|
||||||
+++ b/node_modules/@actions/cache/lib/cache.js
|
|
||||||
@@ -165,26 +165,29 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|
||||||
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
|
||||||
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
|
||||||
core.info('Cache restored successfully');
|
|
||||||
- return cacheEntry.cacheKey;
|
|
||||||
- }
|
|
||||||
- catch (error) {
|
|
||||||
- const typedError = error;
|
|
||||||
- if (typedError.name === ValidationError.name) {
|
|
||||||
- throw error;
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- // warn on cache restore failure and continue build
|
|
||||||
- // Log server errors (5xx) as errors, all other errors as warnings
|
|
||||||
- if (typedError instanceof http_client_1.HttpClientError &&
|
|
||||||
- typeof typedError.statusCode === 'number' &&
|
|
||||||
- typedError.statusCode >= 500) {
|
|
||||||
- core.error(`Failed to restore: ${error.message}`);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- core.warning(`Failed to restore: ${error.message}`);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+
|
|
||||||
+ // PATCHED - Include size of restored entry
|
|
||||||
+ return new CacheEntry(cacheEntry.cacheKey, archiveFileSize);
|
|
||||||
}
|
|
||||||
+ // PATCHED - propagate errors
|
|
||||||
+ // catch (error) {
|
|
||||||
+ // const typedError = error;
|
|
||||||
+ // if (typedError.name === ValidationError.name) {
|
|
||||||
+ // throw error;
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // // warn on cache restore failure and continue build
|
|
||||||
+ // // Log server errors (5xx) as errors, all other errors as warnings
|
|
||||||
+ // if (typedError instanceof http_client_1.HttpClientError &&
|
|
||||||
+ // typeof typedError.statusCode === 'number' &&
|
|
||||||
+ // typedError.statusCode >= 500) {
|
|
||||||
+ // core.error(`Failed to restore: ${error.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // core.warning(`Failed to restore: ${error.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // }
|
|
||||||
+ //}
|
|
||||||
finally {
|
|
||||||
// Try to delete the archive to save space
|
|
||||||
try {
|
|
||||||
@@ -257,26 +260,29 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|
||||||
}
|
|
||||||
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
|
||||||
core.info('Cache restored successfully');
|
|
||||||
- return response.matchedKey;
|
|
||||||
- }
|
|
||||||
- catch (error) {
|
|
||||||
- const typedError = error;
|
|
||||||
- if (typedError.name === ValidationError.name) {
|
|
||||||
- throw error;
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- // Supress all non-validation cache related errors because caching should be optional
|
|
||||||
- // Log server errors (5xx) as errors, all other errors as warnings
|
|
||||||
- if (typedError instanceof http_client_1.HttpClientError &&
|
|
||||||
- typeof typedError.statusCode === 'number' &&
|
|
||||||
- typedError.statusCode >= 500) {
|
|
||||||
- core.error(`Failed to restore: ${error.message}`);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- core.warning(`Failed to restore: ${error.message}`);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+
|
|
||||||
+ // PATCHED - Include size of restored entry
|
|
||||||
+ return new CacheEntry(response.matchedKey, archiveFileSize);
|
|
||||||
}
|
|
||||||
+ // PATCHED - propagate errors
|
|
||||||
+ // catch (error) {
|
|
||||||
+ // const typedError = error;
|
|
||||||
+ // if (typedError.name === ValidationError.name) {
|
|
||||||
+ // throw error;
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // // Supress all non-validation cache related errors because caching should be optional
|
|
||||||
+ // // Log server errors (5xx) as errors, all other errors as warnings
|
|
||||||
+ // if (typedError instanceof http_client_1.HttpClientError &&
|
|
||||||
+ // typeof typedError.statusCode === 'number' &&
|
|
||||||
+ // typedError.statusCode >= 500) {
|
|
||||||
+ // core.error(`Failed to restore: ${error.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // core.warning(`Failed to restore: ${error.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // }
|
|
||||||
+ //}
|
|
||||||
finally {
|
|
||||||
try {
|
|
||||||
if (archivePath) {
|
|
||||||
@@ -367,27 +373,31 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) {
|
|
||||||
}
|
|
||||||
core.debug(`Saving Cache (ID: ${cacheId})`);
|
|
||||||
yield cacheHttpClient.saveCache(cacheId, archivePath, '', options);
|
|
||||||
+
|
|
||||||
+ // PATCHED - Include size of saved entry
|
|
||||||
+ return new CacheEntry(key, archiveFileSize);
|
|
||||||
}
|
|
||||||
- catch (error) {
|
|
||||||
- const typedError = error;
|
|
||||||
- if (typedError.name === ValidationError.name) {
|
|
||||||
- throw error;
|
|
||||||
- }
|
|
||||||
- else if (typedError.name === ReserveCacheError.name) {
|
|
||||||
- core.info(`Failed to save: ${typedError.message}`);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- // Log server errors (5xx) as errors, all other errors as warnings
|
|
||||||
- if (typedError instanceof http_client_1.HttpClientError &&
|
|
||||||
- typeof typedError.statusCode === 'number' &&
|
|
||||||
- typedError.statusCode >= 500) {
|
|
||||||
- core.error(`Failed to save: ${typedError.message}`);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- core.warning(`Failed to save: ${typedError.message}`);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ // PATCHED - propagate errors
|
|
||||||
+ //catch (error) {
|
|
||||||
+ // const typedError = error;
|
|
||||||
+ // if (typedError.name === ValidationError.name) {
|
|
||||||
+ // throw error;
|
|
||||||
+ // }
|
|
||||||
+ // else if (typedError.name === ReserveCacheError.name) {
|
|
||||||
+ // core.info(`Failed to save: ${typedError.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // // Log server errors (5xx) as errors, all other errors as warnings
|
|
||||||
+ // if (typedError instanceof http_client_1.HttpClientError &&
|
|
||||||
+ // typeof typedError.statusCode === 'number' &&
|
|
||||||
+ // typedError.statusCode >= 500) {
|
|
||||||
+ // core.error(`Failed to save: ${typedError.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // core.warning(`Failed to save: ${typedError.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // }
|
|
||||||
+ //}
|
|
||||||
finally {
|
|
||||||
// Try to delete the archive to save space
|
|
||||||
try {
|
|
||||||
@@ -471,27 +481,31 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
|
||||||
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
|
||||||
}
|
|
||||||
cacheId = parseInt(finalizeResponse.entryId);
|
|
||||||
+
|
|
||||||
+ // PATCHED - Include size of saved entry
|
|
||||||
+ return new CacheEntry(key, archiveFileSize);
|
|
||||||
}
|
|
||||||
- catch (error) {
|
|
||||||
- const typedError = error;
|
|
||||||
- if (typedError.name === ValidationError.name) {
|
|
||||||
- throw error;
|
|
||||||
- }
|
|
||||||
- else if (typedError.name === ReserveCacheError.name) {
|
|
||||||
- core.info(`Failed to save: ${typedError.message}`);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- // Log server errors (5xx) as errors, all other errors as warnings
|
|
||||||
- if (typedError instanceof http_client_1.HttpClientError &&
|
|
||||||
- typeof typedError.statusCode === 'number' &&
|
|
||||||
- typedError.statusCode >= 500) {
|
|
||||||
- core.error(`Failed to save: ${typedError.message}`);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- core.warning(`Failed to save: ${typedError.message}`);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ // PATCHED - propagate errors
|
|
||||||
+ //catch (error) {
|
|
||||||
+ // const typedError = error;
|
|
||||||
+ // if (typedError.name === ValidationError.name) {
|
|
||||||
+ // throw error;
|
|
||||||
+ // }
|
|
||||||
+ // else if (typedError.name === ReserveCacheError.name) {
|
|
||||||
+ // core.info(`Failed to save: ${typedError.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // // Log server errors (5xx) as errors, all other errors as warnings
|
|
||||||
+ // if (typedError instanceof http_client_1.HttpClientError &&
|
|
||||||
+ // typeof typedError.statusCode === 'number' &&
|
|
||||||
+ // typedError.statusCode >= 500) {
|
|
||||||
+ // core.error(`Failed to save: ${typedError.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // core.warning(`Failed to save: ${typedError.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // }
|
|
||||||
+ //}
|
|
||||||
finally {
|
|
||||||
// Try to delete the archive to save space
|
|
||||||
try {
|
|
||||||
@@ -504,4 +518,12 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
|
||||||
return cacheId;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
+// PATCHED - CacheEntry class
|
|
||||||
+class CacheEntry {
|
|
||||||
+ constructor(key, size) {
|
|
||||||
+ this.key = key;
|
|
||||||
+ this.size = size;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
//# sourceMappingURL=cache.js.map
|
|
||||||
\ No newline at end of file
|
|
||||||
48
sources/patches/@azure+logger+1.0.4.patch
Normal file
48
sources/patches/@azure+logger+1.0.4.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
diff --git a/node_modules/@azure/logger/dist-esm/src/debug.js b/node_modules/@azure/logger/dist-esm/src/debug.js
|
||||||
|
index d202779..30e8313 100644
|
||||||
|
--- a/node_modules/@azure/logger/dist-esm/src/debug.js
|
||||||
|
+++ b/node_modules/@azure/logger/dist-esm/src/debug.js
|
||||||
|
@@ -7,7 +7,7 @@ let enabledNamespaces = [];
|
||||||
|
let skippedNamespaces = [];
|
||||||
|
const debuggers = [];
|
||||||
|
if (debugEnvVariable) {
|
||||||
|
- enable(debugEnvVariable);
|
||||||
|
+ // enable(debugEnvVariable);
|
||||||
|
}
|
||||||
|
const debugObj = Object.assign((namespace) => {
|
||||||
|
return createDebugger(namespace);
|
||||||
|
diff --git a/node_modules/@azure/logger/dist-esm/src/index.js b/node_modules/@azure/logger/dist-esm/src/index.js
|
||||||
|
index cc25720..2925db5 100644
|
||||||
|
--- a/node_modules/@azure/logger/dist-esm/src/index.js
|
||||||
|
+++ b/node_modules/@azure/logger/dist-esm/src/index.js
|
||||||
|
@@ -20,7 +20,7 @@ if (logLevelFromEnv) {
|
||||||
|
setLogLevel(logLevelFromEnv);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
- console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
|
+ console.error(`AZURE_LOG_LEVEL set to unknown log level; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
diff --git a/node_modules/@azure/logger/dist/index.js b/node_modules/@azure/logger/dist/index.js
|
||||||
|
index 81e97c3..a415e2f 100644
|
||||||
|
--- a/node_modules/@azure/logger/dist/index.js
|
||||||
|
+++ b/node_modules/@azure/logger/dist/index.js
|
||||||
|
@@ -21,7 +21,7 @@ let enabledNamespaces = [];
|
||||||
|
let skippedNamespaces = [];
|
||||||
|
const debuggers = [];
|
||||||
|
if (debugEnvVariable) {
|
||||||
|
- enable(debugEnvVariable);
|
||||||
|
+ // enable(debugEnvVariable);
|
||||||
|
}
|
||||||
|
const debugObj = Object.assign((namespace) => {
|
||||||
|
return createDebugger(namespace);
|
||||||
|
@@ -125,7 +125,7 @@ if (logLevelFromEnv) {
|
||||||
|
setLogLevel(logLevelFromEnv);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
- console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
|
+ console.error(`AZURE_LOG_LEVEL set to unknown log level; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
@ -1,6 +1,5 @@
|
|||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import {versionIsAtLeast} from './execution/gradle'
|
|
||||||
|
|
||||||
export interface BuildResult {
|
export interface BuildResult {
|
||||||
get rootProjectName(): string
|
get rootProjectName(): string
|
||||||
@ -33,18 +32,6 @@ export class BuildResults {
|
|||||||
const allHomes = this.results.map(buildResult => buildResult.gradleHomeDir)
|
const allHomes = this.results.map(buildResult => buildResult.gradleHomeDir)
|
||||||
return Array.from(new Set(allHomes))
|
return Array.from(new Set(allHomes))
|
||||||
}
|
}
|
||||||
|
|
||||||
highestGradleVersion(): string | null {
|
|
||||||
if (this.results.length === 0) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
return this.results
|
|
||||||
.map(result => result.gradleVersion)
|
|
||||||
.reduce((maxVersion: string, currentVersion: string) => {
|
|
||||||
if (!maxVersion) return currentVersion
|
|
||||||
return versionIsAtLeast(currentVersion, maxVersion) ? currentVersion : maxVersion
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loadBuildResults(): BuildResults {
|
export function loadBuildResults(): BuildResults {
|
||||||
|
|||||||
@ -4,9 +4,6 @@ import * as exec from '@actions/exec'
|
|||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import * as provisioner from '../execution/provision'
|
import * as provisioner from '../execution/provision'
|
||||||
import {BuildResult, BuildResults} from '../build-results'
|
|
||||||
import {versionIsAtLeast} from '../execution/gradle'
|
|
||||||
import {gradleWrapperScript} from '../execution/gradlew'
|
|
||||||
|
|
||||||
export class CacheCleaner {
|
export class CacheCleaner {
|
||||||
private readonly gradleUserHome: string
|
private readonly gradleUserHome: string
|
||||||
@ -24,51 +21,13 @@ export class CacheCleaner {
|
|||||||
return timestamp
|
return timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
async forceCleanup(buildResults: BuildResults): Promise<void> {
|
async forceCleanup(): Promise<void> {
|
||||||
const executable = await this.gradleExecutableForCleanup(buildResults)
|
|
||||||
const cleanTimestamp = core.getState('clean-timestamp')
|
const cleanTimestamp = core.getState('clean-timestamp')
|
||||||
await this.forceCleanupFilesOlderThan(cleanTimestamp, executable)
|
await this.forceCleanupFilesOlderThan(cleanTimestamp)
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempt to use the newest Gradle version that was used to run a build, at least 8.11.
|
|
||||||
*
|
|
||||||
* This will avoid the need to provision a Gradle version for the cleanup when not necessary.
|
|
||||||
*/
|
|
||||||
private async gradleExecutableForCleanup(buildResults: BuildResults): Promise<string> {
|
|
||||||
const preferredVersion = buildResults.highestGradleVersion()
|
|
||||||
if (preferredVersion && versionIsAtLeast(preferredVersion, '8.11')) {
|
|
||||||
try {
|
|
||||||
const wrapperScripts = buildResults.results
|
|
||||||
.map(result => this.findGradleWrapperScript(result))
|
|
||||||
.filter(Boolean) as string[]
|
|
||||||
|
|
||||||
return await provisioner.provisionGradleWithVersionAtLeast(preferredVersion, wrapperScripts)
|
|
||||||
} catch (_) {
|
|
||||||
// Ignore the case where the preferred version cannot be located in https://services.gradle.org/versions/all.
|
|
||||||
// This can happen for snapshot Gradle versions.
|
|
||||||
core.info(
|
|
||||||
`Failed to provision Gradle ${preferredVersion} for cache cleanup. Falling back to default version.`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback to the minimum version required for cache-cleanup
|
|
||||||
return await provisioner.provisionGradleWithVersionAtLeast('8.11')
|
|
||||||
}
|
|
||||||
|
|
||||||
private findGradleWrapperScript(result: BuildResult): string | null {
|
|
||||||
try {
|
|
||||||
const wrapperScript = gradleWrapperScript(result.rootProjectDir)
|
|
||||||
return path.resolve(result.rootProjectDir, wrapperScript)
|
|
||||||
} catch (error) {
|
|
||||||
core.debug(`No Gradle Wrapper found for ${result.rootProjectName}: ${error}`)
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visible for testing
|
// Visible for testing
|
||||||
async forceCleanupFilesOlderThan(cleanTimestamp: string, executable: string): Promise<void> {
|
async forceCleanupFilesOlderThan(cleanTimestamp: string): Promise<void> {
|
||||||
// Run a dummy Gradle build to trigger cache cleanup
|
// Run a dummy Gradle build to trigger cache cleanup
|
||||||
const cleanupProjectDir = path.resolve(this.tmpDir, 'dummy-cleanup-project')
|
const cleanupProjectDir = path.resolve(this.tmpDir, 'dummy-cleanup-project')
|
||||||
fs.mkdirSync(cleanupProjectDir, {recursive: true})
|
fs.mkdirSync(cleanupProjectDir, {recursive: true})
|
||||||
@ -96,6 +55,10 @@ export class CacheCleaner {
|
|||||||
)
|
)
|
||||||
fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}')
|
fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}')
|
||||||
|
|
||||||
|
// 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.1')
|
||||||
|
|
||||||
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)
|
||||||
@ -113,7 +76,6 @@ export class CacheCleaner {
|
|||||||
'--no-scan',
|
'--no-scan',
|
||||||
'--build-cache',
|
'--build-cache',
|
||||||
'-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false',
|
'-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false',
|
||||||
'-DGRADLE_ACTIONS_SKIP_BUILD_RESULT_CAPTURE=true',
|
|
||||||
'noop'
|
'noop'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user