From d9f7f2ab4cccd02b2f8d2cb6ac3ebfeb7a4cfc08 Mon Sep 17 00:00:00 2001 From: soywiz Date: Tue, 23 Jan 2024 13:46:05 +0100 Subject: [PATCH 1/7] Add simple github workflow for testing --- .github/workflows/TEST.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/TEST.yml diff --git a/.github/workflows/TEST.yml b/.github/workflows/TEST.yml new file mode 100644 index 0000000000..b0b8f9d093 --- /dev/null +++ b/.github/workflows/TEST.yml @@ -0,0 +1,25 @@ +name: TEST + +on: + push: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + CI: true + DISPLAY: ":99" + JAVA_VERSION: 11 + JAVA_DISTRIBUTION: zulu + +jobs: + test: + timeout-minutes: 25 + runs-on: ubuntu-latest + steps: + - { uses: actions/checkout@v3 } + - { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } + - { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0 + - { name: Start gradle, run: ./gradlew jvmTest } From 508242748502f73a750b90b43bca8e96fbe0867b Mon Sep 17 00:00:00 2001 From: soywiz Date: Tue, 23 Jan 2024 13:48:02 +0100 Subject: [PATCH 2/7] Fixes errors like `> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'compileKotlinJvm' (11).` --- zircon.core/build.gradle.kts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zircon.core/build.gradle.kts b/zircon.core/build.gradle.kts index e2b10e3100..f9edd1fc05 100644 --- a/zircon.core/build.gradle.kts +++ b/zircon.core/build.gradle.kts @@ -18,6 +18,13 @@ plugins { id("signing") } +val javaVersion = JavaVersion.VERSION_11 + +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion +} + kotlin { jvm { @@ -26,7 +33,8 @@ kotlin { kotlinOptions { apiVersion = "1.9" languageVersion = "1.9" - jvmTarget = "15" + jvmTarget = javaVersion.toString() + } } } From 0d524cadf95c1b05891c678502b4f20fa9b9f790 Mon Sep 17 00:00:00 2001 From: soywiz Date: Tue, 23 Jan 2024 13:49:38 +0100 Subject: [PATCH 3/7] Fixes small compilation error --- .../org/hexworks/zircon/internal/application/BaseApplication.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zircon.core/src/commonMain/kotlin/org/hexworks/zircon/internal/application/BaseApplication.kt b/zircon.core/src/commonMain/kotlin/org/hexworks/zircon/internal/application/BaseApplication.kt index 1c0227e83c..28baac3284 100644 --- a/zircon.core/src/commonMain/kotlin/org/hexworks/zircon/internal/application/BaseApplication.kt +++ b/zircon.core/src/commonMain/kotlin/org/hexworks/zircon/internal/application/BaseApplication.kt @@ -74,7 +74,7 @@ abstract class BaseApplication( delay(renderIntervalMs - elapsedTimeMs) } } catch (e: Exception) { - logger.error(e) { "Render failed" } + logger.error({ "Render failed" }, e) } } } From bb05204f23688b3e5027da18d2e2d92893fcecd2 Mon Sep 17 00:00:00 2001 From: soywiz Date: Tue, 23 Jan 2024 13:52:14 +0100 Subject: [PATCH 4/7] Only run CI for the master branch on push (still on any branch for pull_request) --- .github/workflows/TEST.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/TEST.yml b/.github/workflows/TEST.yml index b0b8f9d093..8765b6a9e0 100644 --- a/.github/workflows/TEST.yml +++ b/.github/workflows/TEST.yml @@ -2,6 +2,7 @@ name: TEST on: push: + branches: [ "master", "main" ] pull_request: concurrency: From a5539516a68913276c23989e788b66359daf07bb Mon Sep 17 00:00:00 2001 From: soywiz Date: Tue, 23 Jan 2024 14:02:28 +0100 Subject: [PATCH 5/7] Disable CircleCI --- .circleci/{config.yml => config.yml.bak} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .circleci/{config.yml => config.yml.bak} (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml.bak similarity index 100% rename from .circleci/config.yml rename to .circleci/config.yml.bak From 6ac0deff1da02143dff84a3ccdcb0feb7ff1a72b Mon Sep 17 00:00:00 2001 From: soywiz Date: Tue, 23 Jan 2024 14:02:35 +0100 Subject: [PATCH 6/7] Also test JS target --- .github/workflows/TEST.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/TEST.yml b/.github/workflows/TEST.yml index 8765b6a9e0..30f19e261a 100644 --- a/.github/workflows/TEST.yml +++ b/.github/workflows/TEST.yml @@ -23,4 +23,6 @@ jobs: - { uses: actions/checkout@v3 } - { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } - { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0 - - { name: Start gradle, run: ./gradlew jvmTest } + - { name: Gradle Test JVM, run: ./gradlew jvmTest } + - { name: Gradle Test JS, run: ./gradlew jsTest } + #- { name: Gradle Sonarqube, run: ./gradlew sonarqube, if: false } From 2d46acab86f8aa4422aa69e615488bb15d8d534a Mon Sep 17 00:00:00 2001 From: soywiz Date: Tue, 23 Jan 2024 14:06:24 +0100 Subject: [PATCH 7/7] Initialize gradle --- .github/workflows/TEST.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/TEST.yml b/.github/workflows/TEST.yml index 30f19e261a..a0fdda2c03 100644 --- a/.github/workflows/TEST.yml +++ b/.github/workflows/TEST.yml @@ -23,6 +23,7 @@ jobs: - { uses: actions/checkout@v3 } - { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } - { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0 + - { name: Initialize Gradle, run: ./gradlew } - { name: Gradle Test JVM, run: ./gradlew jvmTest } - { name: Gradle Test JS, run: ./gradlew jsTest } #- { name: Gradle Sonarqube, run: ./gradlew sonarqube, if: false }