-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
68 lines (64 loc) · 2.54 KB
/
azure-pipelines.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
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Java8:
J_JAVA_MAJOR: '8'
Java9:
J_JAVA_MAJOR: '9'
Java10:
J_JAVA_MAJOR: '10'
Java11:
J_JAVA_MAJOR: '11'
Java12:
J_JAVA_MAJOR: '12'
Java13:
J_JAVA_MAJOR: '13'
Java14:
J_JAVA_MAJOR: '14'
Java15:
J_JAVA_MAJOR: '15'
Java16:
J_JAVA_MAJOR: '16'
Java17:
J_JAVA_MAJOR: '17'
Java18:
J_JAVA_MAJOR: '18'
Java19:
J_JAVA_MAJOR: '19'
steps:
- script: curl -L https://api.nest.saker.build/bundle/download/saker.build-v$(curl -s https://mirror.nest.saker.build/badges/saker.build/latest.txt) -o saker.build.jar
displayName: 'Download saker.build'
- script: curl -s https://gist.githubusercontent.com/Sipkab/1505a8659af20003ae09295e99d3cba3/raw/azure_ubuntu_jdksetup_variables.sh -o /tmp/azure_ubuntu_jdksetup_variables.sh
displayName: 'Download JDK setup script'
- script: bash /tmp/azure_ubuntu_jdksetup_variables.sh $(J_JAVA_MAJOR)
displayName: 'Setup JDKs'
- script: |
java -jar saker.build.jar -bd build "-EUsaker.java.jre.install.locations=$(JAVA_HOME_8_X64);$(JAVA_HOME_9_X64);$(JAVA_HOME_10_X64);$(JAVA_HOME_11_X64);$(JAVA_HOME_12_X64);$(JAVA_HOME_13_X64);$(JAVA_HOME_14_X64);$(JAVA_HOME_15_X64);$(JAVA_HOME_16_X64);$(JAVA_HOME_17_X64);$(JAVA_HOME_18_X64);$(JAVA_HOME_19_X64)" -trace pwd://build/build_test.trace "testjava$(J_JAVA_MAJOR)"
retVal=$?
if [ $retVal -ne 0 ]; then
if [ $(J_JAVA_MAJOR) -eq 11 ]; then
echo "##vso[task.logissue type=warning]Tests failed on Java 11 (possible JVM crash)."
for f in hs_err_*.log; do echo "$f"; cat "$f"; done
exit 0
fi
exit $retVal
fi
# allow failure on Java 11 as the JVM occasionally crashes during testing
displayName: 'Test'
- task: PublishBuildArtifacts@1
condition: always()
displayName: 'Publish test trace'
inputs:
pathtoPublish: build/build_test.trace
artifactName: 'test_trace_$(J_JAVA_MAJOR)'
- script: java -jar saker.build.jar -bd build "-EUsaker.java.jre.install.locations=$(JAVA_HOME_8_X64);$(JAVA_HOME_9_X64);$(JAVA_HOME_10_X64);$(JAVA_HOME_11_X64);$(JAVA_HOME_12_X64);$(JAVA_HOME_13_X64);$(JAVA_HOME_14_X64);$(JAVA_HOME_15_X64);$(JAVA_HOME_16_X64);$(JAVA_HOME_17_X64);$(JAVA_HOME_18_X64);$(JAVA_HOME_19_X64)" -trace pwd://build/build_export.trace export
displayName: 'Export'
- task: PublishBuildArtifacts@1
condition: always()
displayName: 'Publish export trace'
inputs:
pathtoPublish: build/build_export.trace
artifactName: 'export_trace_$(J_JAVA_MAJOR)'