diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index bc27ed9..e13b65a 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -26,7 +26,7 @@ jobs: - name: Run Linux, JVM, JS checks and generate coverage report run: | - ./gradlew clean jvmTest jsNodeTest linuxX64Test compileKotlinLinuxArm64 compileTestKotlinLinuxArm64 checkKotlinAbi koverXmlReport + ./gradlew clean jvmTest jsNodeTest linuxX64Test compileKotlinLinuxArm64 compileTestKotlinLinuxArm64 compileKotlinWasmWasi checkKotlinAbi koverXmlReport - name: Upload coverage report to Codecov uses: codecov/codecov-action@v4 diff --git a/build.gradle.kts b/build.gradle.kts index 8e9b35c..79a22d2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ import com.vanniktech.maven.publish.JavadocJar import com.vanniktech.maven.publish.KotlinMultiplatform import com.vanniktech.maven.publish.SourcesJar +import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile @@ -40,6 +41,11 @@ kotlin { linuxArm64() mingwX64() + @OptIn(ExperimentalWasmDsl::class) + wasmWasi { + nodejs() + } + sourceSets { commonMain { dependencies { @@ -73,6 +79,12 @@ tasks.withType().configureEach { useJUnitPlatform() } +// Kotest 6.x does not publish wasmWasi artifacts yet, so commonTest cannot be +// compiled for this target. Validate main compilation only until upstream support lands. +listOf("compileTestKotlinWasmWasi", "wasmWasiTest", "wasmWasiNodeTest").forEach { taskName -> + tasks.matching { it.name == taskName }.configureEach { enabled = false } +} + // Kotest 6.x JVM artifacts are built with Java 11 bytecode, while the library // artifact itself still targets Java 8 for consumer compatibility. tasks.named("compileTestKotlinJvm") {