forked from Azure/qpid-proton-j-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci.yml
135 lines (123 loc) · 4.47 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
resources:
repositories:
- repository: azure-sdk-build-tools
type: git
name: internal/azure-sdk-build-tools
trigger:
branches:
include:
- master
- feature/*
- release/*
- hotfix/*
pr:
branches:
include:
- master
- feature/*
- release/*
- hotfix/*
variables:
DefaultOptions: '--batch-mode --fail-at-end -Dmaven.wagon.http.pool=false'
LoggingOptions: '-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
MemoryOptions: '-Xmx3072m'
stages:
- stage: Build
jobs:
- job: 'Build'
pool:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
Java 8:
ArtifactName: 'java8-packages'
ProfileFlag: '-Djava8'
JavaVersion: '1.8'
# We name this 'packages' because it is the default version we want to ship with.
Java LTS:
ArtifactName: 'packages'
ProfileFlag: '-Djava-lts'
JavaVersion: '1.11'
steps:
- task: Maven@3
displayName: 'Build and Package'
inputs:
mavenPomFile: 'pom.xml'
goals: 'deploy'
options: '$(DefaultOptions) $(ProfileFlag) -T 1C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true --settings eng/settings.xml -DaltDeploymentRepository="local::default::file:///${project.basedir}/output"'
mavenOptions: '$(LoggingOptions) $(MemoryOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
- task: Maven@3
displayName: 'Run SpotBugs, Checkstyle, and Javadoc'
inputs:
mavenPomFile: pom.xml
options: '$(DefaultOptions) --no-transfer-progress -DskipTests -Dgpg.skip'
mavenOptions: '$(MemoryOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'verify'
- script: |
cp output/com/microsoft/azure/qpid-proton-j-extensions/**/* $(Build.ArtifactStagingDirectory)
rm $(Build.ArtifactStagingDirectory)/*.sha1
rm $(Build.ArtifactStagingDirectory)/*.md5
displayName: Flatten and copy build outputs
- publish: $(Build.ArtifactStagingDirectory)
artifact: $(ArtifactName)
displayName: 'Publish outputs to $(ArtifactName) artifact'
- job: 'Test'
strategy:
matrix:
Linux - Java 8:
OSName: 'Linux'
OSVmImage: 'ubuntu-18.04'
ProfileFlag: '-Djava8'
JavaVersion: '1.8'
macOS - Java 8:
OSName: 'macOS'
OSVmImage: 'macOS-10.15'
ProfileFlag: '-Djava8'
JavaVersion: '1.8'
Windows - Java 8:
OSName: 'Windows'
OSVmImage: 'vs2017-win2016'
ProfileFlag: '-Djava8'
JavaVersion: '1.8'
Linux - Java LTS:
OSName: 'Linux'
OSVmImage: 'ubuntu-18.04'
ProfileFlag: '-Djava-lts'
JavaVersion: '1.11'
macOS - Java LTS:
OSName: 'macOS'
OSVmImage: 'macOS-10.15'
ProfileFlag: '-Djava-lts'
JavaVersion: '1.11'
Windows - Java LTS:
OSName: 'Windows'
OSVmImage: 'vs2017-win2016'
ProfileFlag: '-Djava-lts'
JavaVersion: '1.11'
pool:
vmImage: $(OSVmImage)
steps:
- task: Maven@3
displayName: 'Run Tests'
inputs:
mavenPomFile: 'pom.xml'
options: '$(DefaultOptions) $(ProfileFlag) --settings eng/settings.xml'
mavenOptions: '-Xmx3072m $(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'test'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
mergeTestResults: true
testRunTitle: '$(OSName) on Java $(JavaVersion)'