Skip to content

Commit f70967d

Browse files
committed
chore: refactor native build scripts
1 parent e6b55cc commit f70967d

29 files changed

+2438
-527
lines changed

.github/workflows/graalvm.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ on:
1818
- cron: "0 0 * * *"
1919
workflow_dispatch:
2020

21-
permissions:
22-
contents: read
21+
defaults:
22+
run:
23+
shell: bash
2324

2425
concurrency:
2526
group: ${{ github.workflow }}-${{ github.ref }}
2627
cancel-in-progress: true
2728

29+
permissions:
30+
contents: read
31+
2832
env:
2933
releaseBuild: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
3034

@@ -40,6 +44,9 @@ jobs:
4044
java-version: [ 'dev' ]
4145
os: [ macos-latest, windows-latest, ubuntu-latest ]
4246

47+
outputs:
48+
native_image_name: ${{ steps.native-build.outputs.native_image_name }}
49+
4350
steps:
4451
- name: 🛎️ Check out repository
4552
uses: actions/checkout@v3
@@ -57,22 +64,28 @@ jobs:
5764
native-image-job-reports: 'false'
5865

5966
- name: 🏗️ Native Image Build & Test
67+
id: native-build
6068
run: |
6169
./gradlew nativeCompile
6270
ls -ltrh build/${{ github.event.repository.name }}*.tar.gz
6371
6472
- name: 📤 Upload ${{ matrix.os }} native image
6573
uses: actions/upload-artifact@v3
6674
with:
67-
# name: ${{ github.event.repository.name }}-${{ runner.os }}-${{ runner.arch }}
75+
name: ${{ steps.native-build.outputs.native_image_name }}
6876
path: |
69-
build/${{ github.event.repository.name }}*.tar.gz
77+
# build/${{ github.event.repository.name }}*.tar.gz
78+
build/${{ steps.native-build.outputs.native_image_name }}
7079
if-no-files-found: error
7180

7281

7382
native-build-musl:
7483
name: GraalVM CE Dev + musl static image
7584
runs-on: ubuntu-latest
85+
86+
outputs:
87+
native_image_name: ${{ steps.native-build.outputs.native_image_name }}
88+
7689
steps:
7790
- name: 🛎️ Check out repository
7891
uses: actions/checkout@v3
@@ -91,13 +104,15 @@ jobs:
91104
native-image-job-reports: 'false'
92105

93106
- name: 🏗️ Build static image with musl libc
107+
id: native-build
94108
run: |
95109
./gradlew nativeCompile -Pmusl
96110
ls -ltrh build/${{ github.event.repository.name }}*.tar.gz
97111
98112
- name: 📤 Upload static binary
99113
uses: actions/upload-artifact@v3
100114
with:
115+
name: ${{ steps.native-build.outputs.native_image_name }}
101116
path: |
102-
build/${{ github.event.repository.name }}*.tar.gz
117+
build/${{ steps.native-build.outputs.native_image_name }}
103118
if-no-files-found: error

0 commit comments

Comments
 (0)