-
-
Notifications
You must be signed in to change notification settings - Fork 42
114 lines (95 loc) · 2.93 KB
/
pull-request.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: PR Maven Build
on:
pull_request:
paths:
- "**.xml"
- "*.yml"
- "src/**"
- "ide-config"
permissions:
contents: read
actions: read
env:
JAVA_VERSION: 17
NATIVE_VERSION: 22.3.2
GRAALVM_DIST: graalvm-community
JAVA_DISTRO: temurin
GH_BOT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
GH_BOT_NAME: "GitHub Action"
jobs:
metadata:
uses: ebullient/workflows/.github/workflows/java-snap-metadata.yml@main
build:
runs-on: ubuntu-latest
needs: [metadata]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: tools5e-cache
with:
path: sources
key: Data-5etools-
restore-keys: |
Data-5etools-
Data-5etools
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: pf2e-cache
with:
path: sources/Pf2eTools
key: Data-Pf2eTools-
restore-keys: |
Data-Pf2eTools-
Data-Pf2eTools
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: maven
- name: Build with Maven
id: mvn-build
run: |
ls -al sources
./mvnw -B -ntp -DskipFormat verify
native-build:
name: Test on ${{ matrix.os }}
needs: [metadata]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: tools5e-cache
with:
path: sources
key: Data-5etools-
restore-keys: |
Data-5etools-
Data-5etools
enableCrossOsArchive: true
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
with:
path: sources/Pf2eTools
key: Data-Pf2eTools-
restore-keys: |
Data-Pf2eTools-
Data-Pf2eTools
enableCrossOsArchive: true
- uses: graalvm/setup-graalvm@22cc13fe88ef133134b3798e128fb208df55e1f5 # v1.2.3
with:
distribution: ${{ env.GRAALVM_DIST }}
java-version: ${{ env.JAVA_VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.NATIVE_VERSION }}
cache: 'maven'
- name: Build and run in native mode
id: mvn-native-build
env:
MAVEN_OPTS: "-Xmx1g"
run: |
./mvnw -B -ntp -Dnative -DskipTests -DskipFormat verify