Fix build

This commit is contained in:
Iaroslav Postovalov 2020-11-29 16:12:41 +07:00
parent e5d5ac17da
commit 4fc8d7b57c
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7
4 changed files with 16 additions and 17 deletions

View File

@ -33,9 +33,9 @@ jobs:
with: with:
path: | path: |
~/.konan/dependencies ~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-linux-1.4.20-eap-37 ~/.konan/kotlin-native-prebuilt-linux-1.4.20
key: ${{ runner.os }}-konan-1.4.20-eap-37 key: ${{ runner.os }}-konan-1.4.20
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37 restore-keys: ${{ runner.os }}-konan-1.4.20
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew -Dorg.gradle.daemon=false --build-cache build run: ./gradlew -Dorg.gradle.daemon=false --build-cache build
build-osx: build-osx:
@ -63,9 +63,9 @@ jobs:
with: with:
path: | path: |
~/.konan/dependencies ~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-macos-1.4.20-eap-37 ~/.konan/kotlin-native-prebuilt-macos-1.4.20
key: ${{ runner.os }}-konan-1.4.20-eap-37 key: ${{ runner.os }}-konan-1.4.20
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37 restore-keys: ${{ runner.os }}-konan-1.4.20
- name: Build with Gradle - name: Build with Gradle
run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build
@ -94,8 +94,8 @@ jobs:
with: with:
path: | path: |
~/.konan/dependencies ~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-mingw-1.4.20-eap-37 ~/.konan/kotlin-native-prebuilt-mingw-1.4.20
key: ${{ runner.os }}-konan-1.4.20-eap-37 key: ${{ runner.os }}-konan-1.4.20
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37 restore-keys: ${{ runner.os }}-konan-1.4.20
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew --build-cache build run: ./gradlew --build-cache build

View File

@ -1,6 +1,7 @@
kotlin.code.style=official kotlin.code.style=official
kotlin.mpp.enableGranularSourceSetsMetadata=true kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.stability.nowarn=true kotlin.mpp.stability.nowarn=true
kotlin.native.enableDependencyPropagation=false
kotlin.native.ignoreDisabledTargets=true kotlin.native.ignoreDisabledTargets=true
kotlin.parallel.tasks.in.project=true kotlin.parallel.tasks.in.project=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m

View File

@ -12,7 +12,7 @@ kotlin {
val nativeTarget = when (System.getProperty("os.name")) { val nativeTarget = when (System.getProperty("os.name")) {
"Mac OS X" -> macosX64() "Mac OS X" -> macosX64()
"Linux" -> linuxX64("native") "Linux" -> linuxX64()
else -> { else -> {
logger.warn("Current OS cannot build any of kmath-gsl targets.") logger.warn("Current OS cannot build any of kmath-gsl targets.")
@ -29,7 +29,7 @@ kotlin {
val test by nativeTarget.compilations.getting val test by nativeTarget.compilations.getting
sourceSets { sourceSets {
val nativeMain by getting { val nativeMain by creating {
val codegen by tasks.creating { val codegen by tasks.creating {
matricesCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Matrices.kt") matricesCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Matrices.kt")
vectorsCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Vectors.kt") vectorsCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Vectors.kt")
@ -42,11 +42,11 @@ kotlin {
} }
} }
val nativeTest by getting { val nativeTest by creating {
dependsOn(nativeMain) dependsOn(nativeMain)
} }
// main.defaultSourceSet.dependsOn(nativeMain) main.defaultSourceSet.dependsOn(nativeMain)
// test.defaultSourceSet.dependsOn(nativeTest) test.defaultSourceSet.dependsOn(nativeTest)
} }
} }

View File

@ -1,8 +1,6 @@
package kscience.kmath.gsl package kscience.kmath.gsl
import kotlinx.cinterop.CPointer import kotlinx.cinterop.*
import kotlinx.cinterop.DeferScope
import kotlinx.cinterop.pointed
import org.gnu.gsl.* import org.gnu.gsl.*
internal class GslRealVector(override val nativeHandle: CPointer<gsl_vector>, scope: DeferScope) : internal class GslRealVector(override val nativeHandle: CPointer<gsl_vector>, scope: DeferScope) :