-
Notifications
You must be signed in to change notification settings - Fork 725
99 lines (84 loc) · 2.28 KB
/
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
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
name: CI
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'liberica'
cache: 'gradle'
- name: Build & Test
run: xvfb-run -a ./gradlew --info test linux
- name: Extract CHANGELOG
run: sed '/^$/q' CHANGELOG > build/libs/README
- uses: actions/upload-artifact@v1
with:
name: Linux binaries
path: build/libs
- name: Release (if tag)
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
body_path: build/libs/README
files: build/libs/*
mac:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'liberica'
architecture: aarch64
cache: 'gradle'
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'liberica'
architecture: x64
- run: ./gradlew test macX86 --info
- run: JLINK_OPTS="--module-path $JAVA_HOME_17_AARCH64/jmods" ./gradlew macArm64 --info
env:
APPLE_USER: ${{ secrets.APPLE_USER }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
- uses: actions/upload-artifact@v1
with:
name: macOS binaries
path: build/libs
- name: Add to release (if tag)
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: build/libs/*.zip
windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'liberica'
architecture: x64
cache: 'gradle'
- run: ./gradlew test win-installer --info
- uses: actions/upload-artifact@v1
with:
name: Windows binaries
path: build/libs
- name: Add to release (if tag)
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: build/libs/*.exe