-
-
Notifications
You must be signed in to change notification settings - Fork 146
190 lines (150 loc) · 5.67 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# This workflow will build a Java project with Maven
#
# Configure Maven : https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
#pull_request:
# branches: [ master ]
jobs:
# ============================================================================================================
# Main Build & Test Matrix
macos-10-15-x86_64:
if: ${{ false }} # disable for now
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: ['9.0.0+0', '14']
# ============================================================================================================
# Java / Zulu Distributions
# ok : '9.0.0+0'
# ok : '11.0.12+7'
#
# KO : '8' https://github.com/jzy3d/jzy3d-api/runs/3943617371?check_suite_focus=true#step:4:493
#
# Try -Djava.awt.headless=true
#
# https://github.com/inloco/actions-setup-java/blob/main/README.md#Supported-distributions
os: ['osx-10-15-3'] # , 'windows-latest', windows-2016
# ============================================================================================================
# Github virtual machine
# ----------------------
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on
#
# 'macos-10.15' works thanks to software renderer + JOGL timeout expansion
# 'windows-2016' don't work https://github.com/jzy3d/jzy3d-api/issues/205#issuecomment-943151589
# 'ubuntu-18.04' don't work https://github.com/jzy3d/jzy3d-api/issues/205#issuecomment-943110442
# 'ubuntu-20.04' don't work https://github.com/jzy3d/jzy3d-api/issues/205#issuecomment-947641249
#
# Self hosted physical machines
# -----------------------------
# 'osx-10-15-3'
#
#
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: zulu
#cache: maven # caching makes the post build action to fail
- name: Get Maven OS detection info
run: mvn enforcer:display-info
- name: Build with Maven
run: mvn package --file pom.xml
# run: mvn -T 1C -B package --file pom.xml
# run: mvn -T 1C -B -Dsurefire.useFile=false package --file pom.xml
# -T 1C : 1 thread per cpu core
# -B : non interactive mode
- name: Copy Surefire reports
run: mkdir surefire-reports && cp */target/surefire-reports/* surefire-reports
- uses: actions/upload-artifact@v2
with:
name: Package
path: surefire-reports
# TODO : Deploy on repo https://github.com/inloco/actions-setup-java/blob/main/docs/advanced-usage.md#Publishing-using-Apache-Maven
# ============================================================================================================
# MAC OS BIG SUR (ARM)
# ====================================
macos-11-4-arm64:
if: ${{ false }} # disable for now
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: ['9.0.0+0', '14']
os: ['mac-m1']
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: zulu
#cache: maven # caching makes the post build action to fail
- name: Get Maven OS detection info
run: mvn enforcer:display-info
- name: Build with Maven
run: mvn package --file pom.xml
- name: Copy Surefire reports
run: mkdir surefire-reports && cp */target/surefire-reports/* surefire-reports
- uses: actions/upload-artifact@v2
with:
name: Package
path: surefire-reports
# ============================================================================================================
# WINDOWS
# ====================================
win10-x86_64:
if: ${{ false }} # disable for now
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: ['9.0.0+0', '14']
os: ['win10-x86_64']
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: zulu
#cache: maven # caching makes the post build action to fail
- name: Get Maven OS detection info
run: mvn enforcer:display-info
- name: Build with Maven
run: mvn package --file pom.xml
- name: Copy Surefire reports
run: mkdir surefire-reports; cp */target/surefire-reports/* surefire-reports
- uses: actions/upload-artifact@v2
with:
name: Package
path: surefire-reports
# ============================================================================================================
# UBUNTU
# ====================================
ubuntu-20-04-x86_64:
if: ${{ false }} # disable for now
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: ['14', '11']
os: ['ubuntu-20-04']
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: zulu
#cache: maven # caching makes the post build action to fail
- name: Get Maven OS detection info
run: mvn enforcer:display-info
- name: Build with Maven
run: mvn clean package --file pom.xml
- name: Copy Surefire reports
run: mkdir surefire-reports; cp */target/surefire-reports/* surefire-reports
- uses: actions/upload-artifact@v2
with:
name: Package
path: surefire-reports