-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
130 lines (127 loc) · 4.17 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
trigger:
batch: true
branches:
include:
- master
- refs/tags/v*
jobs:
- job: macOS
pool:
vmImage: 'macos-latest'
steps:
- task: Bash@3
displayName: 'Set build label'
inputs:
targetType: 'inline'
script: 'label=$(buildscripts/getTag.sh);echo "##vso[task.setvariable variable=label]$label"'
- task: Xcode@5
displayName: 'Build with Xcode'
inputs:
actions: 'build'
scheme: ''
sdk: 'macosx'
configuration: 'Release'
xcWorkspacePath: 'DunGen.xcodeproj'
xcodeVersion: 10
- task: CmdLine@2
displayName: 'Copy documents to build directory'
inputs:
script: 'cp README.md build/Release; cp docs/acknowledgements.md build/Release'
- task: CmdLine@2
displayName: 'Zip up build artifact'
inputs:
script: 'cd build/Release; zip -r "DunGen-Mac-$LABEL.zip" DunGen.app README.md acknowledgements.md'
- task: CmdLine@2
displayName: 'Copy artifact to staging'
inputs:
script: 'cp "build/Release/DunGen-Mac-$LABEL.zip" $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish build into pipeline'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Mac Build'
publishLocation: 'Container'
- job: Windows
pool:
vmImage: 'windows-latest'
steps:
- task: Bash@3
displayName: 'Set build label'
inputs:
targetType: 'inline'
script: 'label=$(buildscripts/getTag.sh);echo "##vso[task.setvariable variable=label]$label"'
- task: VSBuild@1
displayName: 'Build with MSBuild'
inputs:
solution: 'platform/windows/DunGen/DunGen.vcxproj'
vsVersion: '16.0'
configuration: 'Release'
maximumCpuCount: true
msbuildArchitecture: 'x64'
- task: CopyFiles@2
displayName: 'Copy documents to build directory'
inputs:
SourceFolder: ''
Contents: |
README.md
docs/acknowledgements.md
TargetFolder: 'build/Release'
flattenFolders: true
- task: PowerShell@2
displayName: 'Zip up build artifact'
inputs:
workingDirectory: 'build/Release'
targetType: 'inline'
script: 'Compress-Archive -Path .\DunGen.exe, .\Resources, .\README.md, .\acknowledgements.md -CompressionLevel Optimal -DestinationPath .\DunGen-Windows-$env:LABEL.zip'
- task: PowerShell@2
displayName: 'Copy artifact to staging'
inputs:
targetType: 'inline'
script: 'Get-ChildItem Env:; Copy-Item .\build\Release\DunGen-Windows-$env:LABEL.zip -Destination $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish build into pipeline'
inputs:
PathToPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Windows Build'
publishLocation: 'Container'
- job: Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Bash@3
displayName: 'Set build label'
inputs:
targetType: 'inline'
script: 'label=$(buildscripts/getTag.sh);echo "##vso[task.setvariable variable=label]$label"'
- task: CmdLine@2
displayName: 'Install dependencies'
inputs:
script: |
sudo apt -y update
sudo apt-get -y install cmake xorg-dev libx11-dev libglu1-mesa-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev
- task: CmdLine@2
displayName: 'Generate Makefiles'
inputs:
script: 'cd build; cmake -G "Unix Makefiles" ..'
- task: CmdLine@2
displayName: 'Build with make'
inputs:
script: 'cd build; make'
- task: CmdLine@2
displayName: 'Copy documents to build directory'
inputs:
script: 'cp README.md build/; cp docs/acknowledgements.md build/'
- task: CmdLine@2
displayName: 'Zip up build artifact'
inputs:
script: 'cd build; zip -r "DunGen-Linux-$LABEL.zip" DunGen README.md acknowledgements.md'
- task: CmdLine@2
displayName: 'Copy artifact to staging'
inputs:
script: 'cp "build/DunGen-Linux-$LABEL.zip" $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish build into pipeline'
inputs:
PathToPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Linux Build'
publishLocation: 'Container'