-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
153 lines (153 loc) · 5.36 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
variables:
MODULE_NAME: rdb
DEPENDENCIES: $(System.DefaultWorkingDirectory)/dependencies
GARRYSMOD_COMMON: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common
GARRYSMOD_COMMON_BRANCH: master
GARRYSMOD_COMMON_REPOSITORY: https://github.com/danielga/garrysmod_common.git
PROJECT_GENERATOR_VERSION: 2
REPOSITORY_DIR: $(System.DefaultWorkingDirectory)
trigger:
tags:
include:
- '*'
jobs:
- job: windows
displayName: Windows
pool:
name: Azure Pipelines
vmImage: windows-2019
timeoutInMinutes: 10
variables:
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.ps1
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.ps1
COMPILER_PLATFORM: vs2019
PROJECT_OS: windows
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/windows/premake-core/premake5.exe
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-windows.zip
steps:
- checkout: self
clean: true
fetchDepth: 1
submodules: recursive
- powershell: 'Invoke-Expression ((New-Object System.Net.WebClient).DownloadString("$env:BOOTSTRAP_URL"))'
displayName: Bootstrap
- powershell: '& "$env:BUILD_SCRIPT"'
displayName: Build
- task: CopyFiles@2
displayName: 'Copy files to $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/projects/windows/vs2019'
Contents: '*/Release/*.dll'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
flattenFolders: true
preserveTimestamp: true
- task: PublishBuildArtifacts@1
displayName: 'Publish build artifacts'
inputs:
ArtifactName: windows
- job: linux
displayName: Linux
pool:
name: Azure Pipelines
vmImage: ubuntu-16.04
timeoutInMinutes: 10
variables:
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.sh
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.sh
COMPILER_PLATFORM: gmake
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/linux/premake-core/premake5
PROJECT_OS: linux
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz
CC: gcc-9
CXX: g++-9
AR: gcc-ar-9
NM: gcc-nm-9
RANLIB: gcc-ranlib-9
steps:
- checkout: self
clean: true
fetchDepth: 1
submodules: recursive
- bash: 'curl -s -L "$BOOTSTRAP_URL" | bash'
displayName: Bootstrap
- bash: |
sudo apt-get update && sudo apt-get install -y g++-9-multilib
$BUILD_SCRIPT
displayName: Build
- task: CopyFiles@2
displayName: 'Copy files to $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/projects/linux/gmake'
Contents: '*/Release/*.dll'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
flattenFolders: true
preserveTimestamp: true
- task: PublishBuildArtifacts@1
displayName: 'Publish build artifacts'
inputs:
ArtifactName: linux
- job: macosx
displayName: macOS
pool:
name: Azure Pipelines
vmImage: macOS-10.15
timeoutInMinutes: 10
variables:
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.sh
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.sh
COMPILER_PLATFORM: gmake
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/macosx/premake-core/premake5
PROJECT_OS: macosx
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-macosx.tar.gz
MACOSX_SDK_URL: https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.7.sdk.tar.xz
MACOSX_SDK_DIRECTORY: $(System.DefaultWorkingDirectory)/dependencies/macosx/MacOSX10.7.sdk
SDKROOT: $(System.DefaultWorkingDirectory)/dependencies/macosx/MacOSX10.7.sdk
steps:
- checkout: self
clean: true
fetchDepth: 1
submodules: recursive
- bash: 'curl -s -L "$BOOTSTRAP_URL" | bash'
displayName: Bootstrap
- bash: |
sudo xcode-select -s "/Applications/Xcode_11.4.1.app/Contents/Developer"
$BUILD_SCRIPT
displayName: Build
- task: CopyFiles@2
displayName: 'Copy files to $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/projects/macosx/gmake'
Contents: '*/Release/*.dll'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
flattenFolders: true
preserveTimestamp: true
- task: PublishBuildArtifacts@1
displayName: 'Publish build artifacts'
inputs:
ArtifactName: macosx
- job: publish
displayName: Publish to GitHub Releases
pool:
name: Azure Pipelines
vmImage: ubuntu-18.04
timeoutInMinutes: 5
dependsOn:
- windows
- linux
- macosx
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
inputs:
downloadType: specific
parallelizationLimit: 12
- task: GitHubRelease@1
displayName: 'Publish GitHub release $(build.sourceBranchName)'
inputs:
gitHubConnection: 'GitHub danielga'
releaseNotesSource: inline
assets: '$(System.ArtifactsDirectory)/**'
addChangeLog: false