Skip to content

Commit

Permalink
Merge branch 'feature/kotlin-2.0' into feature/2.0.0-ci-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeda88 committed Jun 11, 2024
2 parents 42c0998 + 9de68a9 commit 281354c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
java-version: 17

- name: run Android unit tests
run: ./gradlew testDebugUnitTest koverXmlReport
run: ./gradlew testDebugUnitTest koverHtmlReport
- name: add coverage report to PR
id: kover
uses: mi-kas/kover-report@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/emulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
uses: ./.github/workflows/setup_tools_macos/
with:
kotlinVersion: ${{ needs.build.outputs.kotlinVersion }}
arch: ${{ runner.arch == 'X86' && 'x86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'arm32' || 'arm64' }}

- name: AVD cache
uses: actions/cache@v3
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
build:
uses: ./.github/workflows/setup_macos.yaml
with:
gradleTask: compileKotlinIosX64
gradleTask: compileKotlinIosSimulatorArm64

lint:
needs: build
runs-on: macos-13
runs-on: macos-14
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -23,6 +23,7 @@ jobs:
uses: ./.github/workflows/setup_tools_macos/
with:
kotlinVersion: ${{ needs.build.outputs.kotlinVersion }}
arch: ${{ runner.arch == 'X86' && 'x86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'arm32' || 'arm64' }}

- name: ktLint
run: ./gradlew lintKotlin
Expand All @@ -36,7 +37,7 @@ jobs:

test:
needs: build
runs-on: macos-13
runs-on: macos-14
strategy:
fail-fast: false
matrix:
Expand All @@ -49,6 +50,8 @@ jobs:
uses: ./.github/workflows/setup_tools_macos/
with:
kotlinVersion: ${{ needs.build.outputs.kotlinVersion }}
arch: ${{ runner.arch == 'X86' && 'x86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'arm32' || 'arm64' }}


- name: run iOS tests
run: ./gradlew :${{ matrix.module }}:iosX64Test
run: ./gradlew :${{ matrix.module }}:ios${{ runner.arch == 'X86' && 'X86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'SimulatorArm32' || 'SimulatorArm64' }}Test
15 changes: 12 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: push
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=\"-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false\" -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dkotlin.daemon.jvm.options=-Xmx8G,-XX:MaxMetaspaceSize=512m,-Dorg.gradle.daemon=false,-Dkotlin.incremental=false"
JAVA_OPTS: "-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
SIGNING_SECRET_KEY_RING_FILE: "/Users/runner/work/kaluga/kaluga/kaluga-library-components/keys/secret-keys.gpg"
SIGNING_SECRET_KEY_RING_FILE: ${{ github.workspace }}/kaluga-library-components/keys/secret-keys.gpg

concurrency: publish-${{ github.ref_name }}

Expand All @@ -15,7 +15,7 @@ jobs:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
runs-on: macos-13
runs-on: ${{ github.ref_name == 'master' && 'tartelet' || 'macos-14' }}
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -40,7 +40,16 @@ jobs:
with:
path: ~/.konan/*
key: konan

- name: Install Android SDK
id: android_sdk_install
uses: android-actions/setup-android@v3
with:
log-accepted-android-sdk-licenses: false
# We're seeing some issues with publishing to Sonatype due to split up repos. By publishing to MavenLocal first we might circumvent this
- name: "Publish MavenLocal"
env:
MAVEN_CENTRAL_RELEASE: ${{ github.ref_name == 'master' }}
run: ./gradlew publishToMavenLocal --stacktrace
- name: "Publish SNAPSHOT"
if: ${{ github.ref_name != 'master' }}
run: ./gradlew publishAllPublicationsToSnapshotsRepository --stacktrace
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/setup_macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ on:

outputs:
kotlinVersion:
description: "kaluga.kotlinVersion property from gradle.propertoes"
description: "kaluga.kotlinVersion property from gradle.properties"
value: ${{ jobs.setup.outputs.kotlinVersion }}
projects:
description: "Gradle projects that do not dependent on another project or have other projects dependent on them"
value: ${{ jobs.setup.outputs.projects }}
jobs:
setup:

runs-on: macos-13
runs-on: macos-14

outputs:
projects: ${{ steps.envFile.outputs.projects }}
Expand All @@ -52,6 +52,7 @@ jobs:
gradle-cache-read-only: 'false'
restore-workspace-cache: 'false'
kotlinVersion: ${{ steps.kotlinVersion.outputs.kotlinVersion }}
arch: ${{ runner.arch == 'X86' && 'x86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'arm32' || 'arm64' }}
project: ${{ inputs.project }}

- name: generate file with projects for build matrix
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/setup_tools_macos/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
kotlinVersion:
required: true
description: Kotlin version
arch:
required: true
description: CPU Architecture of machine
gradle-cache-read-only:
default: 'true'
description: Updates gradle cache after actions if not read-only
Expand Down Expand Up @@ -42,7 +45,7 @@ runs:
with:
path: |
~/.konan/cache/*
~/.konan/kotlin-native-prebuilt-macos-x86_64-${{ inputs.kotlinVersion }}/*
~/.konan/kotlin-native-prebuilt-macos-${{ inputs.arch }}-${{ inputs.kotlinVersion }}/*
~/.konan/dependencies/*
key: konan-${{ inputs.kotlinVersion }}

Expand Down

0 comments on commit 281354c

Please sign in to comment.