Skip to content

Commit

Permalink
CI: use config cache and test on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
hfhbd committed Oct 31, 2023
1 parent cd3fe7d commit 2aa5fcd
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 72 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:
cancel-in-progress: false

env:
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
GRADLE_OPTS: -Dorg.gradle.caching=true

jobs:
build:
Expand All @@ -27,8 +27,6 @@ jobs:
distribution: 'adopt'
java-version: 11
- uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew build
- name: Publish
run: ./gradlew -Pversion=$version -Dorg.gradle.parallel=false publish closeAndReleaseStagingRepository
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
branches: [ main ]

env:
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
GRADLE_OPTS: -Dorg.gradle.caching=true

jobs:
build:
runs-on: ubuntu-latest
runs-on: macos-latest
permissions:
contents: write
security-events: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
GRADLE_OPTS: -Dorg.gradle.caching=true

jobs:
build:
Expand All @@ -32,4 +32,4 @@ jobs:
path: build/dokka/htmlMultiModule
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main
uses: actions/deploy-pages@v2
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
kotlin.code.style=official
org.gradle.parallel=true
org.gradle.configuration-cache=true
org.gradle.configureondemand=true
kotlin.native.ignoreDisabledTargets=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g
group=app.softwork
32 changes: 32 additions & 0 deletions gradle/build-logic/src/main/kotlin/kotlinMPP.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,37 @@ plugins {
plugins.apply("org.jetbrains.kotlin.multiplatform")

extensions.configure<KotlinMultiplatformExtension>("kotlin") {
jvm()
js(IR) {
browser()
nodejs()
}

// tier 1
linuxX64()
macosX64()
macosArm64()
iosSimulatorArm64()
iosX64()

// tier 2
linuxArm64()
watchosSimulatorArm64()
watchosX64()
watchosArm32()
watchosArm64()
tvosSimulatorArm64()
tvosX64()
tvosArm64()
iosArm64()

// tier 3
androidNativeArm32()
androidNativeArm64()
androidNativeX86()
androidNativeX64()
mingwX64()
watchosDeviceArm64()

kotlinConfig()
}
32 changes: 0 additions & 32 deletions kotlinx-uuid-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,6 @@ kotlin {
}
}

jvm()
js(IR) {
browser()
nodejs()
}

// tier 1
linuxX64()
macosX64()
macosArm64()
iosSimulatorArm64()
iosX64()

// tier 2
linuxArm64()
watchosSimulatorArm64()
watchosX64()
watchosArm32()
watchosArm64()
tvosSimulatorArm64()
tvosX64()
tvosArm64()
iosArm64()

// tier 3
androidNativeArm32()
androidNativeArm64()
androidNativeX86()
androidNativeX64()
mingwX64()
watchosDeviceArm64()

sourceSets {
commonMain {
dependencies {
Expand Down
2 changes: 1 addition & 1 deletion kotlinx-uuid-exposed/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

plugins {
id("kotlinJvm")
id("publish")
id("dokkaLicensee")
id("kover")
id("publish")
}

kotlin.jvmToolchain(11)
Expand Down
32 changes: 0 additions & 32 deletions kotlinx-uuid-sqldelight/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,6 @@ plugins {
}

kotlin {
jvm()
js(IR) {
browser()
nodejs()
}

// tier 1
linuxX64()
macosX64()
macosArm64()
iosSimulatorArm64()
iosX64()

// tier 2
linuxArm64()
watchosSimulatorArm64()
watchosX64()
watchosArm32()
watchosArm64()
tvosSimulatorArm64()
tvosX64()
tvosArm64()
iosArm64()

// tier 3
androidNativeArm32()
androidNativeArm64()
androidNativeX86()
androidNativeX64()
mingwX64()
watchosDeviceArm64()

sourceSets {
commonMain {
dependencies {
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ gradleEnterprise {
rootProject.name = "kotlinx-uuid"

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")

include(":kotlinx-uuid-core")

Expand Down

0 comments on commit 2aa5fcd

Please sign in to comment.