Skip to content

Commit

Permalink
Build cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kpgalligan committed Nov 5, 2023
1 parent b2765eb commit 38ef620
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 37 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,5 @@ jobs:
- name: Build
run: ./gradlew build --no-daemon --stacktrace

- name: Build Old Memory Model
run: ./gradlew build --no-daemon --stacktrace -Pkotlin.native.binary.memoryModel=experimental
env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"
18 changes: 2 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,9 @@ jobs:
shell: bash
run: |
echo "c:\msys64\mingw64\bin" >> $GITHUB_PATH
- name: Publish Mac Artifacts
- name: Publish
if: matrix.os == 'macOS-latest'
run: ./gradlew publishMac --no-daemon --stacktrace
env:
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- name: Publish Windows Artifacts
if: matrix.os == 'windows-latest'
run: ./gradlew publishWindows --no-daemon --stacktrace
env:
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- name: Publish Linux Artifacts
if: matrix.os == 'ubuntu-18.04'
run: ./gradlew publishLinux --no-daemon --stacktrace
run: ./gradlew publish --no-daemon --stacktrace
env:
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Expand Down
29 changes: 11 additions & 18 deletions sqliter-driver/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fun configInterop(target: org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTar
"-linker-options",
"-lsqlite3 -L/usr/lib/x86_64-linux-gnu -L/usr/lib"
)

HostManager.hostIsMingw -> listOf("-linker-options", "-lsqlite3 -Lc:\\msys64\\mingw64\\lib")
else -> listOf("-linker-options", "-lsqlite3")
}
Expand Down Expand Up @@ -102,9 +103,11 @@ kotlin {
target.compilations.getByName("main").defaultSourceSet.dependsOn(mingwMain)
target.compilations.getByName("test").defaultSourceSet.dependsOn(nativeCommonTest)
}

target.name.startsWith("linux") -> {
target.compilations.getByName("test").defaultSourceSet.dependsOn(nativeCommonTest)
}

else -> {
target.compilations.getByName("main").defaultSourceSet.dependsOn(appleMain)
target.compilations.getByName("test").defaultSourceSet.dependsOn(nativeCommonTest)
Expand All @@ -118,23 +121,13 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile> {
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}

if(!HostManager.hostIsLinux) {
tasks.findByName("linuxX64Test")?.enabled = false
tasks.findByName("linuxArm64Test")?.enabled = false
tasks.findByName("linkDebugTestLinuxX64")?.enabled = false
tasks.findByName("linkDebugTestLinuxArm64")?.enabled = false
tasks.findByName("publishLinuxX64PublicationToMavenRepository")?.enabled = false
tasks.findByName("publishLinuxArm64PublicationToMavenRepository")?.enabled = false
}

if(!HostManager.hostIsMingw) {
tasks.findByName("mingwX64Test")?.enabled = false
tasks.findByName("linkDebugTestMingwX64")?.enabled = false
tasks.findByName("publishMingwX64PublicationToMavenRepository")?.enabled = false
}
listOf(
"linuxX64Test",
"linuxArm64Test",
"linkDebugTestLinuxX64",
"linkDebugTestLinuxArm64",
"mingwX64Test",
"linkDebugTestMingwX64",
).forEach { tasks.findByName(it)?.enabled = false }

apply(from = "../gradle/gradle-mvn-mpp-push.gradle")

tasks.register("publishMac"){
setDependsOn(tasks.filter { t -> t.name.startsWith("publish") && t.name.endsWith("ToMavenRepository") && !t.name.contains("Linux") }.map { it.name })
}

0 comments on commit 38ef620

Please sign in to comment.