Skip to content

Commit

Permalink
Add support for Linux ARM64 and macOS ARM64 (Silicon) targets. (#2449)
Browse files Browse the repository at this point in the history
* Add support for Linux ARM64 and macOS ARM64 (Silicon) targets.

Currently blocked until a new version of kotlinx.coroutines is
published with these targets
(Kotlin/kotlinx.coroutines#2904).

* Add ARM64 simulator targets.

* Don't try to run testing task that doesn't exist.

* Test all available targets on Windows or macOS as part of the PR build.

* Use kotlinx-coroutines 1.5.2.

This adds support for the new Kotlin/Native targets added in Kotlin
1.5.30.

* Remove mingwX86 target.

kotlinx-coroutines only supports X64.
  • Loading branch information
charleskorn authored Sep 3, 2021
1 parent 6b0b661 commit d183857
Show file tree
Hide file tree
Showing 14 changed files with 312 additions and 18 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,29 @@ jobs:
with:
java-version: '8'

- name: Run ubuntu tests
- name: Run Ubuntu tests
if: matrix.os == 'ubuntu-latest'
run: ./gradlew check --scan

- name: Run windows tests
- name: Run Windows tests
if: matrix.os == 'windows-latest'
run: ./gradlew mingwX64Test --scan

- name: Run macOS tests
if: matrix.os == 'macOS-latest'
run: ./gradlew macosX64Test --scan
run: ./gradlew macosX64Test macosArm64TestKlibrary --scan

- name: Run watchOS tests
if: matrix.os == 'macOS-latest'
run: ./gradlew watchosArm32TestKlibrary watchosArm64TestKlibrary watchosX86Test watchosX64Test --scan
run: ./gradlew watchosArm32TestKlibrary watchosArm64TestKlibrary watchosSimulatorArm64TestKlibrary watchosX86Test watchosX64Test --scan

- name: Run tvOS tests
if: matrix.os == 'macOS-latest'
run: ./gradlew tvosArm64TestKlibrary tvosSimulatorArm64TestKlibrary tvosX64Test --scan

- name: Run iOS tests
if: matrix.os == 'macOS-latest'
run: ./gradlew iosArm32TestKlibrary iosArm64TestKlibrary iosSimulatorArm64TestKlibrary iosX64Test --scan

- name: Bundle the build report
if: failure()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: ./gradlew watchosArm32TestKlibrary watchosArm64TestKlibrary watchosX86Test watchosX64Test watchosX86Test --scan

- name: publish macos snapshots
run: ./gradlew publishMacosX64PublicationToDeployRepository
run: ./gradlew publishMacosX64PublicationToDeployRepository publishMacosArm64PublicationToDeployRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Run tests
run: ./gradlew mingwX64Test --scan

- name: publish mingw64 snapshot
- name: publish mingw64 and mingw86 snapshot
run: ./gradlew publishMingwX64PublicationToDeployRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
47 changes: 46 additions & 1 deletion .github/workflows/release_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish linux release
- name: publish linux x64 release
run: ./gradlew publishLinuxX64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
Expand All @@ -63,6 +63,15 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish linux Arm64 release
run: ./gradlew publishLinuxArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

publish_macos:
runs-on: macos-latest
needs: publish_linux
Expand All @@ -88,6 +97,15 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish macosArm64 release
run: ./gradlew publishMacosArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish tvosX64 release
run: ./gradlew publishTvosX64PublicationToDeployRepository
env:
Expand All @@ -106,6 +124,15 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish tvosSimulatorArm64 release
run: ./gradlew publishTvosSimulatorArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish watchosX64 release
run: ./gradlew publishWatchosX64PublicationToDeployRepository
env:
Expand Down Expand Up @@ -142,6 +169,15 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish watchosSimulatorArm64 release
run: ./gradlew publishWatchosSimulatorArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish iosX64 release
run: ./gradlew publishIosX64PublicationToDeployRepository
env:
Expand Down Expand Up @@ -169,6 +205,15 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish iosSimulatorArm64 release
run: ./gradlew publishIosSimulatorArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

publish_windows:
runs-on: windows-latest
needs: publish_macos
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish linux release
- name: publish linux x64 release
run: ./gradlew publishLinuxX64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
Expand All @@ -63,5 +63,14 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish linux Arm64 release
run: ./gradlew publishLinuxArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
36 changes: 36 additions & 0 deletions .github/workflows/release_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish macosArm64 release
run: ./gradlew publishMacosArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish tvosX64 release
run: ./gradlew publishTvosX64PublicationToDeployRepository
env:
Expand All @@ -54,6 +63,15 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish tvosSimulatorArm64 release
run: ./gradlew publishTvosSimulatorArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish watchosX64 release
run: ./gradlew publishWatchosX64PublicationToDeployRepository
env:
Expand Down Expand Up @@ -90,6 +108,15 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish watchosSimulatorArm64 release
run: ./gradlew publishWatchosSimulatorArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish iosX64 release
run: ./gradlew publishIosX64PublicationToDeployRepository
env:
Expand Down Expand Up @@ -117,5 +144,14 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: publish iosSimulatorArm64 release
run: ./gradlew publishIosSimulatorArm64PublicationToDeployRepository
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
12 changes: 6 additions & 6 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ object Libs {
}

object Coroutines {
const val debug = "org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.5.1"
const val coreCommon = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1"
const val coreJvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.1"
const val coreNative = "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.5.1"
const val jdk8 = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.5.1"
const val test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.1"
const val debug = "org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.5.2"
const val coreCommon = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
const val coreJvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2"
const val coreNative = "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.5.2"
const val jdk8 = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.5.2"
const val test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.2"
}

object Serialization {
Expand Down
6 changes: 6 additions & 0 deletions kotest-assertions/kotest-assertions-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,26 @@ kotlin {
}

linuxX64()
linuxArm64()

mingwX64()

macosX64()
macosArm64()

tvos()
tvosSimulatorArm64()

watchosArm32()
watchosArm64()
watchosX86()
watchosX64()
watchosSimulatorArm64()

iosX64()
iosArm64()
iosArm32()
iosSimulatorArm64()
}

sourceSets {
Expand Down
8 changes: 8 additions & 0 deletions kotest-assertions/kotest-assertions-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,26 @@ kotlin {
}

linuxX64()
linuxArm64()

mingwX64()

macosX64()
macosArm64()

tvos()
tvosSimulatorArm64()

watchosArm32()
watchosArm64()
watchosX86()
watchosX64()
watchosSimulatorArm64()

iosX64()
iosArm64()
iosArm32()
iosSimulatorArm64()
}

sourceSets {
Expand Down
26 changes: 26 additions & 0 deletions kotest-assertions/kotest-assertions-shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,26 @@ kotlin {
}

linuxX64()
linuxArm64()

mingwX64()

macosX64()
macosArm64()

tvos()
tvosSimulatorArm64()

watchosArm32()
watchosArm64()
watchosX86()
watchosX64()
watchosSimulatorArm64()

iosX64()
iosArm64()
iosArm32()
iosSimulatorArm64()
}

sourceSets {
Expand Down Expand Up @@ -79,6 +85,10 @@ kotlin {
dependsOn(desktopMain)
}

val macosArm64Main by getting {
dependsOn(desktopMain)
}

val mingwX64Main by getting {
dependsOn(desktopMain)
}
Expand All @@ -87,6 +97,10 @@ kotlin {
dependsOn(desktopMain)
}

val linuxArm64Main by getting {
dependsOn(desktopMain)
}

val iosX64Main by getting {
dependsOn(desktopMain)
}
Expand All @@ -99,6 +113,10 @@ kotlin {
dependsOn(desktopMain)
}

val iosSimulatorArm64Main by getting {
dependsOn(desktopMain)
}

val watchosArm32Main by getting {
dependsOn(desktopMain)
}
Expand All @@ -115,10 +133,18 @@ kotlin {
dependsOn(desktopMain)
}

val watchosSimulatorArm64Main by getting {
dependsOn(desktopMain)
}

val tvosMain by getting {
dependsOn(desktopMain)
}

val tvosSimulatorArm64Main by getting {
dependsOn(desktopMain)
}

all {
languageSettings.optIn("kotlin.time.ExperimentalTime")
languageSettings.optIn("kotlin.experimental.ExperimentalTypeInference")
Expand Down
Loading

0 comments on commit d183857

Please sign in to comment.