forked from kscience/kmath
Rework GA workflows
This commit is contained in:
parent
1a7dddd497
commit
d0cf16c8a6
110
.github/workflows/build.yml
vendored
110
.github/workflows/build.yml
vendored
@ -1,107 +1,35 @@
|
|||||||
name: Gradle build
|
name: build
|
||||||
|
|
||||||
on: [ push ]
|
on: [ push ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-ubuntu:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ macOS-latest, windows-latest ]
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout the repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Install Chrome
|
|
||||||
run: |
|
|
||||||
sudo apt install -y libappindicator1 fonts-liberation
|
|
||||||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
||||||
sudo dpkg -i google-chrome*.deb
|
|
||||||
- name: Cache gradle
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
.gradle
|
|
||||||
build
|
|
||||||
~/.gradle
|
|
||||||
key: gradle
|
|
||||||
restore-keys: gradle
|
|
||||||
|
|
||||||
- name: Cache konan
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.konan/dependencies
|
|
||||||
~/.konan/kotlin-native-prebuilt-linux-*
|
|
||||||
key: ${{ runner.os }}-konan
|
|
||||||
restore-keys: ${{ runner.os }}-konan
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew -Dorg.gradle.daemon=false --build-cache build
|
|
||||||
|
|
||||||
build-osx:
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 11
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Cache gradle
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
.gradle
|
|
||||||
build
|
|
||||||
~/.gradle
|
|
||||||
key: gradle
|
|
||||||
restore-keys: gradle
|
|
||||||
|
|
||||||
- name: Cache konan
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.konan/dependencies
|
|
||||||
~/.konan/kotlin-native-prebuilt-macos-*
|
|
||||||
key: ${{ runner.os }}-konan
|
|
||||||
restore-keys: ${{ runner.os }}-konan
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build
|
|
||||||
|
|
||||||
build-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 11
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Add msys to path
|
- name: Add msys to path
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
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
|
||||||
with:
|
with:
|
||||||
path: |
|
path: ~/.gradle/caches
|
||||||
.gradle
|
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
|
||||||
build
|
restore-keys: |
|
||||||
~/.gradle
|
${{ runner.os }}-gradle-
|
||||||
key: ${{ runner.os }}-gradle
|
|
||||||
restore-keys: ${{ runner.os }}-gradle
|
|
||||||
|
|
||||||
- name: Cache konan
|
- name: Cache konan
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: ~/.konan
|
||||||
~/.konan/dependencies
|
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
|
||||||
~/.konan/kotlin-native-prebuilt-mingw-*
|
restore-keys: |
|
||||||
key: ${{ runner.os }}-konan
|
${{ runner.os }}-gradle-
|
||||||
restore-keys: ${{ runner.os }}-konan
|
- name: Build
|
||||||
- name: Build with Gradle
|
run: ./gradlew build --no-daemon --stacktrace
|
||||||
run: ./gradlew --build-cache build
|
|
||||||
|
43
.github/workflows/deploy.yml
vendored
Normal file
43
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: deploy
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [macOS-latest, windows-latest]
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set up JDK 11
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
- name: Add msys to path
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
|
||||||
|
- name: Cache gradle
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.gradle/caches
|
||||||
|
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gradle-
|
||||||
|
- name: Cache konan
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.konan
|
||||||
|
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gradle-
|
||||||
|
- name: Publish Mac Artifacts
|
||||||
|
if: matrix.os == 'macOS-latest'
|
||||||
|
run: ./gradlew publish --no-daemon --stacktrace -PsonatypePublish=true -PsonatypeUser=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
|
||||||
|
env:
|
||||||
|
signingKey: ${{ secrets.SIGNING_KEY }}
|
||||||
|
- name: Publish Windows Artifacts
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: ./gradlew publish --no-daemon --stacktrace -PsonatypePublish=true -PsonatypeUser=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
|
||||||
|
env:
|
||||||
|
signingKey: ${{ secrets.SIGNING_KEY }}
|
117
.github/workflows/release.yml
vendored
117
.github/workflows/release.yml
vendored
@ -1,117 +0,0 @@
|
|||||||
name: Gradle release
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- created
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-ubuntu:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 11
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Install Chrome
|
|
||||||
run: |
|
|
||||||
sudo apt install -y libappindicator1 fonts-liberation
|
|
||||||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
||||||
sudo dpkg -i google-chrome*.deb
|
|
||||||
- name: Cache gradle
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
.gradle
|
|
||||||
build
|
|
||||||
~/.gradle
|
|
||||||
key: gradle
|
|
||||||
restore-keys: gradle
|
|
||||||
|
|
||||||
- name: Cache konan
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.konan/dependencies
|
|
||||||
~/.konan/kotlin-native-prebuilt-linux-*
|
|
||||||
key: ${{ runner.os }}-konan
|
|
||||||
restore-keys: ${{ runner.os }}-konan
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew -Dorg.gradle.daemon=false --build-cache build
|
|
||||||
- name: Run release task
|
|
||||||
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
|
||||||
|
|
||||||
build-osx:
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 11
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Cache gradle
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
.gradle
|
|
||||||
build
|
|
||||||
~/.gradle
|
|
||||||
key: gradle
|
|
||||||
restore-keys: gradle
|
|
||||||
|
|
||||||
- name: Cache konan
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.konan/dependencies
|
|
||||||
~/.konan/kotlin-native-prebuilt-macos-*
|
|
||||||
key: ${{ runner.os }}-konan
|
|
||||||
restore-keys: ${{ runner.os }}-konan
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build
|
|
||||||
- name: Run release task
|
|
||||||
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
|
||||||
|
|
||||||
build-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 11
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Add msys to path
|
|
||||||
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
|
|
||||||
- name: Cache gradle
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
.gradle
|
|
||||||
build
|
|
||||||
~/.gradle
|
|
||||||
key: ${{ runner.os }}-gradle
|
|
||||||
restore-keys: ${{ runner.os }}-gradle
|
|
||||||
|
|
||||||
- name: Cache konan
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.konan/dependencies
|
|
||||||
~/.konan/kotlin-native-prebuilt-mingw-*
|
|
||||||
key: ${{ runner.os }}-konan
|
|
||||||
restore-keys: ${{ runner.os }}-konan
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew --build-cache build
|
|
||||||
- name: Run release task
|
|
||||||
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
|
import ru.mipt.npm.gradle.KSciencePublishingPlugin
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("ru.mipt.npm.gradle.project")
|
id("ru.mipt.npm.gradle.project")
|
||||||
}
|
}
|
||||||
@ -22,7 +24,14 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
if (name.startsWith("kmath")) apply<ru.mipt.npm.gradle.KSciencePublishingPlugin>()
|
if (name.startsWith("kmath")) {
|
||||||
|
apply<KSciencePublishingPlugin>()
|
||||||
|
|
||||||
|
val publishWindows by tasks.creating {
|
||||||
|
tasks.find { it.name == "publishMingwX64PublicationToSpaceRepository" }?.let { dependsOn(it) }
|
||||||
|
tasks.find { it.name == "publishMingwX64PublicationToSonatypeRepository" }?.let { dependsOn(it) }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readme {
|
readme {
|
||||||
@ -35,6 +44,6 @@ ksciencePublish {
|
|||||||
githubProject = "kmath"
|
githubProject = "kmath"
|
||||||
}
|
}
|
||||||
|
|
||||||
apiValidation{
|
apiValidation {
|
||||||
nonPublicMarkers.add("space.kscience.kmath.misc.UnstableKMathAPI")
|
nonPublicMarkers.add("space.kscience.kmath.misc.UnstableKMathAPI")
|
||||||
}
|
}
|
@ -3,6 +3,7 @@ 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
|
kotlin.parallel.tasks.in.project=true
|
||||||
|
org.gradle.configureondemand=true
|
||||||
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
|
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
systemProp.org.gradle.internal.publish.checksums.insecure=true
|
systemProp.org.gradle.internal.publish.checksums.insecure=true
|
||||||
|
Loading…
Reference in New Issue
Block a user