-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
142 lines (133 loc) · 6.81 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
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
trigger:
- master
strategy:
matrix:
Java8:
imageName: 'ubuntu-latest'
J_JAVA_MAJOR: '8'
J_JDKS: '8 9'
Java9:
imageName: 'ubuntu-latest'
J_JAVA_MAJOR: '9'
J_JDKS: '8 9'
Java11:
imageName: 'ubuntu-latest'
J_JAVA_MAJOR: '11'
J_JDKS: '8 9 11'
Java12:
imageName: 'ubuntu-latest'
J_JAVA_MAJOR: '12'
J_JDKS: '8 9 12'
Java13:
imageName: 'ubuntu-latest'
J_JAVA_MAJOR: '13'
J_JDKS: '8 9 13'
Java14:
imageName: 'ubuntu-latest'
J_JAVA_MAJOR: '14'
J_JDKS: '8 9 14'
Java15:
imageName: 'ubuntu-latest'
J_JAVA_MAJOR: '15'
J_JDKS: '8 9 15'
Java16:
imageName: 'ubuntu-latest'
J_JAVA_MAJOR: '16'
J_JDKS: '8 9 16'
Java8-win:
imageName: 'windows-latest'
J_JAVA_MAJOR: '8'
pool:
vmImage: $(imageName)
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'
condition: and(succeeded(), or( eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ) ))
- script: powershell $ProgressPreference='silentlyContinue';Invoke-WebRequest "https://api.nest.saker.build/bundle/download/saker.build-v$((Invoke-WebRequest "https://mirror.nest.saker.build/badges/saker.build/latest.txt" -UseBasicParsing).Content)" -OutFile saker.build.jar
displayName: 'Download saker.build'
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
- script: |
set -e
curl -s https://gist.githubusercontent.com/Sipkab/1505a8659af20003ae09295e99d3cba3/raw/azure_ubuntu_jdksetup_variables.sh -o /tmp/azure_ubuntu_jdksetup_variables.sh
bash /tmp/azure_ubuntu_jdksetup_variables.sh $(J_JDKS)
displayName: 'Setup JDKs'
condition: and(succeeded(), or( eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ) ))
- script: |
java -jar saker.build.jar -bd build -EUbuild.ci=true "-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)" -trace pwd://build/build_test.trace "-Pjavaversion=$(J_JAVA_MAJOR)" test
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
displayName: 'Test'
condition: and(succeeded(), or( eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ) ))
# allow failure on Java 11 as the JVM occasionally crashes during testing
- script: java -jar saker.build.jar -bd build -EUbuild.ci=true "-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)" -trace pwd://build/build_test.trace "-Pjavaversion=$(J_JAVA_MAJOR)" test
displayName: 'Test'
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
- task: PublishBuildArtifacts@1
condition: always()
displayName: 'Publish test trace'
inputs:
pathtoPublish: build/build_test.trace
artifactName: '$(Agent.OS)_test_trace_$(J_JAVA_MAJOR)'
- script: java -jar saker.build.jar -bd build -EUbuild.ci=true "-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)" -trace pwd://build/build_exportall.trace exportall
displayName: 'Export'
- task: PublishBuildArtifacts@1
condition: always()
displayName: 'Publish export trace'
inputs:
pathtoPublish: build/build_exportall.trace
artifactName: '$(Agent.OS)_export_trace_$(J_JAVA_MAJOR)'
- task: PublishBuildArtifacts@1
displayName: 'Publish exported libraries'
inputs:
pathtoPublish: build/std.file.place/release/
artifactName: '$(Agent.OS)_export_jars_$(J_JAVA_MAJOR)'
parallel: true
- task: PublishBuildArtifacts@1
displayName: 'Publish exported cmdline info'
inputs:
pathtoPublish: build/saker.java.compile/launching-jdk8/res/HELP_REFERENCE_OUTPUT/
artifactName: '$(Agent.OS)_cmdline_help_ref_$(J_JAVA_MAJOR)'
parallel: true
- script: java -jar saker.build.jar -bd build -EUbuild.ci=true "-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)" -trace pwd://build/build_compile_nativelib.trace compile native/win32/native.build
displayName: 'Build native lib'
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
- task: PublishBuildArtifacts@1
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: 'Publish nativelib trace'
inputs:
pathtoPublish: build/build_compile_nativelib.trace
artifactName: '$(Agent.OS)_nativelib_trace_$(J_JAVA_MAJOR)'
- task: PublishBuildArtifacts@1
displayName: 'Publish native libs'
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
inputs:
pathtoPublish: build/saker.msvc.clink/nativelib/
artifactName: 'win_nativelib'
parallel: true
- script: |
set -e
cd test/cmdline-integration
bash run-tests.sh ../../build/std.file.place/release/saker.build.jar
displayName: 'Run command line integration tests'
condition: and(succeeded(), or( eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ) ))
- script: java -jar saker.build.jar -bd df_build -EUbuild.ci=true "-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)" exportall
displayName: 'Dogfood export'
- script: cmp build/saker.jar.create/saker.build.jar df_build/saker.jar.create/saker.build.jar
condition: and(succeeded(), or( eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ) ))
displayName: 'Compare dogfood export outputs (Linux)'
- script: comp /M build\saker.jar.create\saker.build.jar df_build\saker.jar.create\saker.build.jar
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
displayName: 'Compare dogfood export outputs (win)'
- script: cat hs_err*.log 2>/dev/null || echo "No hs_err files."
condition: or( eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ) )
displayName: 'Display JVM crash logs (Linux)'
- script: type hs_err*.log 2>nul || exit 0
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: 'Display JVM crash logs (Win)'