daml/ci/build-unix.yml

60 lines
1.9 KiB
YAML
Raw Normal View History

parameters:
name: ''
2019-04-04 11:33:38 +03:00
steps:
- checkout: self
2019-04-04 14:03:56 +03:00
- bash: ci/dev-env-install.sh
displayName: 'Build/Install the Developer Environment'
2019-04-04 11:33:38 +03:00
- bash: |
source dev-env/lib/ensure-nix
2019-04-04 14:03:56 +03:00
ci/dev-env-push.py
displayName: 'Push Developer Environment build results'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
2019-04-04 11:33:38 +03:00
env:
# to upload to the Nix cache
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
NIX_SECRET_KEY_CONTENT: $(NIX_SECRET_KEY_CONTENT)
- bash: ./fmt.sh --test
displayName: 'Platform-agnostic lints and checks'
condition: eq(variables['Agent.OS'], 'Linux')
- bash: ci/configure-bazel.sh
displayName: 'Configure Bazel'
2019-04-04 11:33:38 +03:00
env:
IS_FORK: $(System.PullRequest.IsFork)
2019-04-04 11:33:38 +03:00
# to upload to the bazel cache
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
- bash: ./build.sh "_$(uname)"
displayName: 'Build'
2019-04-04 11:33:38 +03:00
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'Bazel execution logs'
- bash: ci/release.sh
displayName: 'Release'
condition: and(succeeded(),
eq(variables['System.PullRequest.IsFork'], 'False'))
2019-04-04 11:33:38 +03:00
env:
# to connect to bintray
JFROG_CONFIG_CONTENT: $(JFROG_CONFIG_CONTENT)
name: release
- bash: |
set -euo pipefail
ARTIFACT=daml-sdk-$(release_tag)-${{ parameters.name }}
cp bazel-genfiles/release/sdk-release-tarball.tar.gz $(Build.StagingDirectory)/$ARTIFACT
echo "##vso[task.setvariable variable=artifact;isOutput=true]$ARTIFACT"
name: publish
condition: eq(variables['release.has_released'], 'true')
- task: PublishPipelineArtifact@0
condition: eq(variables['release.has_released'], 'true')
inputs:
targetPath: $(Build.StagingDirectory)/$(publish.artifact)
artifactName: $(publish.artifact)