2020-06-12 17:17:33 -04:00
|
|
|
trigger: none
|
|
|
|
|
|
|
|
pr:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
|
|
|
# Different users have different machine setups, we run the build three times, on ubuntu, osx, and windows
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
linux:
|
|
|
|
imageName: 'ubuntu-latest'
|
|
|
|
mac:
|
2021-10-08 13:24:07 -04:00
|
|
|
imageName: "macos-latest"
|
2020-06-12 17:17:33 -04:00
|
|
|
windows:
|
|
|
|
imageName: "windows-2019"
|
|
|
|
maxParallel: 3
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
variables:
|
|
|
|
currentImage: $(imageName)
|
|
|
|
codecov: $(CODECOV_TOKEN)
|
|
|
|
VERSION:
|
|
|
|
|
|
|
|
steps:
|
|
|
|
# Runs 'mvn clean package'
|
|
|
|
- task: Maven@3
|
|
|
|
inputs:
|
|
|
|
mavenPomFile: 'pom.xml'
|
|
|
|
mavenOptions: '-Xmx3072m'
|
|
|
|
javaHomeOption: 'JDKVersion'
|
2021-08-18 21:15:05 -04:00
|
|
|
jdkVersionOption: '1.11'
|
2020-06-12 17:17:33 -04:00
|
|
|
jdkArchitectureOption: 'x64'
|
|
|
|
publishJUnitResults: true
|
|
|
|
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
|
|
|
goals: 'package'
|
|
|
|
|
2021-05-21 15:51:37 -04:00
|
|
|
- task: Maven@3
|
|
|
|
inputs:
|
|
|
|
mavenPomFile: 'pom.xml'
|
2021-05-21 15:53:54 -04:00
|
|
|
mavenOptions: '-Xmx3072m'
|
|
|
|
javaHomeOption: 'JDKVersion'
|
2021-08-18 21:15:05 -04:00
|
|
|
jdkVersionOption: '1.11'
|
2021-05-21 15:53:54 -04:00
|
|
|
jdkArchitectureOption: 'x64'
|
2021-05-21 15:51:37 -04:00
|
|
|
options: '-pl org.hl7.fhir.validation.cli'
|
|
|
|
publishJUnitResults: false
|
|
|
|
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
2021-05-21 15:53:54 -04:00
|
|
|
goals: 'exec:exec'
|
2021-05-21 15:42:41 -04:00
|
|
|
|
2020-06-12 17:17:33 -04:00
|
|
|
# Upload test results to codecov
|
|
|
|
- script: bash <(curl https://codecov.io/bash) -t $(codecov)
|
|
|
|
displayName: 'codecov Bash Uploader'
|
2020-06-12 18:05:45 -04:00
|
|
|
condition: eq(variables.currentImage, 'ubuntu-latest')
|
2020-06-12 17:17:33 -04:00
|
|
|
|
|
|
|
# Publishes the test results to build artifacts.
|
|
|
|
- task: PublishCodeCoverageResults@1
|
2020-06-12 18:05:45 -04:00
|
|
|
displayName: 'Publish JaCoCo test results'
|
|
|
|
condition: eq(variables.currentImage, 'ubuntu-latest')
|
2020-06-12 17:17:33 -04:00
|
|
|
inputs:
|
|
|
|
codeCoverageTool: 'JaCoCo'
|
|
|
|
summaryFileLocation: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/jacoco.xml'
|
2020-06-12 17:25:07 -04:00
|
|
|
reportDirectory: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/'
|