diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e2a7d34..43d28657 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ windows-latest, macos-latest ] # ubuntu-latest, ] steps: - name: Checkout uses: actions/checkout@v2.3.3 diff --git a/ktoml-core/build.gradle.kts b/ktoml-core/build.gradle.kts index 112e1f46..410e1643 100644 --- a/ktoml-core/build.gradle.kts +++ b/ktoml-core/build.gradle.kts @@ -16,9 +16,15 @@ kotlin { } } } - linuxX64() - mingwX64() - macosX64() + + val os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem() + // Create a target for the host platform. + when { + os.isLinux -> linuxX64() + os.isWindows -> mingwX64() + os.isMacOsX -> macosX64() + else -> throw GradleException("Host OS '${os.name}' is not supported in Kotlin/Native $project.") + } sourceSets { val commonMain by getting {