diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-07-12 14:59:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-12 14:59:51 +0200 |
commit | 54decbe937ddcb0e3a8922babdc5f1d805fd42c0 (patch) | |
tree | 9980f4466c3b757c0b923fcff43157daa9ff5f16 | |
parent | 14cd0f3e42e13927f9852d2cb74cc0098c1a429c (diff) | |
download | dokka-54decbe937ddcb0e3a8922babdc5f1d805fd42c0.tar.gz dokka-54decbe937ddcb0e3a8922babdc5f1d805fd42c0.tar.bz2 dokka-54decbe937ddcb0e3a8922babdc5f1d805fd42c0.zip |
Set the correct testLauncher property in workflows (#3064)
4 files changed, 18 insertions, 10 deletions
diff --git a/.github/workflows/tests-smoke.yml b/.github/workflows/tests-smoke.yml index 1177c111..7d41412c 100644 --- a/.github/workflows/tests-smoke.yml +++ b/.github/workflows/tests-smoke.yml @@ -6,6 +6,9 @@ concurrency: group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' cancel-in-progress: true +env: + JAVA_TEST_VERSION: 11 + jobs: test-matrix: strategy: @@ -21,15 +24,18 @@ jobs: java-version: 17 cache: 'maven' - uses: gradle/gradle-build-action@v2 - env: - ORG_GRADLE_PROJECT_org.jetbrains.dokka.javaToolchain.test: 11 with: gradle-home-cache-cleanup: true - name: Run tests under Windows if: matrix.os == 'windows-latest' # Running tests with the Gradle daemon on windows agents leads to some very strange # JVM crashes for some reason. Most likely a problem of Gradle/GitHub/Windows server - run: ./gradlew clean test --stacktrace --no-daemon --no-parallel "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m" + run: > + ./gradlew clean test --stacktrace --no-daemon --no-parallel + "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m" + "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ env.JAVA_TEST_VERSION }}" - name: Run tests under Ubuntu if: matrix.os != 'windows-latest' - run: ./gradlew clean test --stacktrace + run: > + ./gradlew clean test --stacktrace + "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ env.JAVA_TEST_VERSION }}" diff --git a/.github/workflows/tests-thorough.yml b/.github/workflows/tests-thorough.yml index 7684277e..9c4679b2 100644 --- a/.github/workflows/tests-thorough.yml +++ b/.github/workflows/tests-thorough.yml @@ -22,15 +22,18 @@ jobs: java-version: 17 cache: 'maven' - uses: gradle/gradle-build-action@v2 - env: - ORG_GRADLE_PROJECT_org.jetbrains.dokka.javaToolchain.test: ${{ matrix.javaVersion }} with: gradle-home-cache-cleanup: true - name: Run tests under Windows if: matrix.os == 'windows-latest' # Running tests with the Gradle daemon on windows agents leads to some very strange # JVM crashes for some reason. Most likely a problem of Gradle/GitHub/Windows server - run: ./gradlew clean test --stacktrace --no-daemon --no-parallel "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m" + run: > + ./gradlew clean test --stacktrace --no-daemon --no-parallel + "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m" + "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ matrix.javaVersion }}" - name: Run tests under Ubuntu/Macos if: matrix.os != 'windows-latest' - run: ./gradlew clean test --stacktrace + run: > + ./gradlew clean test --stacktrace + "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ matrix.javaVersion }}" diff --git a/build-logic/src/main/kotlin/org/jetbrains/DokkaBuildProperties.kt b/build-logic/src/main/kotlin/org/jetbrains/DokkaBuildProperties.kt index 57e20acd..84eb626e 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/DokkaBuildProperties.kt +++ b/build-logic/src/main/kotlin/org/jetbrains/DokkaBuildProperties.kt @@ -12,7 +12,7 @@ import javax.inject.Inject * This is an extension created by the [org.jetbrains.conventions.Base_gradle] convention plugin. * * Default values are set in the root `gradle.properties`, and can be overridden via - * [CLI args, system properties, and environment variables](https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties) + * [project properties](https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties) */ abstract class DokkaBuildProperties @Inject constructor( private val providers: ProviderFactory, diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts index c5b90e81..a4ed0ede 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts @@ -27,7 +27,6 @@ tasks.withType<Test>().configureEach { } else { (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1 } - javaLauncher.set(javaToolchains.launcherFor { languageVersion.set(dokkaBuild.testJavaLauncherVersion) }) |