Skip to content

Commit afa0a19

Browse files
OlyOly
authored andcommitted
add github action to build binaries
1 parent 8d02793 commit afa0a19

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+
name: Java CI with Gradle
9+
10+
on:
11+
push:
12+
branches: [ "master" ]
13+
14+
pull_request:
15+
branches: [ "master" ]
16+
17+
jobs:
18+
build-jvm:
19+
runs-on: ubuntu-latest
20+
permissions: { contents: read }
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up JDK 21
26+
uses: actions/setup-java@v4
27+
with: { java-version: '21', distribution: 'temurin' }
28+
29+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
30+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
31+
- name: Setup Gradle
32+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
33+
34+
- name: Compile to Native Binary
35+
run: ./gradlew build
36+
37+
- name: Upload Build Artifacts
38+
uses: actions/upload-artifact@v4
39+
with: { path: build/native/nativeCompile/kt-encabulator* }
40+
#fi
41+
42+
build-native-linux:
43+
runs-on: ubuntu-latest
44+
permissions: { contents: read }
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Set up JDK 21
50+
uses: actions/setup-java@v4
51+
with: { java-version: '21', distribution: 'graalvm-ce' }
52+
53+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
54+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
55+
- name: Setup Gradle
56+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
57+
58+
- name: Compile to Native Binary
59+
run: ./gradlew nativeCompile
60+
61+
- name: Upload Build Artifacts
62+
uses: actions/upload-artifact@v4
63+
with: { path: build/native/nativeCompile/kt-encabulator* }
64+
#fi
65+
66+
build-native-windows:
67+
runs-on: windows-latest
68+
permissions: { contents: read }
69+
70+
steps:
71+
- uses: actions/checkout@v4
72+
73+
- name: Set up JDK 21
74+
uses: actions/setup-java@v4
75+
with: { java-version: '21', distribution: 'graalvm-ce' }
76+
77+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
78+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
79+
- name: Setup Gradle
80+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
81+
82+
- name: Compile to Native Binary
83+
run: ./gradlew nativeCompile
84+
85+
- name: Upload Build Artifacts
86+
uses: actions/upload-artifact@v4
87+
with: { path: build/native/nativeCompile/kt-encabulator* }
88+
#fi

0 commit comments

Comments
 (0)