-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
61 lines (54 loc) · 2.33 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
trigger:
- master
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
mac:
imageName: 'macos-latest'
windows:
imageName: 'windows-latest'
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: 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: eq( variables['Agent.OS'], 'Windows_NT' )
# setup Java 8 and 11 for the build
- task: JavaToolInstaller@0
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
displayName: 'Setup JDK 11'
- task: JavaToolInstaller@0
inputs:
versionSpec: '8'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
displayName: 'Setup JDK 8'
- script: java -jar saker.build.jar -bd build "-EUsaker.java.jre.install.locations=$(JAVA_HOME_8_X64);$(JAVA_HOME_11_X64)" -trace pwd://build/build_test.trace -trace-artifacts-embed test
displayName: 'Test'
- task: PublishBuildArtifacts@1
condition: always()
displayName: 'Publish build trace'
inputs:
pathtoPublish: build/build_test.trace
artifactName: 'trace_$(imageName)'
- script: java -jar saker.build.jar -bd build "-EUsaker.java.jre.install.locations=$(JAVA_HOME_8_X64);$(JAVA_HOME_11_X64)" -trace pwd://build/build_export.trace -trace-artifacts-embed export
displayName: 'Export library JAR'
- task: PublishBuildArtifacts@1
condition: always()
displayName: 'Publish build trace'
inputs:
pathtoPublish: build/build_export.trace
artifactName: 'trace_$(imageName)'
- 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)'