From 2aa095d7c48ad53e8a072bc1fa833f276cbf6611 Mon Sep 17 00:00:00 2001 From: StefMa Date: Fri, 17 Nov 2023 10:31:04 +0100 Subject: [PATCH 1/3] Add Gradle caching to CI --- .github/workflows/tests.yml | 39 +++++++++++++++++++++++++++++++++++++ gradle.properties | 3 ++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dfb17e0..29d096b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Cache Gradle + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/jdks + ~/.gradle/wrapper + key: gradle-caches-jvm-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }} + - name: Run tests run: ./gradlew jvmTest @@ -32,6 +41,16 @@ jobs: - name: Install libcurl run: sudo apt-get install -y libcurl4-gnutls-dev + - name: Cache Gradle + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/jdks + ~/.gradle/wrapper + ~/.konan + key: gradle-caches-linux-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }} + - name: Run tests run: ./gradlew linuxX64Test @@ -48,6 +67,16 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Cache Gradle + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/jdks + ~/.gradle/wrapper + ~/.konan + key: gradle-caches-darwin-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }} + - name: Run tests run: ./gradlew macosX64Test @@ -64,6 +93,16 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Cache Gradle + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/jdks + ~/.gradle/wrapper + ~/.konan + key: gradle-caches-mingw-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }} + - name: Run tests run: ./gradlew.bat mingwX64Test diff --git a/gradle.properties b/gradle.properties index 4dcde08..a566027 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,6 @@ kotlin.code.style=official -kotlin.experimental.tryK2=true org.gradle.parallel=true org.gradle.jvmargs=-Xmx6g org.gradle.caching=true + +kotlin.experimental.tryK2=true \ No newline at end of file From 98ea609ea7215dfffa72b40c1e1289633e510515 Mon Sep 17 00:00:00 2001 From: StefMa Date: Fri, 17 Nov 2023 10:42:41 +0100 Subject: [PATCH 2/3] Fix test reporter --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 29d096b..523472e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -59,7 +59,7 @@ jobs: if: success() || failure() with: check_name: 'Linux Test Reports' - report_paths: '**/build/test-results/nativeTest/TEST-*.xml' + report_paths: '**/build/test-results/linuxX64Test/TEST-*.xml' test-darwin: runs-on: macos-latest @@ -85,7 +85,7 @@ jobs: if: success() || failure() with: check_name: 'Darwin Test Reports' - report_paths: '**/build/test-results/nativeTest/TEST-*.xml' + report_paths: '**/build/test-results/macosX64Test/TEST-*.xml' test-mingw: runs-on: windows-latest @@ -111,4 +111,4 @@ jobs: if: success() || failure() with: check_name: 'Mingw Test Reports' - report_paths: '**/build/test-results/nativeTest/TEST-*.xml' + report_paths: '**/build/test-results/mingwX64Test/TEST-*.xml' From 90067e238cd2ae9fcdc0e4a39fdb320db50b3c83 Mon Sep 17 00:00:00 2001 From: StefMa Date: Fri, 17 Nov 2023 10:54:27 +0100 Subject: [PATCH 3/3] Run on Windows without Gradle daemon to fix locking --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 523472e..d1b0afe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -104,7 +104,7 @@ jobs: key: gradle-caches-mingw-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }} - name: Run tests - run: ./gradlew.bat mingwX64Test + run: ./gradlew.bat mingwX64Test --no-daemon - name: Test Report uses: mikepenz/action-junit-report@v4