diff --git a/.github/workflows/emulator.yaml b/.github/workflows/emulator.yaml index a8b1c79a4..42d834678 100644 --- a/.github/workflows/emulator.yaml +++ b/.github/workflows/emulator.yaml @@ -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 diff --git a/.github/workflows/ios.yaml b/.github/workflows/ios.yaml index 0573cc10e..3ea02a8d8 100644 --- a/.github/workflows/ios.yaml +++ b/.github/workflows/ios.yaml @@ -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 @@ -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 @@ -36,7 +37,7 @@ jobs: test: needs: build - runs-on: macos-13 + runs-on: macos-14 strategy: fail-fast: false matrix: @@ -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 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 07fbfe732..ac961c46c 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -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/convention-plugins/keys/secret-keys.gpg" + SIGNING_SECRET_KEY_RING_FILE: ${{ github.workspace }}/convention-plugins/keys/secret-keys.gpg concurrency: publish-${{ github.ref_name }} @@ -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-14 + runs-on: ${{ github.ref_name == 'master' && 'tartelet' || 'macos-14' }} steps: - name: checkout uses: actions/checkout@v3 @@ -40,10 +40,15 @@ 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' }} + MAVEN_CENTRAL_RELEASE: ${{ github.ref_name == 'master' }} run: ./gradlew publishToMavenLocal --stacktrace - name: "Publish SNAPSHOT" if: ${{ github.ref_name != 'master' }} diff --git a/.github/workflows/setup_macos.yaml b/.github/workflows/setup_macos.yaml index 47e54ce67..0f9a40914 100644 --- a/.github/workflows/setup_macos.yaml +++ b/.github/workflows/setup_macos.yaml @@ -19,7 +19,7 @@ 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" @@ -27,7 +27,7 @@ on: jobs: setup: - runs-on: macos-13 + runs-on: macos-14 outputs: projects: ${{ steps.envFile.outputs.projects }} @@ -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 diff --git a/.github/workflows/setup_tools_macos/action.yaml b/.github/workflows/setup_tools_macos/action.yaml index b6ae66f8d..be006077f 100644 --- a/.github/workflows/setup_tools_macos/action.yaml +++ b/.github/workflows/setup_tools_macos/action.yaml @@ -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 @@ -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 }}