-
Notifications
You must be signed in to change notification settings - Fork 11
99 lines (85 loc) · 3.33 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: Build
on: workflow_dispatch
jobs:
build:
name: Build
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
java-version: [ 11, 17 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2.4.2
- name: Setup JDK
uses: actions/setup-java@v3.4.1
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
- name: Set Gradle Executable
shell: bash
run: chmod +x gradlew
- name: Build
shell: bash
run: ./gradlew build --info
- name: Extract Version
id: extract_version
shell: bash
run: |
echo ::set-output name=version::$(./gradlew -q explorer:properties | grep ^version: | cut -d ' ' -f 2)
- name: Run Integration Tests
uses: GabrielBB/xvfb-action@v1.6
with:
run: ./gradlew integrationTest --info
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always()
with:
junit_files: "**/test-results/**/*.xml"
- name: Run Headless Jar Health Test
uses: GabrielBB/xvfb-action@v1.6
with:
run: ./gradlew verifyJarStarts --info
- name: Package
if: matrix.java-version == 17
shell: bash
run: ./gradlew jpackage --info
- name: GitHub Release Installer
if: matrix.java-version == 17
uses: softprops/action-gh-release@v0.1.14
with:
tag_name: v${{ steps.extract_version.outputs.version }}
files: explorer/build/jpackage/*
fail_on_unmatched_files: true
- name: Build Platform-Specific Jars
if: matrix.java-version == 11 && matrix.os == 'windows-latest'
shell: bash
run: |
export PLATFORM_OVERRIDE=windows-x86_64
./gradlew clean --info
./gradlew build --info
./gradlew integrationTest --info
./gradlew verifyJarStarts --info
export PLATFORM_OVERRIDE=windows-x86_32
./gradlew build --info
export PLATFORM_OVERRIDE=linux-x86_64
./gradlew build --info
export PLATFORM_OVERRIDE=linux-aarch_64
./gradlew build --info
export PLATFORM_OVERRIDE=osx-x86_64
./gradlew build --info
export PLATFORM_OVERRIDE=osx-aarch_64
./gradlew build --info
- name: GitHub Release Jar
if: matrix.java-version == 11 && matrix.os == 'windows-latest'
uses: softprops/action-gh-release@v0.1.14
with:
tag_name: v${{ steps.extract_version.outputs.version }}
files: |
explorer/build/libs/jvm-explorer-${{ steps.extract_version.outputs.version }}-windows-x86_64.jar
explorer/build/libs/jvm-explorer-${{ steps.extract_version.outputs.version }}-windows-x86_32.jar
explorer/build/libs/jvm-explorer-${{ steps.extract_version.outputs.version }}-linux-x86_64.jar
explorer/build/libs/jvm-explorer-${{ steps.extract_version.outputs.version }}-linux-aarch_64.jar
explorer/build/libs/jvm-explorer-${{ steps.extract_version.outputs.version }}-osx-x86_64.jar
explorer/build/libs/jvm-explorer-${{ steps.extract_version.outputs.version }}-osx-aarch_64.jar
fail_on_unmatched_files: true