diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6474b9a..c587f7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: build: strategy: matrix: - os: [ ubuntu-20.04, windows-2019 ] + os: [ ubuntu-20.04, windows-2019, macos-12 ] runs-on: ${{matrix.os}} timeout-minutes: 40 steps: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6964e05..d826751 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ jobs: publish: strategy: matrix: - os: [ ubuntu-20.04, windows-2019 ] + os: [ ubuntu-20.04, windows-2019, macos-12 ] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v3 @@ -51,3 +51,10 @@ jobs: releaseMingwX64 --build-cache --no-daemon -Ppublishing.enabled=true -Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }} -Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }} + - if: matrix.os == 'macos-12' + uses: gradle/gradle-build-action@v2.3.3 + with: + arguments: > + releaseMacosX64 --build-cache --no-daemon -Ppublishing.enabled=true + -Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }} + -Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }} diff --git a/README.md b/README.md index 2d8c5a5..421a1b8 100644 --- a/README.md +++ b/README.md @@ -10,31 +10,31 @@ - [matrix-contexts](src/nativeMain/kotlin/GslLinearSpace.kt) : LinearSpace implementations for Double, Float, and Complex matrices and vectors implemented with GSL -## Artifact: - -The Maven coordinates of this project are `space.kscience:kmath-gsl:0.3.0-dev-5`. - -**Gradle Groovy:** -```groovy -repositories { - maven { url 'https://repo.kotlin.link' } - mavenCentral() -} - -dependencies { - implementation 'space.kscience:kmath-gsl:0.3.0-dev-5' -} -``` -**Gradle Kotlin DSL:** -```kotlin -repositories { - maven("https://repo.kotlin.link") - mavenCentral() -} - -dependencies { - implementation("space.kscience:kmath-gsl:0.3.0-dev-5") -} +## Artifact: + +The Maven coordinates of this project are `space.kscience:kmath-gsl:0.3.0-dev-5`. + +**Gradle Groovy:** +```groovy +repositories { + maven { url 'https://repo.kotlin.link' } + mavenCentral() +} + +dependencies { + implementation 'space.kscience:kmath-gsl:0.3.0-dev-5' +} +``` +**Gradle Kotlin DSL:** +```kotlin +repositories { + maven("https://repo.kotlin.link") + mavenCentral() +} + +dependencies { + implementation("space.kscience:kmath-gsl:0.3.0-dev-5") +} ``` ## Additional requirements diff --git a/build.gradle.kts b/build.gradle.kts index 4058416..20e6a13 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,6 @@ plugins { alias(libs.plugins.download) alias(kscienceLibs.plugins.gradle.project) alias(kscienceLibs.plugins.kotlin.multiplatform) - id("org.jetbrains.dokka") version "1.7.20" } group = "space.kscience" @@ -33,6 +32,7 @@ kotlin { val nativeTargets = setOf( linuxX64(), mingwX64(), + macosX64(), ) val downloadLinks = when (HostManager.hostOs()) { @@ -42,6 +42,10 @@ kotlin { "windows" -> DownloadLinks(gsl = null) + "osx" -> DownloadLinks( + gsl = "https://anaconda.org/conda-forge/gsl/2.7/download/osx-64/gsl-2.7-h93259b0_0.tar.bz2" + ) + else -> { logger.warn("Current OS cannot build any of kmath-gsl targets.") return@kotlin @@ -87,6 +91,11 @@ kotlin { staticLibraries.linux=libgsl.a libgslcblas.a compilerOpts.linux=-I${thirdPartyDir}/include/ libraryPaths.linux=${thirdPartyDir}/lib/ + + linkerOpts.osx=-L/opt/local/lib -L/usr/local/lib -lblas + staticLibraries.osx=libgsl.a libgslcblas.a + compilerOpts.osx=-I${thirdPartyDir}/include/ + libraryPaths.osx=${thirdPartyDir}/lib/ linkerOpts.mingw=-LC:/msys64/mingw64/lib/ -LC:/msys64/mingw64/bin/ staticLibraries.mingw=libgsl.a libgslcblas.a @@ -113,7 +122,7 @@ kotlin { commonMain { dependencies { - api("space.kscience:kmath-complex:0.3.1-dev-5") + api("space.kscience:kmath-complex:0.3.0") } }