-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #482 from dnestoro/dnestoro/AddConcurrencyToGithub…
…Actions Add concurrency with test array in matrix
- Loading branch information
Showing
6 changed files
with
140 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ | |
|
||
plugins { | ||
`kotlin-dsl` | ||
`groovy-gradle-plugin` | ||
} | ||
|
||
repositories { | ||
|
54 changes: 54 additions & 0 deletions
54
build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import groovy.json.JsonOutput | ||
|
||
def matrixDefault = [ | ||
"java-version": [ "17" ], | ||
"os": [ "ubuntu-20.04", "windows-latest" ] | ||
] | ||
|
||
// # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", | ||
def gradleVersions = [ | ||
"gradle-version": ["current", "7.4"], | ||
] | ||
|
||
def gradleCachedVersions = [ | ||
"gradle-config-cache-version": ["current", "8.0.1"] | ||
] | ||
|
||
sourceSets.configureEach { sourceSet -> | ||
if (sourceSet.name == 'functionalTest') { | ||
tasks.register("dumpFunctionalTestList") { | ||
doLast { | ||
def matrix = [ | ||
test: [] | ||
] | ||
|
||
// add all defaults | ||
matrix.putAll(matrixDefault) | ||
|
||
// add gradle specific stuff | ||
if (matrixType == "gradle") { | ||
matrix.putAll(gradleVersions) | ||
} | ||
|
||
if (matrixType == "gradleCached") { | ||
matrix.putAll(gradleCachedVersions) | ||
} | ||
|
||
// add functional tests | ||
sourceSet.allSource.each { | ||
matrix.test << it.name.substring(0, it.name.lastIndexOf('.')) | ||
} | ||
|
||
String githubOut = System.getenv("GITHUB_OUTPUT") | ||
if (githubOut != null) { | ||
new File(githubOut).withWriterAppend { | ||
it.println "matrix=${JsonOutput.toJson(matrix)}" | ||
} | ||
} else { | ||
println "Warning: GITHUB_OUTPUT environment variable not found" | ||
} | ||
println "Build Matrix: $matrix" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters