From 20e9834446fe64d87728cceea2f264f832c88c10 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Sat, 30 Nov 2024 21:51:03 +0200 Subject: [PATCH] Speed-up workflows feedback --- .github/workflows/run-tests.yml | 19 ++++++++++++++++++- ...rsocketbuild.multiplatform-base.gradle.kts | 7 +++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f320d45f..0030a4bb 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,7 +19,12 @@ jobs: with: cache-read-only: ${{ github.ref_name != 'master' }} - - run: ./gradlew build publishToMavenLocal --continue -Prsocketbuild.skipTests=true + - run: > + ./gradlew + build publishToMavenLocal + --continue + -Prsocketbuild.skipTestTasks=true + -Prsocketbuild.skipLinkTasks=true run-tests: needs: [ build-project ] @@ -72,3 +77,15 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v2 with: files: test-reports/**/TEST-*.xml + + link-native: + needs: [ run-tests ] + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-gradle + - run: ./gradlew linkAll --continue diff --git a/build-logic/src/main/kotlin/rsocketbuild.multiplatform-base.gradle.kts b/build-logic/src/main/kotlin/rsocketbuild.multiplatform-base.gradle.kts index 2a6b5fa4..b5eb9b7e 100644 --- a/build-logic/src/main/kotlin/rsocketbuild.multiplatform-base.gradle.kts +++ b/build-logic/src/main/kotlin/rsocketbuild.multiplatform-base.gradle.kts @@ -123,15 +123,14 @@ listOf("ios", "watchos", "tvos", "macos").forEach { targetGroup -> ) } -// on build, link even those binaries, which it's not possible to run -tasks.build { +tasks.register("linkAll") { dependsOn(tasks.withType()) } -if (providers.gradleProperty("rsocketbuild.skipTests").map(String::toBoolean).getOrElse(false)) { +if (providers.gradleProperty("rsocketbuild.skipTestTasks").map(String::toBoolean).getOrElse(false)) { tasks.withType().configureEach { onlyIf { false } } } -if (providers.gradleProperty("rsocketbuild.skipNativeLink").map(String::toBoolean).getOrElse(false)) { +if (providers.gradleProperty("rsocketbuild.skipLinkTasks").map(String::toBoolean).getOrElse(false)) { tasks.withType().configureEach { onlyIf { false } } }