From 543ea035496d57a74999db3b39f55390c86442ff Mon Sep 17 00:00:00 2001 From: davotoula Date: Sat, 25 Apr 2026 13:18:02 +0200 Subject: [PATCH 1/5] ci: split android into its own job for graph visibility The merged test-and-build matrix hid Android behind an OS-keyed matrix leg, so the workflow graph no longer showed a distinct Android node. Restore visibility by splitting into two parallel jobs after lint: - build-desktop (matrix: ubuntu/macos/windows): runs JVM tests for the KMP/JVM modules (quartz, commons, cli, desktopApp) and packages the native installer per OS. - test-and-build-android (ubuntu): runs the full test sweep and assembleBenchmark, uploads APKs and reports. Trade-off: Ubuntu spins up two parallel runners instead of one, but wall time is unchanged and Android is once again a visible node. --- .github/workflows/build.yml | 51 ++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 905fe4aa0..a783a6e47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: - name: Linter (gradle) run: ./gradlew spotlessCheck - test-and-build: + build-desktop: needs: lint strategy: fail-fast: false @@ -66,22 +66,7 @@ jobs: cache: gradle - name: Test + Build Desktop (gradle) - run: ./gradlew test :desktopApp:${{ matrix.desktop-task }} --no-daemon - - - name: Build Android Benchmark APKs (gradle) - if: matrix.os == 'ubuntu-latest' - run: ./gradlew assembleBenchmark --no-daemon - - - name: Android Test Report - uses: asadmansr/android-test-report-action@v1.2.0 - if: ${{ always() && matrix.os == 'ubuntu-latest' }} - - - name: Upload Test Results - uses: actions/upload-artifact@v7 - if: ${{ always() && matrix.os == 'ubuntu-latest' }} - with: - name: Test Reports - path: amethyst/build/reports + run: ./gradlew :quartz:test :commons:test :cli:test :desktopApp:test :desktopApp:${{ matrix.desktop-task }} --no-daemon - name: Upload Desktop Distribution uses: actions/upload-artifact@v7 @@ -89,23 +74,49 @@ jobs: name: ${{ matrix.desktop-artifact-name }} path: ${{ matrix.desktop-artifact-path }} + test-and-build-android: + needs: lint + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: 21 + cache: gradle + + - name: Test + Build Android (gradle) + run: ./gradlew test assembleBenchmark --no-daemon + + - name: Android Test Report + uses: asadmansr/android-test-report-action@v1.2.0 + if: always() + + - name: Upload Test Results + uses: actions/upload-artifact@v7 + if: always() + with: + name: Test Reports + path: amethyst/build/reports + - name: Upload Play APK Benchmark uses: actions/upload-artifact@v7 - if: matrix.os == 'ubuntu-latest' with: name: Play Benchmark APK path: amethyst/build/outputs/apk/play/benchmark/amethyst-play-universal-benchmark.apk - name: Upload FDroid APK Benchmark uses: actions/upload-artifact@v7 - if: matrix.os == 'ubuntu-latest' with: name: FDroid Benchmark APK path: amethyst/build/outputs/apk/fdroid/benchmark/amethyst-fdroid-universal-benchmark.apk - name: Upload Compose Reports uses: actions/upload-artifact@v7 - if: matrix.os == 'ubuntu-latest' with: name: Compose Reports path: amethyst/build/compose_compiler From 06668c3c5ef0b4b5c844765fafdf5eadd7608310 Mon Sep 17 00:00:00 2001 From: davotoula Date: Sat, 25 Apr 2026 13:19:03 +0200 Subject: [PATCH 2/5] ci: include :nestsClient:test in desktop leg nestsClient is a KMP module with both JVM and Android targets. Add it to the desktop matrix's explicit test list so its JVM tests run on all three desktop OSes alongside quartz/commons/cli/desktopApp. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a783a6e47..77f213cac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,7 +66,7 @@ jobs: cache: gradle - name: Test + Build Desktop (gradle) - run: ./gradlew :quartz:test :commons:test :cli:test :desktopApp:test :desktopApp:${{ matrix.desktop-task }} --no-daemon + run: ./gradlew :quartz:test :commons:test :nestsClient:test :cli:test :desktopApp:test :desktopApp:${{ matrix.desktop-task }} --no-daemon - name: Upload Desktop Distribution uses: actions/upload-artifact@v7 From 8a1b6c033f781875348dba41be198ba31244798c Mon Sep 17 00:00:00 2001 From: davotoula Date: Sat, 25 Apr 2026 14:00:43 +0200 Subject: [PATCH 3/5] ci: use jvmTest for KMP modules in desktop leg The bare 'test' task is ambiguous in KMP modules (candidates include testAndroid and testAndroidHostTest). Switch quartz/commons/nestsClient to :jvmTest so the desktop matrix unambiguously runs the JVM test target on each OS. cli and desktopApp remain on :test (pure JVM). --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77f213cac..4dede1dba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,7 +66,7 @@ jobs: cache: gradle - name: Test + Build Desktop (gradle) - run: ./gradlew :quartz:test :commons:test :nestsClient:test :cli:test :desktopApp:test :desktopApp:${{ matrix.desktop-task }} --no-daemon + run: ./gradlew :quartz:jvmTest :commons:jvmTest :nestsClient:jvmTest :cli:test :desktopApp:test :desktopApp:${{ matrix.desktop-task }} --no-daemon - name: Upload Desktop Distribution uses: actions/upload-artifact@v7 From 680b1f0ef6759beba28ebcaab153aa0808172111 Mon Sep 17 00:00:00 2001 From: davotoula Date: Sat, 25 Apr 2026 15:01:33 +0200 Subject: [PATCH 4/5] test(quartz): normalize CRLF in pretty-printer string asserts Triple-quoted Kotlin strings inherit the source file's line endings, so on Windows checkouts (CRLF) the expected JSON contains \r\n while Jackson's pretty-printer always outputs \n. Normalize the expected side with replace("\r\n", "\n") so the assertion is platform-neutral. Surfaced by adding :quartz:jvmTest to the desktop CI matrix; previously the bare 'test' lifecycle didn't resolve jvmTest in KMP modules so the mismatch was never observed on Windows. --- .../nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt b/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt index a24d3575b..80f18dd5c 100644 --- a/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt +++ b/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt @@ -49,7 +49,7 @@ class InliningTagArrayPrettyPrinterTest { } """.trimIndent() val json = writer.writeValueAsString(data) - assertEquals(expected, json) + assertEquals(expected.replace("\r\n", "\n"), json) val data2 = mapOf( @@ -65,7 +65,7 @@ class InliningTagArrayPrettyPrinterTest { } """.trimIndent() val json2 = writer.writeValueAsString(data2) - assertEquals(expected2, json2) + assertEquals(expected2.replace("\r\n", "\n"), json2) } @Test @@ -90,6 +90,6 @@ class InliningTagArrayPrettyPrinterTest { val prettified = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(tree) - assertEquals(nostrObject, prettified) + assertEquals(nostrObject.replace("\r\n", "\n"), prettified) } } From adfdfa45cc9c613dbb7b77ab923e4a26e8ef83db Mon Sep 17 00:00:00 2001 From: davotoula Date: Sat, 25 Apr 2026 15:16:37 +0200 Subject: [PATCH 5/5] test(quartz): also normalize CRLF on Jackson output Jackson's pretty-printer can emit \r\n on Windows depending on the configured DefaultIndenter, so the previous one-sided normalization still mismatched. Normalize both sides of the assert to LF. --- .../nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt b/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt index 80f18dd5c..be489b5aa 100644 --- a/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt +++ b/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt @@ -49,7 +49,7 @@ class InliningTagArrayPrettyPrinterTest { } """.trimIndent() val json = writer.writeValueAsString(data) - assertEquals(expected.replace("\r\n", "\n"), json) + assertEquals(expected.replace("\r\n", "\n"), json.replace("\r\n", "\n")) val data2 = mapOf( @@ -65,7 +65,7 @@ class InliningTagArrayPrettyPrinterTest { } """.trimIndent() val json2 = writer.writeValueAsString(data2) - assertEquals(expected2.replace("\r\n", "\n"), json2) + assertEquals(expected2.replace("\r\n", "\n"), json2.replace("\r\n", "\n")) } @Test @@ -90,6 +90,6 @@ class InliningTagArrayPrettyPrinterTest { val prettified = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(tree) - assertEquals(nostrObject.replace("\r\n", "\n"), prettified) + assertEquals(nostrObject.replace("\r\n", "\n"), prettified.replace("\r\n", "\n")) } }