From eedfcf393287a6dbf499e23cafa91380bc4c2390 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Sun, 4 Oct 2020 15:53:24 +0700 Subject: [PATCH] Drop mingw support in GSL module --- .github/workflows/gradle.yml | 5 +---- kmath-gsl/build.gradle.kts | 14 +++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9335c2123..4557369bf 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -73,10 +73,7 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11 - - name: Install mingw-w64-x86_64-gsl - run: c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gsl - name: Add msys to path - # msys installed on default image but not in path run: SETX PATH "%PATH%;C:\msys64\mingw64\bin" - name: Cache gradle uses: actions/cache@v2 @@ -96,4 +93,4 @@ jobs: key: ${{ runner.os }}-konan-1.4.20-eap-37 restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37 - name: Build with Gradle - run: ./gradlew --build-cache :kmath-gsl:cinteropLibgslNative build + run: ./gradlew --build-cache build diff --git a/kmath-gsl/build.gradle.kts b/kmath-gsl/build.gradle.kts index dfee9b311..b73b1c82c 100644 --- a/kmath-gsl/build.gradle.kts +++ b/kmath-gsl/build.gradle.kts @@ -5,13 +5,13 @@ plugins { } kotlin { - val hostOs = System.getProperty("os.name") - - val nativeTarget = when { - hostOs == "Mac OS X" -> macosX64("native") - hostOs == "Linux" -> linuxX64("native") - hostOs.startsWith("Windows") -> mingwX64("native") - else -> throw GradleException("Host OS is not supported in Kotlin/Native.") + val nativeTarget = when (System.getProperty("os.name")) { + "Mac OS X" -> macosX64("native") + "Linux" -> linuxX64("native") + else -> { + logger.warn("Current OS cannot build any of kmath-gsl targets.") + return@kotlin + } } val main by nativeTarget.compilations.getting {