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:
|
2019-05-06 03:21:06 +03:00
|
|
|
- job: Linux
|
2019-04-04 11:33:38 +03:00
|
|
|
timeoutInMinutes: 360
|
|
|
|
pool:
|
2019-04-16 12:35:46 +03:00
|
|
|
name: 'linux-pool'
|
2019-04-04 11:33:38 +03:00
|
|
|
steps:
|
|
|
|
- template: ci/build-unix.yml
|
2019-04-12 13:30:13 +03:00
|
|
|
parameters:
|
|
|
|
name: linux
|
2019-04-27 02:45:28 +03:00
|
|
|
- bash: |
|
|
|
|
set -euo pipefail
|
|
|
|
MESSAGE=$(git log --pretty=format:%s -n1)
|
|
|
|
curl -XPOST \
|
2019-05-06 03:21:06 +03:00
|
|
|
-i \
|
2019-04-27 02:45:28 +03:00
|
|
|
-H 'Content-type: application/json' \
|
2019-05-06 19:15:40 +03:00
|
|
|
--data "{\"text\":\"<!here> *FAILED* Linux: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
|
2019-04-27 02:45:28 +03:00
|
|
|
$(Slack.URL)
|
|
|
|
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-05-06 03:21:06 +03:00
|
|
|
- job: macOS
|
2019-04-04 11:33:38 +03:00
|
|
|
timeoutInMinutes: 360
|
|
|
|
pool:
|
2019-04-18 18:22:10 +03:00
|
|
|
vmImage: 'macOS-10.14'
|
2019-04-04 11:33:38 +03:00
|
|
|
steps:
|
|
|
|
- template: ci/build-unix.yml
|
2019-04-12 13:30:13 +03:00
|
|
|
parameters:
|
|
|
|
name: macos
|
2019-04-27 02:45:28 +03:00
|
|
|
- bash: |
|
|
|
|
set -euo pipefail
|
|
|
|
MESSAGE=$(git log --pretty=format:%s -n1)
|
|
|
|
curl -XPOST \
|
2019-05-06 03:21:06 +03:00
|
|
|
-i \
|
2019-04-27 02:45:28 +03:00
|
|
|
-H 'Content-type: application/json' \
|
2019-05-06 19:15:40 +03:00
|
|
|
--data "{\"text\":\"<!here> *FAILED* macOS: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
|
2019-04-27 02:45:28 +03:00
|
|
|
$(Slack.URL)
|
|
|
|
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-05-06 03:21:06 +03:00
|
|
|
- job: Windows
|
2019-04-11 15:26:55 +03:00
|
|
|
timeoutInMinutes: 360
|
|
|
|
pool:
|
2019-05-13 12:20:21 +03:00
|
|
|
name: 'windows-pool'
|
2019-04-11 15:26:55 +03:00
|
|
|
steps:
|
|
|
|
- template: ci/build-windows.yml
|
2019-04-27 02:45:28 +03:00
|
|
|
- bash: |
|
|
|
|
set -euo pipefail
|
|
|
|
MESSAGE=$(git log --pretty=format:%s -n1)
|
|
|
|
curl -XPOST \
|
2019-05-06 03:21:06 +03:00
|
|
|
-i \
|
2019-04-27 02:45:28 +03:00
|
|
|
-H 'Content-type: application/json' \
|
2019-05-06 19:15:40 +03:00
|
|
|
--data "{\"text\":\"<!here> *FAILED* Windows: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
|
2019-04-27 02:45:28 +03:00
|
|
|
$(Slack.URL)
|
|
|
|
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
|
2019-04-15 15:54:04 +03:00
|
|
|
|
2019-04-18 19:46:02 +03:00
|
|
|
- job: perf
|
2019-04-23 22:43:23 +03:00
|
|
|
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'
|
2019-04-27 02:45:28 +03:00
|
|
|
- bash: |
|
|
|
|
set -euo pipefail
|
|
|
|
MESSAGE=$(git log --pretty=format:%s -n1)
|
|
|
|
curl -XPOST \
|
2019-05-06 03:21:06 +03:00
|
|
|
-i \
|
2019-04-27 02:45:28 +03:00
|
|
|
-H 'Content-type: application/json' \
|
2019-05-06 19:15:40 +03:00
|
|
|
--data "{\"text\":\"<!here> *FAILED* perf: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
|
2019-04-27 02:45:28 +03:00
|
|
|
$(Slack.URL)
|
|
|
|
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
|
2019-04-18 19:46:02 +03:00
|
|
|
|
2019-04-15 15:54:04 +03:00
|
|
|
- job: release
|
2019-05-06 03:21:06 +03:00
|
|
|
dependsOn: [ "Linux", "macOS", "Windows", "perf"]
|
2019-04-15 15:54:04 +03:00
|
|
|
pool:
|
|
|
|
vmImage: "Ubuntu-16.04"
|
|
|
|
condition: and(succeeded(),
|
2019-05-06 03:21:06 +03:00
|
|
|
eq( dependencies.Linux.outputs['release.has_released'], 'true' ),
|
|
|
|
eq( dependencies.macOS.outputs['release.has_released'], 'true' ),
|
|
|
|
eq( dependencies.Windows.outputs['release.has_released'], 'true' ))
|
2019-04-15 15:54:04 +03:00
|
|
|
variables:
|
2019-05-06 03:21:06 +03:00
|
|
|
artifact-linux: $[ dependencies.Linux.outputs['publish.artifact'] ]
|
|
|
|
artifact-macos: $[ dependencies.macOS.outputs['publish.artifact'] ]
|
|
|
|
artifact-windows: $[ dependencies.Windows.outputs['publish.artifact'] ]
|
|
|
|
artifact-windows-installer: $[ dependencies.Windows.outputs['publish.artifact-windows-installer'] ]
|
2019-04-15 15:54:04 +03:00
|
|
|
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:
|
2019-04-16 18:56:50 +03:00
|
|
|
artifactName: $(artifact-linux)
|
2019-04-15 15:54:04 +03:00
|
|
|
targetPath: $(Build.StagingDirectory)/release
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
|
|
inputs:
|
2019-04-16 18:56:50 +03:00
|
|
|
artifactName: $(artifact-macos)
|
2019-04-15 15:54:04 +03:00
|
|
|
targetPath: $(Build.StagingDirectory)/release
|
2019-04-25 04:57:32 +03:00
|
|
|
- task: DownloadPipelineArtifact@0
|
|
|
|
inputs:
|
|
|
|
artifactName: $(artifact-windows)
|
|
|
|
targetPath: $(Build.StagingDirectory)/release
|
2019-04-30 15:39:28 +03:00
|
|
|
- task: DownloadPipelineArtifact@0
|
|
|
|
inputs:
|
|
|
|
artifactName: $(artifact-windows-installer)
|
|
|
|
targetPath: $(Build.StagingDirectory)/release
|
2019-04-15 15:54:04 +03:00
|
|
|
- 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
|
2019-04-27 02:45:28 +03:00
|
|
|
- bash: |
|
|
|
|
set -euo pipefail
|
|
|
|
MESSAGE=$(git log --pretty=format:%s -n1)
|
|
|
|
curl -XPOST \
|
2019-05-06 03:21:06 +03:00
|
|
|
-i \
|
2019-04-27 02:45:28 +03:00
|
|
|
-H 'Content-type: application/json' \
|
2019-05-06 19:15:40 +03:00
|
|
|
--data "{\"text\":\"<!here> *FAILED* Release: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
|
2019-04-27 02:45:28 +03:00
|
|
|
$(Slack.URL)
|
|
|
|
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
|