daml/ci/build-unix.yml
Jonas Chevalier 7c08c86d63
fmt.sh: format and lint checks (#349)
* load dev-env in ./build.sh

one less thing for the user to do

* fmt.sh: extract platform-agnostic checks
2019-04-10 14:22:35 +02:00

40 lines
1.2 KiB
YAML

steps:
- checkout: self
- bash: ci/dev-env-install.sh
displayName: 'Build/Install the Developer Environment'
- bash: |
source dev-env/lib/ensure-nix
ci/dev-env-push.py
displayName: 'Push Developer Environment build results'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
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/build.sh
displayName: 'Build'
env:
IS_FORK: $(System.PullRequest.IsFork)
# to upload to the bazel cache
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'Bazel execution logs'
- bash: ci/release.sh
displayName: 'Release'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
env:
# to connect to bintray
JFROG_CONFIG_CONTENT: $(JFROG_CONFIG_CONTENT)