Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain Boisselle committed Mar 1, 2021
1 parent d40efd2 commit a73c459
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 41 deletions.
3 changes: 1 addition & 2 deletions .github/conf/kodein.local.macos-latest.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
javah = ${JAVA_HOME_8_0_265_X64}/bin/javah
excludeTargets = linuxX64, linuxArm32Hfp, linuxArm64
javah = ${JAVA_HOME_8_0_265_X64}/bin/javah
3 changes: 1 addition & 2 deletions .github/conf/kodein.local.ubuntu-latest.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
javah = ${JAVA_HOME_8_0_265_X64}/bin/javah
excludeTargets = android
javah = ${JAVA_HOME_8_0_265_X64}/bin/javah
44 changes: 25 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ jobs:
description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }}

build-upload:
needs: create-staging-repository
runs-on: ${{ matrix.os }}
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.PGP_SIGNING_KEY }}
GPG_PRIVATE_PASSWORD: ${{ secrets.PGP_SIGNING_PASSWORD }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
Expand All @@ -45,11 +51,11 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: '8.0.265'
- name: Setup Android SDK dir for MacOS
if: matrix.os == 'macos-latest'
- name: Setup Android SDK dir
if: matrix.os != 'windows-latest'
run: echo sdk.dir=$ANDROID_HOME > local.properties
- name: install default NDK for AGP
if: matrix.os == 'macos-latest'
if: matrix.os != 'windows-latest'
run: $ANDROID_HOME/tools/bin/sdkmanager "ndk;21.3.6528147"
- name: Set up JDK 11
uses: actions/setup-java@v1
Expand All @@ -70,32 +76,32 @@ jobs:
- name: Set up Gradle & Konan
shell: bash
run: ./gradlew
# Host only for Ubuntu / Windows
- name: Check (ubuntu / windows)
if: matrix.os != 'macos-latest'
# Host only for MacOS / Windows
- name: Check (macos / windows)
if: matrix.os != 'ubuntu-latest'
run: ./gradlew hostOnlyTest
shell: bash
- name: Upload (ubuntu / windows)
if: matrix.os != 'macos-latest'
shell: bash
run: ./gradlew hostOnlyPublish
# Publish all on MacOS
- name: Check (macos)
if: matrix.os == 'macos-latest'
shell: bash
run: ./gradlew check
- name: Check Android (macos)
- name: Check Android
if: matrix.os == 'macos-latest'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
ndk: 21.3.6528147
cmake: 3.10.2.4988404
script: ./gradlew connectedCheck
- name: Upload (macos)
if: matrix.os == 'macos-latest'
- name: Upload (macos / windows)
if: matrix.os != 'ubuntu-latest'
shell: bash
run: ./gradlew hostOnlyPublish -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository_id }}
# Publish all on Ubuntu
- name: Check (ubuntu)
if: matrix.os == 'ubuntu-latest'
shell: bash
run: ./gradlew check
- name: Upload (ubuntu)
if: matrix.os == 'ubuntu-latest'
shell: bash
run: ./gradlew publishAllPublicationsToOssrhStagingRepository
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository_id }}

drop-or-release:
needs: [create-staging-repository, build-upload]
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: '8.0.265'
- name: Setup Android SDK dir for MacOS
if: matrix.os == 'macos-latest'
- name: Setup Android SDK dir
if: matrix.os != 'windows-latest'
run: echo sdk.dir=$ANDROID_HOME > local.properties
- name: install default NDK for AGP
if: matrix.os == 'macos-latest'
if: matrix.os != 'windows-latest'
run: $ANDROID_HOME/tools/bin/sdkmanager "ndk;21.3.6528147"
- name: Set up JDK 11
uses: actions/setup-java@v1
Expand All @@ -69,20 +69,11 @@ jobs:
- name: Set up Gradle & Konan
shell: bash
run: ./gradlew
# Host only for Ubuntu / Windows
- name: Check (ubuntu / windows)
if: matrix.os != 'macos-latest'
# Host only for MacOS / Windows
- name: Check (macos / windows)
if: matrix.os != 'ubuntu-latest'
run: ./gradlew hostOnlyTest
shell: bash
- name: Upload (ubuntu / windows)
if: matrix.os != 'macos-latest'
shell: bash
run: ./gradlew hostOnlyPublish -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }} --stacktrace
# Publish all on MacOS
- name: Check (macos)
if: matrix.os == 'macos-latest'
shell: bash
run: ./gradlew check
- name: Check Android (macos)
if: matrix.os == 'macos-latest'
uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -91,7 +82,16 @@ jobs:
ndk: 21.3.6528147
cmake: 3.10.2.4988404
script: ./gradlew connectedCheck
- name: Upload (macos)
if: matrix.os == 'macos-latest'
- name: Upload (macos / windows)
if: matrix.os != 'ubuntu-latest'
shell: bash
run: ./gradlew hostOnlyPublish -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }} --stacktrace
# Publish all on Ubuntu
- name: Check (ubuntu)
if: matrix.os == 'ubuntu-latest'
shell: bash
run: ./gradlew check
- name: Upload (ubuntu)
if: matrix.os == 'ubuntu-latest'
shell: bash
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }} --stacktrace
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ kotlin.native.ignoreIncorrectDependencies = true

# Android
android.useAndroidX = true

# Kodein
org.kodein.sonatype.repositoryId = local
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip

0 comments on commit a73c459

Please sign in to comment.