Changes for upcoming GSL extension project #148
5
.github/workflows/gradle.yml
vendored
5
.github/workflows/gradle.yml
vendored
@ -73,10 +73,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
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
|
- name: Add msys to path
|
||||||
# msys installed on default image but not in path
|
|
||||||
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
|
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
|
||||||
- name: Cache gradle
|
- name: Cache gradle
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -96,4 +93,4 @@ jobs:
|
|||||||
key: ${{ runner.os }}-konan-1.4.20-eap-37
|
key: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||||
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
|
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew --build-cache :kmath-gsl:cinteropLibgslNative build
|
run: ./gradlew --build-cache build
|
||||||
|
@ -5,13 +5,13 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
val hostOs = System.getProperty("os.name")
|
val nativeTarget = when (System.getProperty("os.name")) {
|
||||||
|
"Mac OS X" -> macosX64("native")
|
||||||
val nativeTarget = when {
|
"Linux" -> linuxX64("native")
|
||||||
hostOs == "Mac OS X" -> macosX64("native")
|
else -> {
|
||||||
hostOs == "Linux" -> linuxX64("native")
|
logger.warn("Current OS cannot build any of kmath-gsl targets.")
|
||||||
hostOs.startsWith("Windows") -> mingwX64("native")
|
return@kotlin
|
||||||
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val main by nativeTarget.compilations.getting {
|
val main by nativeTarget.compilations.getting {
|
||||||
|
Loading…
Reference in New Issue
Block a user