daml/azure-pipelines.yml

112 lines
3.4 KiB
YAML
Raw Normal View History

2019-04-04 11:33:38 +03:00
# Azure Pipelines file, see https://aka.ms/yaml
# Enable builds on all branches
trigger:
# Build every commit as our release process relies on
# the release process being built alone.
batch: false
branches:
include:
- master
# Enable PR triggers that target the master branch
pr:
autoCancel: true # cancel previous builds on push
branches:
include:
- master
jobs:
- job: linux
2019-04-04 11:33:38 +03:00
timeoutInMinutes: 360
pool:
name: 'linux-pool'
2019-04-04 11:33:38 +03:00
steps:
- template: ci/build-unix.yml
parameters:
name: linux
2019-04-04 11:33:38 +03:00
- job: macos
2019-04-04 11:33:38 +03:00
timeoutInMinutes: 360
pool:
vmImage: 'macOS-10.14'
2019-04-04 11:33:38 +03:00
steps:
- template: ci/build-unix.yml
parameters:
name: macos
2019-04-04 11:33:38 +03:00
- job: windows
timeoutInMinutes: 360
pool:
vmImage: 'vs2017-win2016'
steps:
- template: ci/build-windows.yml
2019-04-18 19:46:02 +03:00
- job: perf
timeoutInMinutes: 60
2019-04-18 19:46:02 +03:00
pool:
name: 'linux-pool'
steps:
- checkout: self
- bash: ci/dev-env-install.sh
displayName: 'Build/Install the Developer Environment'
- bash: ci/configure-bazel.sh
displayName: 'Configure Bazel'
env:
IS_FORK: $(System.PullRequest.IsFork)
# to upload to the bazel cache
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
- bash: |
set -euo pipefail
eval "$(./dev-env/bin/dade-assist)"
bazel run -- //ledger/sandbox-perf -foe true -i1 -f1 -wi 1 -bm avgt -rf csv -rff "$(Build.StagingDirectory)/sandbox-perf.csv"
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
inputs:
pathtoPublish: '$(Build.StagingDirectory)'
artifactName: 'Perf test logs'
- job: release
2019-04-18 19:46:02 +03:00
dependsOn: [ "linux", "macos", "windows", "perf"]
pool:
vmImage: "Ubuntu-16.04"
condition: and(succeeded(),
eq( dependencies.linux.outputs['release.has_released'], 'true' ),
eq( dependencies.macos.outputs['release.has_released'], 'true' ),
eq( dependencies.windows.outputs['release.has_released'], 'true' ))
variables:
artifact-linux: $[ dependencies.linux.outputs['publish.artifact'] ]
artifact-macos: $[ dependencies.macos.outputs['publish.artifact'] ]
artifact-windows: $[ dependencies.windows.outputs['publish.artifact'] ]
steps:
- checkout: self
persistCredentials: true
- bash: |
set -euxo pipefail
git tag v$(cat VERSION)
git push origin v$(cat VERSION)
mkdir $(Build.StagingDirectory)/release
- task: DownloadPipelineArtifact@0
inputs:
artifactName: $(artifact-linux)
targetPath: $(Build.StagingDirectory)/release
- task: DownloadPipelineArtifact@0
inputs:
artifactName: $(artifact-macos)
targetPath: $(Build.StagingDirectory)/release
- task: DownloadPipelineArtifact@0
inputs:
artifactName: $(artifact-windows)
targetPath: $(Build.StagingDirectory)/release
- task: GitHubRelease@0
inputs:
gitHubConnection: 'garyverhaegen-da'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'auto'
assets: $(Build.StagingDirectory)/release/*
assetUploadMode: 'replace'
addChangeLog: false
isPrerelease: true