-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.6 KB
/
maven-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Maven native image build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build on ${{ matrix.os }} with Java ${{ matrix.java-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
java-version: [17, 21]
graalvm-distribution: ['graalvm-community']
fail-fast: false
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up GraalVM ${{ matrix.graalvm-distribution }} for Java ${{ matrix.java-version }}
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.graalvm-distribution }}
- name: Report Java version
run: |
java -version
javac -version
- name: Build with Maven Wrapper (Linux)
run: ./mvnw -V -B package
if: runner.os == 'Linux'
- name: Build with Maven Wrapper (Windows)
run: .\mvnw.cmd -V -B package
if: runner.os == 'Windows'
- name: Package Linux artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: JGitHttpServer ${{ runner.os }} native image with SubstrateVM for Java ${{ matrix.java-version }}
path: target/JGitHttpServer
- name: Package Windows artifacts
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
name: JGitHttpServer ${{ runner.os }} native image with SubstrateVM for Java ${{ matrix.java-version }}
path: target/JGitHttpServer.exe