Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: use config cache and test on macOS #261

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ 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

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
- uses: gradle/gradle-build-action@v2
with:
dependency-graph: generate-and-submit
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
Loading