Build infrastructure changes

This commit is contained in:
Iaroslav Postovalov 2021-07-17 01:12:14 +07:00
parent ecd70f2139
commit ef41c3f168
17 changed files with 87 additions and 85 deletions

View File

@ -2,8 +2,10 @@ name: Gradle build
on: on:
push: push:
branches:
- dev
- master
pull_request: pull_request:
types: [opened, edited]
jobs: jobs:
build: build:
@ -21,9 +23,6 @@ jobs:
graalvm: 21.1.0 graalvm: 21.1.0
java: java11 java: java11
arch: amd64 arch: amd64
- name: Add msys to path
if: matrix.os == 'windows-latest'
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
- name: Cache gradle - name: Cache gradle
uses: actions/cache@v2 uses: actions/cache@v2
with: with:

View File

@ -2,23 +2,26 @@ name: Dokka publication
on: on:
push: push:
branches: branches: [ master ]
- master
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Checkout the repo - uses: actions/checkout@v2
uses: actions/checkout@v2 - uses: DeLaGuardo/setup-graalvm@4.0
- name: Set up JDK 11
uses: actions/setup-java@v1
with: with:
java-version: 11 graalvm: 21.1.0
- name: Build java: java11
run: ./gradlew dokkaHtmlMultiModule --no-daemon --no-parallel --stacktrace arch: amd64
- name: Deploy to GitHub Pages - uses: actions/cache@v2
uses: JamesIves/github-pages-deploy-action@4.1.0 with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- run: ./gradlew dokkaHtmlMultiModule --no-daemon --no-parallel --stacktrace
- uses: JamesIves/github-pages-deploy-action@4.1.0
with: with:
branch: gh-pages branch: gh-pages
folder: build/dokka/htmlMultiModule folder: build/dokka/htmlMultiModule

View File

@ -3,8 +3,7 @@ name: Gradle publish
on: on:
workflow_dispatch: workflow_dispatch:
release: release:
types: types: [ created ]
- created
jobs: jobs:
publish: publish:
@ -23,13 +22,12 @@ jobs:
graalvm: 21.1.0 graalvm: 21.1.0
java: java11 java: java11
arch: amd64 arch: amd64
- name: Add msys to path
if: matrix.os == 'windows-latest'
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
- name: Cache gradle - name: Cache gradle
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ~/.gradle/caches path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: | restore-keys: |
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
@ -43,19 +41,12 @@ jobs:
- name: Publish Windows Artifacts - name: Publish Windows Artifacts
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
run: > run: >
./gradlew release --no-daemon ./gradlew release --no-daemon -Ppublishing.enabled=true
-Ppublishing.enabled=true
-Ppublishing.github.user=${{ secrets.PUBLISHING_GITHUB_USER }}
-Ppublishing.github.token=${{ secrets.PUBLISHING_GITHUB_TOKEN }}
-Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }} -Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }}
-Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }} -Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }}
- name: Publish Mac Artifacts - name: Publish Mac Artifacts
if: matrix.os == 'macOS-latest' if: matrix.os == 'macOS-latest'
run: > run: >
./gradlew release --no-daemon ./gradlew release --no-daemon -Ppublishing.enabled=true -Ppublishing.platform=macosX64
-Ppublishing.enabled=true
-Ppublishing.platform=macosX64
-Ppublishing.github.user=${{ secrets.PUBLISHING_GITHUB_USER }}
-Ppublishing.github.token=${{ secrets.PUBLISHING_GITHUB_TOKEN }}
-Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }} -Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }}
-Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }} -Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }}

View File

@ -1,3 +1,5 @@
import java.net.URL
plugins { plugins {
id("ru.mipt.npm.gradle.project") id("ru.mipt.npm.gradle.project")
kotlin("jupyter.api") apply false kotlin("jupyter.api") apply false
@ -7,9 +9,11 @@ allprojects {
repositories { repositories {
maven("https://clojars.org/repo") maven("https://clojars.org/repo")
maven("https://jitpack.io") maven("https://jitpack.io")
maven("http://logicrunch.research.it.uu.se/maven") { maven("http://logicrunch.research.it.uu.se/maven") {
isAllowInsecureProtocol = true isAllowInsecureProtocol = true
} }
maven("https://oss.sonatype.org/content/repositories/snapshots") maven("https://oss.sonatype.org/content/repositories/snapshots")
mavenCentral() mavenCentral()
} }
@ -23,16 +27,30 @@ subprojects {
afterEvaluate { afterEvaluate {
tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial> { tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial> {
dependsOn(tasks.getByName("assemble")) dependsOn(tasks["assemble"])
dokkaSourceSets.all { dokkaSourceSets.all {
val readmeFile = File(this@subprojects.projectDir, "README.md") val readmeFile = this@subprojects.projectDir.resolve("README.md")
if (readmeFile.exists()) includes.from(readmeFile.absolutePath) if (readmeFile.exists()) includes.from(readmeFile)
externalDocumentationLink("https://ejml.org/javadoc/") val kotlinDirPath = "src/$name/kotlin"
val kotlinDir = file(kotlinDirPath)
if (kotlinDir.exists()) sourceLink {
localDirectory.set(kotlinDir)
remoteUrl.set(
URL("https://github.com/mipt-npm/${rootProject.name}/tree/master/${this@subprojects.name}/$kotlinDirPath")
)
}
externalDocumentationLink("https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/") externalDocumentationLink("https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/")
externalDocumentationLink("https://deeplearning4j.org/api/latest/") externalDocumentationLink("https://deeplearning4j.org/api/latest/")
externalDocumentationLink("https://axelclk.bitbucket.io/symja/javadoc/") externalDocumentationLink("https://axelclk.bitbucket.io/symja/javadoc/")
externalDocumentationLink("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/")
externalDocumentationLink(
"https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/",
"https://kotlin.github.io/kotlinx.coroutines/package-list",
)
externalDocumentationLink( externalDocumentationLink(
"https://breandan.net/kotlingrad/kotlingrad/", "https://breandan.net/kotlingrad/kotlingrad/",
@ -43,16 +61,12 @@ subprojects {
} }
} }
readme { readme.readmeTemplate = file("docs/templates/README-TEMPLATE.md")
readmeTemplate = file("docs/templates/README-TEMPLATE.md")
}
ksciencePublish { ksciencePublish {
github("kmath") vcs("https://github.com/mipt-npm/kmath")
space() space(publish = true)
sonatype() sonatype(publish = true)
} }
apiValidation { apiValidation.nonPublicMarkers.add("space.kscience.kmath.misc.UnstableKMathAPI")
nonPublicMarkers.add("space.kscience.kmath.misc.UnstableKMathAPI")
}

View File

@ -11,7 +11,7 @@ repositories {
dependencies { dependencies {
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0") api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0")
api("ru.mipt.npm:gradle-tools:0.10.0") api("ru.mipt.npm:gradle-tools:0.10.1")
api("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:0.3.1") api("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:0.3.1")
} }

View File

@ -7,7 +7,6 @@ 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.enableDependencyPropagation=false
kotlin.parallel.tasks.in.project=true
org.gradle.configureondemand=true org.gradle.configureondemand=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G
org.gradle.parallel=true org.gradle.parallel=true

View File

@ -10,7 +10,7 @@ The core interfaces of KMath.
objects to the expression by providing a context. Expressions can be used for a wide variety of purposes from high objects to the expression by providing a context. Expressions can be used for a wide variety of purposes from high
performance calculations to code generation. performance calculations to code generation.
- [domains](src/commonMain/kotlin/space/kscience/kmath/domains) : Domains - [domains](src/commonMain/kotlin/space/kscience/kmath/domains) : Domains
- [autodif](src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation - [autodiff](src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation
## Artifact: ## Artifact:

View File

@ -19,51 +19,42 @@ readme {
feature( feature(
id = "algebras", id = "algebras",
description = """ ref = "src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt",
Algebraic structures like rings, spaces and fields. ) { "Algebraic structures like rings, spaces and fields." }
""".trimIndent(),
ref = "src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt"
)
feature( feature(
id = "nd", id = "nd",
description = "Many-dimensional structures and operations on them.", ref = "src/commonMain/kotlin/space/kscience/kmath/structures/StructureND.kt",
ref = "src/commonMain/kotlin/space/kscience/kmath/structures/StructureND.kt" ) { "Many-dimensional structures and operations on them." }
)
feature( feature(
id = "linear", id = "linear",
description = """ ref = "src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt",
Basic linear algebra operations (sums, products, etc.), backed by the `Space` API. Advanced linear algebra operations like matrix inversion and LU decomposition. ) { "Basic linear algebra operations (sums, products, etc.), backed by the `Space` API. Advanced linear algebra operations like matrix inversion and LU decomposition." }
""".trimIndent(),
ref = "src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt"
)
feature( feature(
id = "buffers", id = "buffers",
description = "One-dimensional structure", ref = "src/commonMain/kotlin/space/kscience/kmath/structures/Buffers.kt",
ref = "src/commonMain/kotlin/space/kscience/kmath/structures/Buffers.kt" ) { "One-dimensional structure" }
)
feature( feature(
id = "expressions", id = "expressions",
description = """ ref = "src/commonMain/kotlin/space/kscience/kmath/expressions"
) {
"""
By writing a single mathematical expression once, users will be able to apply different types of By writing a single mathematical expression once, users will be able to apply different types of
objects to the expression by providing a context. Expressions can be used for a wide variety of purposes from high objects to the expression by providing a context. Expressions can be used for a wide variety of purposes from high
performance calculations to code generation. performance calculations to code generation.
""".trimIndent(), """.trimIndent()
ref = "src/commonMain/kotlin/space/kscience/kmath/expressions" }
)
feature( feature(
id = "domains", id = "domains",
description = "Domains", ref = "src/commonMain/kotlin/space/kscience/kmath/domains",
ref = "src/commonMain/kotlin/space/kscience/kmath/domains" ) { "Domains" }
)
feature( feature(
id = "autodif", id = "autodiff",
description = "Automatic differentiation",
ref = "src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt" ref = "src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt"
) ) { "Automatic differentiation" }
} }

View File

@ -1,6 +1,7 @@
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("ru.mipt.npm.gradle.common") id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
} }
kotlin.sourceSets { kotlin.sourceSets {

View File

@ -6,10 +6,10 @@ plugins {
} }
dependencies { dependencies {
api("org.ejml:ejml-ddense:0.40") api("org.ejml:ejml-ddense:0.41")
api("org.ejml:ejml-fdense:0.40") api("org.ejml:ejml-fdense:0.41")
api("org.ejml:ejml-dsparse:0.40") api("org.ejml:ejml-dsparse:0.41")
api("org.ejml:ejml-fsparse:0.40") api("org.ejml:ejml-fsparse:0.41")
api(project(":kmath-core")) api(project(":kmath-core"))
} }

View File

@ -1,6 +1,7 @@
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("ru.mipt.npm.gradle.common") id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
} }
kotlin.sourceSets.commonMain { kotlin.sourceSets.commonMain {

View File

@ -1,6 +1,7 @@
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("ru.mipt.npm.gradle.common") id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
} }
description = "Functions, integration and interpolation" description = "Functions, integration and interpolation"

View File

@ -1,6 +1,7 @@
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("ru.mipt.npm.gradle.common") id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
} }
kotlin.sourceSets.commonMain { kotlin.sourceSets.commonMain {

View File

@ -1,6 +1,7 @@
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("ru.mipt.npm.gradle.common") id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
} }
kscience { kscience {

View File

@ -1,6 +1,7 @@
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("ru.mipt.npm.gradle.common") id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
} }
kscience { kscience {

View File

@ -1,11 +1,14 @@
plugins { plugins {
id("ru.mipt.npm.gradle.mpp") kotlin("multiplatform")
id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
} }
kotlin.sourceSets { kotlin.sourceSets {
all { all {
languageSettings.useExperimentalAnnotation("space.kscience.kmath.misc.UnstableKMathAPI") languageSettings.useExperimentalAnnotation("space.kscience.kmath.misc.UnstableKMathAPI")
} }
commonMain { commonMain {
dependencies { dependencies {
api(project(":kmath-core")) api(project(":kmath-core"))
@ -14,10 +17,6 @@ kotlin.sourceSets {
} }
} }
tasks.dokkaHtml {
dependsOn(tasks.build)
}
readme { readme {
maturity = ru.mipt.npm.gradle.Maturity.PROTOTYPE maturity = ru.mipt.npm.gradle.Maturity.PROTOTYPE
propertyByTemplate("artifact", rootProject.file("docs/templates/ARTIFACT-TEMPLATE.md")) propertyByTemplate("artifact", rootProject.file("docs/templates/ARTIFACT-TEMPLATE.md"))

View File

@ -5,8 +5,8 @@ pluginManagement {
gradlePluginPortal() gradlePluginPortal()
} }
val toolsVersion = "0.10.0" val toolsVersion = "0.10.1"
val kotlinVersion = "1.5.20" val kotlinVersion = "1.5.21"
plugins { plugins {
id("ru.mipt.npm.gradle.project") version toolsVersion id("ru.mipt.npm.gradle.project") version toolsVersion
@ -16,7 +16,7 @@ pluginManagement {
kotlin("jvm") version kotlinVersion kotlin("jvm") version kotlinVersion
kotlin("plugin.allopen") version kotlinVersion kotlin("plugin.allopen") version kotlinVersion
id("org.jetbrains.kotlinx.benchmark") version "0.3.1" id("org.jetbrains.kotlinx.benchmark") version "0.3.1"
kotlin("jupyter.api") version "0.10.0-25" kotlin("jupyter.api") version "0.10.0-131-1"
} }
} }