-
Notifications
You must be signed in to change notification settings - Fork 86
290 lines (268 loc) · 9.34 KB
/
ci.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
name: CI
on: [push]
env:
evomaster-version: 1.6.2
# Unfortunately, to use JPackage we need JDK 17 or above :(
# Which is really bad due to the madness of --add-opens.
# Even if hunt down all cases of reflections in EM, there is still the problem of
# third-party libraries, which might do it only in special cases.
# For some "hilarious" case, see:
# https://github.com/EMResearch/EvoMaster/issues/447
release-jdk: 17
latest-jdk: 17
build-jdk: 1.8
retention-days: 5
# This build is quite expensive (some hours), so we run it whole only on some JVM versions and OSs.
# For the moment, we need to support JVM 8 and all following LTS versions (e.g, 11 and 17).
# EM should run an all OSs. As our main development machines are Windows and Mac, just
# testing whole build with all E2E only on Linux should be fine.
jobs:
full-build-base:
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@v2
# Build/test for JDK
- name: Setup JDK ${{env.build-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.build-jdk}}
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean verify --fae
env:
CI_env: GithubAction
- name: Upload evomaster.jar
uses: actions/upload-artifact@v2
with:
name: evomaster.jar
path: core/target/evomaster.jar
retention-days: ${{env.retention-days}}
if-no-files-found: error
# Make test report accessible from GitHub Actions (as Maven logs are long)
- name: Publish Test Report
if: success() || failure()
uses: mikepenz/action-junit-report@v3
with:
report_paths: '**/target/surefire-reports/TEST-*.xml'
# Upload coverage results
- name: Upload coverage to CodeCov
run: curl -s https://codecov.io/bash | bash
# Only once coverage is uploaded, we try to build with other versions of Java, as "mvn clean" would delete those reports
# However, the latest LTS is fully built (with tests) on a different job
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Compile with JDK 11
run: mvn clean verify -DskipTests
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Compile with JDK 17
run: mvn clean verify -DskipTests
base-build-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.latest-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.latest-jdk}}
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean verify -DskipTests
env:
CI_env: GithubAction
base-build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.latest-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.latest-jdk}}
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean verify -DskipTests
env:
CI_env: GithubAction
full-build-LTS:
# run on a different OS from main build.
# It would had been good, but does not work due to Docker support :( see:
# https://stackoverflow.com/questions/66077884/testcontainers-in-windows-environment-on-github-actions-could-not-find-a-valid
# TODO check this again in the future
# runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.latest-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.latest-jdk}}
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean verify --fae
env:
CI_env: GithubAction
MAVEN_OPTS: "--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED"
nodejs:
needs: full-build-base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Build/test for JavaScript
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
working-directory: ./client-js/evomaster-client-js
- run: npm run build
working-directory: ./client-js/evomaster-client-js
- run: npm run test
working-directory: ./client-js/evomaster-client-js
- run: npm ci
working-directory: ./client-js/integration-tests
- run: npm run build
working-directory: ./client-js/integration-tests
- run: npm run test
working-directory: ./client-js/integration-tests
- name: Setup JDK ${{env.build-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.build-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
with:
name: evomaster.jar
path: core/target
### NOTE: we no longer run this, as NodeJS for backend no longer supported.
### This started to fail once introduced first version of "minimization", as JS driver would need
### to be updated with new features to support it
# E2E for JS. Must be run AFTER the JS and Core builds
# - name: E2E for JavaScript
# run: bash ./client-js/e2e-tests/e2e.sh
### TODO currently disabled, as it takes forever on CI (1-2 hours...), compared to few minutes on local machine.
### Need to find out why
# dotnet:
# needs: base
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# # Build/test for .Net
# - name: Setup .NET Core
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 3.1.x
# - name: Clean .NET
# run: dotnet clean
# - name: Build with .NET
# run: dotnet build --configuration Release
# - name: Unit tests for .NET
# run: dotnet test
# - name: Setup JDK ${{env.build-jdk}}
# uses: actions/setup-java@v1
# with:
# java-version: ${{env.build-jdk}}
# - name: Download fat jar
# uses: actions/download-artifact@v2
# with:
# name: evomaster.jar
# path: core/target
# # E2E for C#. Must be run AFTER the C# and Core builds
# - name: E2E for C#
# run: bash ./e2e-tests/dotnet-rest/scripts/e2e.sh
installer-for-windows:
needs: full-build-base
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.release-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh WINDOWS
- name: Upload installation file
uses: actions/upload-artifact@v2
with:
name: evomaster.msi
path: release/evomaster-${{env.evomaster-version}}.msi
retention-days: ${{env.retention-days}}
if-no-files-found: error
installer-for-osx:
needs: full-build-base
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.release-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh OSX
- name: Upload installation file
uses: actions/upload-artifact@v2
with:
name: evomaster.dmg
path: release/evomaster-${{env.evomaster-version}}.dmg
retention-days: ${{env.retention-days}}
if-no-files-found: error
installer-for-debian:
needs: full-build-base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.release-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh DEBIAN
- name: Upload installation file
uses: actions/upload-artifact@v2
with:
name: evomaster.deb
path: release/evomaster_${{env.evomaster-version}}-1_amd64.deb
retention-days: ${{env.retention-days}}
if-no-files-found: error