forked from LuxCoreRender/LuxCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
220 lines (196 loc) · 7.55 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# Azure build pipeline script
# Add steps that build, run tests, deploy, and more: https://aka.ms/yaml
# This script processes daily and official releases (alpha/beta/rc and final)
# To trigger an official release, add a commit tagged in the form "luxcorerender_v*"
# The "version_string" after the "_" in the tag is used in following steps
# to generate binary names like "luxcorerender-<version_string>-<platform>-..."
# One, and only one, tag in the form "luxcorerender_v*" is needed,
# otherwise the official release build aborts.
variables:
- group: BuildPipelinesGroup
trigger:
branches:
include:
- '*'
tags:
include:
- 'luxcorerender_v*'
jobs:
- job: DetectBuildType
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: ./scripts/azurepipeline/detect-build-type.sh
displayName: Detecting release type (daily, alpha, beta or final)
name: setvarStep
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: LuxCore
displayName: 'Upload github_release_title'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
#==============================================================================
# Linux binaries
#==============================================================================
- job: LuxCoreRenderLinux
dependsOn: DetectBuildType
condition: succeeded()
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-20.04'
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]
steps:
- template: ./scripts/azurepipeline/linux/linux_jobs.yml
- job: LuxCoreRenderLinuxSDK
dependsOn: DetectBuildType
condition: |
and
(
succeeded(),
eq(dependencies.DetectBuildType.outputs['setvarStep.final'], 'TRUE')
)
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-20.04'
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]
final: $[ dependencies.DetectBuildType.outputs['setvarStep.final'] ]
steps:
- template: ./scripts/azurepipeline/linux/linux_jobs.yml
parameters:
build: 'SDK'
#==============================================================================
# Windows binaries
#==============================================================================
- job: LuxCoreRenderWindows
dependsOn: DetectBuildType
condition: succeeded()
timeoutInMinutes: 0
pool:
vmImage: 'windows-2019'
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
addToPath: true
architecture: 'x64'
- script: ./scripts/azurepipeline/windows/deps-setup.cmd
displayName: Getting required deps
- template: ./scripts/azurepipeline/windows/windows_jobs.yml
parameters:
build_script: './scripts/azurepipeline/windows/build.cmd /cmake-only /minimal'
post_script: './scripts/azurepipeline/windows/post-build.cmd'
message_text: 'Unified CPU/OpenCL/CUDA binaries'
# - script: './scripts/azurepipeline/windows/test.cmd'
# displayName: Testing LuxCore
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: LuxCore
displayName: 'Upload luxcorerender-<version>-win64.zip'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
- job: LuxCoreRenderWindowsSDK
dependsOn: DetectBuildType
condition: |
and
(
succeeded(),
eq(dependencies.DetectBuildType.outputs['setvarStep.final'], 'TRUE')
)
timeoutInMinutes: 0
pool:
vmImage: 'windows-2019'
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]
# Variable 'final' is used only in this job to control execution of 'create-sdk.bat'
final: $[ dependencies.DetectBuildType.outputs['setvarStep.final'] ]
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
addToPath: true
architecture: 'x64'
- script: ./scripts/azurepipeline/windows/deps-setup.cmd
displayName: Getting required deps
- template: ./scripts/azurepipeline/windows/windows_jobs.yml
parameters:
build_script: './scripts/azurepipeline/windows/build.cmd /cmake-only /dll'
post_script: './scripts/azurepipeline/windows/post-build.cmd'
message_text: 'Unified CPU/OpenCL/CUDA binaries'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: LuxCore
displayName: 'Upload luxcorerender-<version>-win64.zip'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
#==============================================================================
# MacOS binaries
#==============================================================================
- job: LuxCoreRenderMacOS
dependsOn: DetectBuildType
condition: succeeded()
timeoutInMinutes: 0
pool:
vmImage: 'macOS-11'
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]
steps:
- script: ./scripts/azurepipeline/macos/install.sh
displayName: Install Build Tools
- script: ./scripts/azurepipeline/macos/build.sh
displayName: Building LuxCore
# - script: ./scripts/azurepipeline/macos/test.sh
# displayName: Testing LuxCore
- task: InstallAppleCertificate@2
inputs:
certSecureFile: LuxCoreSignCert.p12
certPwd: $(AppleCertPwd)
- script: ./scripts/azurepipeline/macos/pack.sh
displayName: Packing DiskImages
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: LuxCore
displayName: 'Upload luxcorerender-<version>'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
#==============================================================================
# Daily build finalization
#==============================================================================
# Next job deletes "latest" tag from LuxCore repo, so that it is then
# recreated at the current commit by the following release pipeline
# Runs only if:
# - this is a daily build
# - at least one of the build jobs was successful
# - the pipeline has been triggered by master branch and not by a pull request
- job: DeleteLatestTag
dependsOn:
- DetectBuildType
- LuxCoreRenderLinux
- LuxCoreRenderWindows
- LuxCoreRenderMacOS
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]
condition: |
and
(
eq(variables['System.PullRequest.IsFork'], 'False'),
eq(variables['Build.SourceBranchName'], 'master'),
eq(dependencies.DetectBuildType.outputs['setvarStep.version_string'], 'latest'),
in(dependencies.LuxCoreRenderLinux.result, 'Succeeded', 'SucceededWithIssues'),
in(dependencies.LuxCoreRenderWindows.result, 'Succeeded', 'SucceededWithIssues')
)
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: InstallSSHKey@0
inputs:
hostName: github.com,140.82.118.3 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
sshPublicKey: $(PubKey)
sshKeySecureFile: luxcore_id_rsa
- script: ./scripts/azurepipeline/delete-latest-tag.sh
displayName: Deleting tag to update latest build