Skip to content

Commit

Permalink
update CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbsl committed Nov 17, 2023
1 parent d8f9e3d commit c6a9708
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 52 deletions.
30 changes: 7 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
repository_id: ${{ steps.create.outputs.repository_id }}
steps:
- id: create
uses: nexus-actions/create-nexus-staging-repo@main
uses: nexus-actions/create-nexus-staging-repo@990063f02160c633c168037b8b3e8585c76469fe #v1.3
with:
base_url: https://s01.oss.sonatype.org/service/local/
username: ${{ secrets.SONATYPE_USERNAME }}
Expand All @@ -22,18 +22,15 @@ jobs:

build-upload:
needs: create-staging-repository
runs-on: ${{ matrix.os }}
runs-on: macOS-latest
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: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3
- name: Cached Konan
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 #v3
with:
Expand All @@ -47,30 +44,17 @@ jobs:
with:
java-version: 17
distribution: 'temurin'
# Host only for MacOS / Windows
- name: Check (macos / windows)
if: matrix.os != 'ubuntu-latest'
- name: Check
run: ./gradlew hostOnlyTest

This comment has been minimized.

Copy link
@SalomonBrys

SalomonBrys Nov 21, 2023

Member

This should be ./gradlew check.

This comment has been minimized.

Copy link
@romainbsl

romainbsl Nov 21, 2023

Author Member

Done: 275ab28

shell: bash
- name: Check Android
if: matrix.os == 'macOS-latest'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
with:
api-level: 29
ndk: 21.3.6528147
cmake: 3.10.2.4988404
script: ./gradlew connectedCheck
- name: Upload (macos / windows)
if: matrix.os != 'ubuntu-latest'
run: ./gradlew hostOnlyPublish -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository_id }}
shell: bash
# Linux / JVM / JS
- name: Check (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: ./gradlew check
shell: bash
- name: Upload (ubuntu)
if: matrix.os == 'ubuntu-latest'
- name: Upload
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository_id }}
shell: bash

Expand All @@ -81,15 +65,15 @@ jobs:
steps:
- name: Discard
if: ${{ needs.build-upload.result != 'success' }}
uses: nexus-actions/drop-nexus-staging-repo@fe83783967a063540320ace3c8942608246705a1 #v1
uses: nexus-actions/drop-nexus-staging-repo@v1
with:
base_url: https://s01.oss.sonatype.org/service/local/
username: ${{ secrets.SONATYPE_USERNAME }}
password: ${{ secrets.SONATYPE_PASSWORD }}
staging_repository_id: ${{ needs.create-staging-repository.outputs.repository_id }}
- name: Release
if: ${{ needs.build-upload.result == 'success' }}
uses: nexus-actions/release-nexus-staging-repo@36161f25ef98cc3821eabb11ab742d2e9d479e52 #v1.2
uses: nexus-actions/release-nexus-staging-repo@v1
with:
base_url: https://s01.oss.sonatype.org/service/local/
username: ${{ secrets.SONATYPE_USERNAME }}
Expand Down
28 changes: 6 additions & 22 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ env:

jobs:
build-upload:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: macOS-latest
steps:
- name: Check out
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3
- name: Cached Konan
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 #v3
Expand All @@ -39,29 +36,16 @@ jobs:
with:
java-version: 17
distribution: 'temurin'
# Host only for MacOS / Windows
- name: Check (macos / windows)
if: matrix.os != 'ubuntu-latest'
run: ./gradlew hostOnlyTest
- name: Check
run: ./gradlew check
shell: bash
- name: Check Android
if: matrix.os == 'macOS-latest'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
with:
api-level: 29
ndk: 21.3.6528147
cmake: 3.10.2.4988404
script: ./gradlew connectedCheck
- name: Upload (macos / windows)
if: matrix.os != 'ubuntu-latest'
run: ./gradlew hostOnlyPublish -PgitRef=${{ github.ref }} -Psnapshot=true
shell: bash
# Linux / JVM / JS
- name: Check (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: ./gradlew check
shell: bash
- name: Upload (ubuntu)
if: matrix.os == 'ubuntu-latest'
- name: Upload
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -PgitRef=${{ github.ref }} -Psnapshot=true
shell: bash
shell: bash
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ on:
- '!./github/workflow/test.yml'

jobs:

check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: macOS-latest
steps:
- name: Check out
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3
- name: Cached Konan
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 #v3
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ org.gradle.parallel=true

# Android
android.enableJetifier=true
android.useAndroidX=true
android.useAndroidX=true

# Kosi
org.kodein.native.enableCrossCompilation=true

0 comments on commit c6a9708

Please sign in to comment.