Skip to content

Commit e6b55cc

Browse files
committed
chore: add compression support
1 parent d38efc5 commit e6b55cc

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

.github/workflows/graalvm.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ jobs:
5959
- name: 🏗️ Native Image Build & Test
6060
run: |
6161
./gradlew nativeCompile
62-
file build/native/nativeCompile/${{ github.event.repository.name }}
62+
ls -ltrh build/${{ github.event.repository.name }}*.tar.gz
6363
6464
- name: 📤 Upload ${{ matrix.os }} native image
6565
uses: actions/upload-artifact@v3
6666
with:
67-
name: ${{ github.event.repository.name }}-${{ runner.os }}-${{ runner.arch }}
67+
# name: ${{ github.event.repository.name }}-${{ runner.os }}-${{ runner.arch }}
6868
path: |
69-
build/native/nativeCompile/${{ github.event.repository.name }}*
69+
build/${{ github.event.repository.name }}*.tar.gz
7070
if-no-files-found: error
7171

7272

@@ -93,12 +93,11 @@ jobs:
9393
- name: 🏗️ Build static image with musl libc
9494
run: |
9595
./gradlew nativeCompile -Pmusl
96-
file build/native/nativeCompile/${{ github.event.repository.name }}
96+
ls -ltrh build/${{ github.event.repository.name }}*.tar.gz
9797
9898
- name: 📤 Upload static binary
9999
uses: actions/upload-artifact@v3
100100
with:
101-
name: ${{ github.event.repository.name }}-static--${{ runner.os }}-${{ runner.arch }}
102101
path: |
103-
build/native/nativeCompile/${{ github.event.repository.name }}*
102+
build/${{ github.event.repository.name }}*.tar.gz
104103
if-no-files-found: error

build.gradle.kts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import org.gradle.internal.os.OperatingSystem
44
import org.gradle.jvm.toolchain.JvmVendorSpec.GRAAL_VM
5-
import org.jetbrains.kotlin.gradle.dsl.*
5+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
6+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
67
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
78
import org.jetbrains.kotlin.gradle.utils.extendsFrom
89

@@ -231,7 +232,9 @@ tasks {
231232
// GZip the binary after native image build.
232233
val archiveTgz by
233234
creating(Tar::class) {
234-
archiveFileName = "${project.name}-${project.version}.tar.gz"
235+
val nativePrefix = OperatingSystem.current().nativePrefix
236+
val arch = System.getProperty("os.arch")
237+
archiveFileName = "${project.name}-${project.version}-${nativePrefix}-${arch}.tar.gz"
235238
compression = Compression.GZIP
236239
destinationDirectory = project.layout.buildDirectory
237240
from(nativeCompile.map { it.outputFile })
@@ -271,7 +274,8 @@ tasks {
271274
* - graalCompileClasspath (CompileOnly + Implementation)
272275
* - graalRuntimeClasspath (RuntimeOnly + Implementation)
273276
*
274-
* [Configure Custom SourceSet](https://docs.gradle.org/current/userguide/java_testing.html#sec:configuring_java_integration_tests)
277+
* [Configure
278+
* Custom-SourceSet](https://docs.gradle.org/current/userguide/java_testing.html#sec:configuring_java_integration_tests)
275279
*/
276280
val graal by
277281
sourceSets.creating {

gradle.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ org.gradle.kotlin.dsl.allWarningsAsErrors=true
99
kotlin.experimental.tryK2=true
1010
kotlin.jvm.target.validation.mode=warning
1111

12+
semver.tagPrefix=v
1213
semver.project.tagPrefix=v
13-
semver.checkClean=false
14+
semver.stage=final
15+
semver.scope=patch
16+
semver.checkClean=false
17+
semver.commitsMaxCount=100

0 commit comments

Comments
 (0)