forked from rust-skia/rust-skia
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
107 lines (101 loc) · 3.92 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# This script can run in two configurations:
#
# deployRelease = true
# A reasonable number of feature combinations are built and binaries are deployed.
#
# deployRelease = false
# Only two feature sets are built: One with no features and one with all features.
# And no binaries or packages are released.
variables:
deployRelease: ${{ eq(variables['build.SourceBranchName'], 'release') }}
stages:
- stage: 'Build'
jobs:
- template: 'azure-pipelines-template.yml'
parameters:
platform: 'Linux'
platformTarget: 'x86_64-unknown-linux-gnu'
androidHost: 'linux-x86_64'
androidNDK: 'r21b'
androidAPILevel: '26'
androidBinExt: ''
image: 'ubuntu-18.04'
deployRelease: ${{ eq(variables['build.SourceBranchName'], 'release') }}
- template: 'azure-pipelines-template.yml'
parameters:
platform: 'macOS'
platformTarget: 'x86_64-apple-darwin'
androidHost: 'darwin-x86_64'
androidNDK: 'r21b'
androidAPILevel: '26'
androidBinExt: ''
image: 'macOS-10.15'
deployRelease: ${{ eq(variables['build.SourceBranchName'], 'release') }}
- template: 'azure-pipelines-template.yml'
parameters:
platform: 'Windows'
platformTarget: 'x86_64-pc-windows-msvc'
# No Android builds for Windows, ATM.
# androidHost: 'windows-x86_64'
androidNDK: 'r21b'
androidAPILevel: '26'
androidBinExt: '.cmd'
image: 'windows-2019'
deployRelease: ${{ eq(variables['build.SourceBranchName'], 'release') }}
# Because deployment can not be done automatically, the Package stage got disabled for now.
#
# - stage: 'Package'
# condition: and(succeeded(), eq(variables.deployRelease, 'True'))
# jobs:
# - job:
# pool:
# vmImage: ubuntu-16.04
# variables:
# rust_backtrace: 1
#
# steps:
# - bash: |
# set -e
# rustup default stable
# rustup update stable
# rustc -Vv
# cargo -V
# displayName: 'Update Rust and Print Versions'
#
# # skia-bindings gets packaged without verification, because the build process modifies the src directory.
# # TODO: reenable package verification as soon CLion and rust-analyzer supports !include macros.
# - bash: |
# set -e
# (cd skia-bindings && cargo package -vv --no-verify --target-dir /tmp/)
# mkdir -p "$(Build.ArtifactStagingDirectory)/package/"
# cp /tmp/package/skia-bindings-*.crate "$(Build.ArtifactStagingDirectory)/package/"
# # pseudo-verification:
# (cd /tmp/package && tar xzf skia-bindings-*.crate && rm skia-bindings-*.crate)
# (cd /tmp/package/skia-bindings-* && cargo build -vv --release)
# displayName: 'Package and Verify skia-bindings'
#
# # TODO: why does this fail with
# # error: 1 files in the working directory contain changes that were not yet committed into git:
# # src/prelude.rs
# # to proceed despite this, pass the `--allow-dirty` flag
# # TODO: find a better way to extract the GITHUB_RELEASE_TAG
# - bash: |
# set -e
# cd skia-safe && cargo package -vv --offline --no-verify --allow-dirty --target-dir "$(Build.ArtifactStagingDirectory)"
# export GITHUB_RELEASE_TAG=$(cd "$(Build.ArtifactStagingDirectory)/package" && find skia-safe-*.crate | cut -d'-' -f3 | cut -d'.' -f1-3)
# echo "##vso[task.setvariable variable=GITHUB_RELEASE_TAG;]${GITHUB_RELEASE_TAG}"
# displayName: 'Package skia-safe'
#
# - task: GithubRelease@0
# displayName: 'Release to GitHub rust-skia/rust-skia'
# inputs:
# action: 'edit'
# gitHubConnection: 'rust-skia-github-connection'
# repositoryName: 'rust-skia/rust-skia'
# tagSource: 'manual'
# target: 'release'
# tag: '$(GITHUB_RELEASE_TAG)'
# assets: '$(Build.ArtifactStagingDirectory)/package/*.crate'
# assetUploadMode: 'replace'
# isPreRelease: true
# addChangeLog: false