-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
216 lines (213 loc) · 7.76 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
# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
# at pipeline level, set 'ezquake.githubconnection' & 'ezquake.githubreponame' variables
trigger:
- master
stages:
- stage: build
jobs:
- job: build_linux
pool:
vmImage: 'ubuntu-latest'
steps:
# Linux build
- script: |
sudo apt-get -y update
sudo apt install git build-essential mingw-w64 libsdl2-2.0-0 libsdl2-dev libjansson-dev libexpat1-dev libcurl4-openssl-dev libpng-dev libjpeg-dev libspeex-dev libspeexdsp-dev libfreetype6-dev libsndfile-dev
make -j5 && make strip
tar -cvzf ezquake-latest-linux64.zip ezquake-*-* LICENSE
# Windows build, through mingw
- script: |
make clean
EZ_CONFIG_FILE=.config_windows make -j5
EZ_CONFIG_FILE=.config_windows make strip
mv ezquake.exe ezquake-multi-mingw-x32.exe
zip ezquake-latest-win32.zip ezquake-multi-mingw-x32.exe LICENSE release-notes.md release-notes-latest.md
# Copy all zip files & release notes to distribution directory
- task: PublishPipelineArtifact@1
inputs:
targetPath: ezquake-latest-linux64.zip
artifactName: linux
- task: PublishPipelineArtifact@1
inputs:
targetPath: ezquake-latest-win32.zip
artifactName: mingw
- task: CopyFiles@2
inputs:
contents: ezquake-latest-win32.zip
targetFolder: $(Build.ArtifactStagingDirectory)/distributableBinaries/
- job: build_osx
pool:
vmImage: 'macos-latest'
steps:
# Build in OSX/whatever it is called now
- script: |
brew update
brew install pkgconfig pcre sdl2 sdl2_net sdl2_image sdl2_gfx sdl2_mixer jansson speex speexdsp freetype libsndfile
make -j5 && make strip
sh ./misc/install/create_osx_bundle.sh
mv ezquake.zip ezquake-latest-osx.zip
# Copy all zip files & release notes to distribution directory
- task: PublishPipelineArtifact@1
inputs:
targetPath: ezquake-latest-osx.zip
artifactName: osx
- job: build_windows
pool:
vmImage: 'windows-latest'
steps:
# Create temporary dir for everything we want to zip
- task: CmdLine@2
inputs:
script: 'md tozip'
- task: DeleteFiles@1
inputs:
SourceFolder: 'tozip'
Contents: '**/*' # all files and folders
RemoveSourceFolder: false
# Build in Visual Studio (classic, 32 bit)
- task: VSBuild@1
displayName: 'std-32-rls'
inputs:
solution: 'ezQuake.sln'
configuration: 'rls-classic' # Optional
platform: 'x86'
clean: true # Optional
msbuildArchitecture: 'x86' # Optional. Options: x86, x64
- task: CmdLine@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
script: 'copy /y ezquake.exe tozip\ezquake-std-vs-x86.exe'
# Build in Visual Studio (classic, 32 bit - debug)
- task: VSBuild@1
displayName: 'std-32-dbg'
inputs:
solution: 'ezQuake.sln'
configuration: 'dbg-classic' # Optional
platform: 'x86'
clean: true # Optional
msbuildArchitecture: 'x86' # Optional. Options: x86, x64
- task: CmdLine@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
script: 'copy /y ezquake.exe tozip\ezquake-std-vs-x86-debug.exe'
# Build in Visual Studio (modern, 32 bit - debug)
- task: VSBuild@1
displayName: 'glsl-32-dbg'
inputs:
solution: 'ezQuake.sln'
configuration: 'dbg-modern' # Optional
platform: 'x86'
clean: true # Optional
msbuildArchitecture: 'x86' # Optional. Options: x86, x64
- task: CmdLine@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
script: 'copy /y ezquake.exe tozip\ezquake-glsl-vs-x86-debug.exe'
# Build in Visual Studio (modern, 32 bit)
- task: VSBuild@1
displayName: 'glsl-32-rls'
inputs:
solution: 'ezQuake.sln'
configuration: 'rls-modern' # Optional
platform: 'x86'
clean: true # Optional
msbuildArchitecture: 'x86' # Optional. Options: x86, x64
- task: CmdLine@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
script: 'copy /y ezquake.exe tozip\ezquake-glsl-vs-x86.exe'
# Build in Visual Studio (classic, 64 bit)
- task: VSBuild@1
displayName: 'std-64-rls'
inputs:
solution: 'ezQuake.sln'
configuration: 'rls-classic' # Optional
platform: 'x64'
clean: true # Optional
msbuildArchitecture: 'x86' # Optional. Options: x86, x64
- task: CmdLine@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
script: 'copy /y ezquake.exe tozip\ezquake-std-vs-x64.exe'
# Build in Visual Studio (modern, 64 bit)
- task: VSBuild@1
displayName: 'glsl-64-rls'
inputs:
solution: 'ezQuake.sln'
configuration: 'rls-modern' # Optional
platform: 'x64'
clean: true # Optional
msbuildArchitecture: 'x86' # Optional. Options: x86, x64
- task: CmdLine@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
script: 'copy /y ezquake.exe tozip\ezquake-glsl-vs-x64.exe'
# Move misc other files to zippable directory
- task: CopyFiles@2
inputs:
targetFolder: 'tozip'
contents: |
release-notes.md
release-notes-latest.md
LICENSE
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'tozip'
includeRootFolder: false
archiveType: 'zip'
archiveFile: ezquake-latest-windows-vstudio.zip
replaceExistingArchive: true
# Copy all zip files & release notes to distribution directory
- task: PublishPipelineArtifact@1
inputs:
targetPath: ezquake-latest-windows-vstudio.zip
artifactName: windows
# Upload to github once previous stage complete
- stage: upload
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: upload
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: windows
path: $(Build.ArtifactStagingDirectory)/distributableBinaries/
- task: DownloadPipelineArtifact@2
inputs:
artifact: linux
path: $(Build.ArtifactStagingDirectory)/distributableBinaries/
- task: DownloadPipelineArtifact@2
inputs:
artifact: mingw
path: $(Build.ArtifactStagingDirectory)/distributableBinaries/
- task: DownloadPipelineArtifact@2
inputs:
artifact: osx
path: $(Build.ArtifactStagingDirectory)/distributableBinaries/
- task: CopyFiles@2
inputs:
contents: |
release-notes.md
release-notes-latest.md
targetFolder: $(Build.ArtifactStagingDirectory)/distributableBinaries/
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/distributableBinaries/'
artifactName: 'latest-build'
# Publish to GitHub
- task: GitHubRelease@0
displayName: 'Edit GitHub Release'
inputs:
gitHubConnection: '$(ezquake.githubconnection)'
repositoryName: '$(ezquake.githubreponame)'
action: edit
tag: latest
assets: $(Build.ArtifactStagingDirectory)/distributableBinaries/*
isPreRelease: true
assetUploadMode: replace
addChangeLog: false
releaseNotesFile: 'release-notes.md'