-
-
Notifications
You must be signed in to change notification settings - Fork 42
73 lines (62 loc) · 1.54 KB
/
maven.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Java CI with Maven
on:
push:
branches:
- main
paths:
- .github/workflows/maven.yml
- .github/project.yml
- "**.xml"
- "*.yml"
- "src/**"
- "ide-config"
pull_request:
paths:
- "**.xml"
- "src/**"
- "ide-config"
env:
JAVA_VERSION: 17
GRAALVM_VERSION: 22.3.2
JAVA_DISTRO: temurin
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: maven
- name: Build with Maven
id: mvn-build
run: ./mvnw -B -ntp formatter:validate verify
native-build:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
version: ${{ env.GRAALVM_VERSION }}
java-version: ${{ env.JAVA_VERSION }}
components: "native-image"
cache: 'maven'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and run in native mode
id: mvn-native-build
env:
MAVEN_OPTS: "-Xmx1g"
run: |
./mvnw -B -ntp verify -Dnative -DskipTests -DskipFormat
update-snapshot:
if: github.ref == 'refs/heads/main'
needs: build
uses: ./.github/workflows/antifreeze.yml
with:
update-snapshot-tag: true
secrets: inherit