-
Notifications
You must be signed in to change notification settings - Fork 6
72 lines (61 loc) · 1.94 KB
/
build.yml
File metadata and controls
72 lines (61 loc) · 1.94 KB
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
name: Build and Test
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
windows-latest,
ubuntu-latest,
# latest available X86_64 target
macos-15,
# latest is ARM
macos-latest,
]
steps:
- uses: actions/checkout@v2 # Checkout the repository
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
- name: Build with Gradle (non-Ubuntu)
if: matrix.os != 'ubuntu-latest'
run: ./gradlew build --no-daemon
# On Ubuntu, we have to set up a dummy X11 display for some tests that use the GUI
- name: Build with Gradle (on Ubuntu with dummy X11 display)
if: matrix.os == 'ubuntu-latest'
run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
./gradlew build --no-daemon
# reports JUnit test results as GitHub PR check.
- name: publish test report
uses: mikepenz/action-junit-report@v3
# always run even if the previous step fails
if: always()
with:
report_paths: "build/reports/test-results/*.xml"
# disabled until https://github.com/mikepenz/action-junit-report/issues/40 is resolved
# fail_on_failure: true
annotate_only: true
- name: Jar
run: ./gradlew jar --no-daemon
- name: Runtime Zip
run: ./gradlew runtimeZip --no-daemon
- name: JPackage
run: ./gradlew jpackage --no-daemon
- name: Archive build artifacts
# Only runs if the previous steps were successful
if: success()
uses: actions/upload-artifact@v4
with:
name: image-and-jar-${{ matrix.os }}
path: |
build/libs/*.jar
build/image.zip
build/jpackage