05a1e91298
Adopts the new default project template[1] and removed mpp targets[2]. [1] https://kotlinlang.org/docs/whatsnew1920.html#template-for-configuring-multiplatform-projects [2] https://kotlinlang.org/docs/whatsnew1920.html#change-to-our-target-tiers-policy See: https://kotl.in/native-targets-tiers
132 lines
4.8 KiB
YAML
132 lines
4.8 KiB
YAML
name: ci
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest, macos-11, windows-latest ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.konan
|
|
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('buildSrc/src/main/kotlin/Versions.kt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-konan-
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.*') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-wrapper-
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('buildSrc/src/main/kotlin/Versions.kt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-caches-
|
|
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
|
|
- run: ./gradlew linuxX64Test
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
- run: ./gradlew mingwX64Test
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
- run: ./gradlew build
|
|
if: matrix.os == 'macos-11'
|
|
|
|
publish:
|
|
needs: build
|
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && needs.build.result == 'success'
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest, macos-11, windows-latest ]
|
|
|
|
env:
|
|
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
|
|
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
|
|
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
|
|
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
|
|
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.konan
|
|
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('buildSrc/src/main/kotlin/Versions.kt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-konan-
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.*') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-wrapper-
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('buildSrc/src/main/kotlin/Versions.kt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-caches-
|
|
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
|
|
# ./gradlew tasks | grep "PublicationToMavenRepository" | grep -e "publishAndroid" -e "publishJs" -e "publishJvm" -e "publishKotlinMultiplatform" -e "publishLinux" -e "publishWasm" | cut -d ' ' -f 1
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
run: >
|
|
./gradlew
|
|
publishAndroidNativeArm32PublicationToMavenRepository
|
|
publishAndroidNativeArm64PublicationToMavenRepository
|
|
publishAndroidNativeX64PublicationToMavenRepository
|
|
publishAndroidNativeX86PublicationToMavenRepository
|
|
publishJsPublicationToMavenRepository
|
|
publishJvmPublicationToMavenRepository
|
|
publishKotlinMultiplatformPublicationToMavenRepository
|
|
publishLinuxArm64PublicationToMavenRepository
|
|
publishLinuxX64PublicationToMavenRepository
|
|
publishWasmJsPublicationToMavenRepository
|
|
|
|
# ./gradlew tasks | grep "PublicationToMavenRepository" | grep "publishMingw" | cut -d ' ' -f 1
|
|
- if: matrix.os == 'windows-latest'
|
|
run: >
|
|
./gradlew
|
|
publishMingwX64PublicationToMavenRepository
|
|
|
|
# ./gradlew tasks | grep "PublicationToMavenRepository" | grep -e "publishIos" -e "publishMacos" -e "publishTvos" -e "publishWatchos" | cut -d ' ' -f 1
|
|
- if: matrix.os == 'macos-11'
|
|
run: >
|
|
./gradlew
|
|
publishIosArm64PublicationToMavenRepository
|
|
publishIosSimulatorArm64PublicationToMavenRepository
|
|
publishIosX64PublicationToMavenRepository
|
|
publishMacosArm64PublicationToMavenRepository
|
|
publishMacosX64PublicationToMavenRepository
|
|
publishTvosArm64PublicationToMavenRepository
|
|
publishTvosSimulatorArm64PublicationToMavenRepository
|
|
publishTvosX64PublicationToMavenRepository
|
|
publishWatchosArm32PublicationToMavenRepository
|
|
publishWatchosArm64PublicationToMavenRepository
|
|
publishWatchosSimulatorArm64PublicationToMavenRepository
|
|
publishWatchosX64PublicationToMavenRepository
|
|
|