-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
168 lines (149 loc) · 5.58 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
variables:
REPO_NAME: 'rpcpp_samples'
jobs:
- job: Windows
pool:
vmImage: 'VS2017-Win2016'
strategy:
matrix:
vc141-debug:
BUILD_CONFIGURATION: 'debug'
vc141-release:
BUILD_CONFIGURATION: 'release'
variables:
ARCHITECTURE_SUFFIX: '-x64'
BUILD_TOOLSET_VERSION: '141'
CMAKE_GENERATOR: 'Visual Studio 15 2017 Win64'
VCPKG_ROOT: '$(Build.BinariesDirectory)/vcpkg'
steps:
# initialize vcpkg
- script: git clone --depth 1 https://github.com/bluekyu/vcpkg.git
displayName: 'Clone vcpkg'
workingDirectory: '$(Build.BinariesDirectory)'
# download artifacts
- task: DownloadBuildArtifacts@0
displayName: Download vcpkg
inputs:
buildType: 'specific'
project: rpcpp-devops
pipeline: vcpkg
specificBuildWithTriggering: true
buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/rpcpp-devops'
downloadType: 'single'
artifactName: 'vcpkg-vc$(BUILD_TOOLSET_VERSION)'
downloadPath: '$(Build.BinariesDirectory)'
# extract vcpkg cache
- task: ExtractFiles@1
displayName: Restore vcpkg cache
inputs:
archiveFilePatterns: '$(Build.BinariesDirectory)/vcpkg-vc$(BUILD_TOOLSET_VERSION)/vcpkg-installed.7z'
destinationFolder: '$(VCPKG_ROOT)'
cleanDestinationFolder: false
# download artifacts
- task: DownloadBuildArtifacts@0
displayName: Download panda3d
inputs:
buildType: 'specific'
project: rpcpp-devops
pipeline: panda3d
specificBuildWithTriggering: true
buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/master'
downloadType: 'single'
artifactName: 'panda3d-vc$(BUILD_TOOLSET_VERSION)$(ARCHITECTURE_SUFFIX)-$(BUILD_CONFIGURATION)'
downloadPath: '$(Build.BinariesDirectory)'
# download artifacts
- task: DownloadBuildArtifacts@0
displayName: Download render_pipeline_cpp
inputs:
buildType: 'specific'
project: rpcpp-devops
pipeline: render_pipeline_cpp
specificBuildWithTriggering: true
buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/master'
downloadType: 'single'
artifactName: 'render_pipeline_cpp-vc$(BUILD_TOOLSET_VERSION)$(ARCHITECTURE_SUFFIX)-$(BUILD_CONFIGURATION)'
downloadPath: '$(Build.BinariesDirectory)'
# download artifacts
- task: DownloadBuildArtifacts@0
displayName: Download rpcpp_plugins
inputs:
buildType: 'specific'
project: rpcpp-devops
pipeline: rpcpp_plugins
specificBuildWithTriggering: true
buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/master'
downloadType: 'single'
artifactName: 'rpcpp_plugins-vc$(BUILD_TOOLSET_VERSION)$(ARCHITECTURE_SUFFIX)-$(BUILD_CONFIGURATION)'
downloadPath: '$(Build.BinariesDirectory)'
# extract artifacts
- task: ExtractFiles@1
displayName: Extract panda3d
inputs:
archiveFilePatterns: '$(Build.BinariesDirectory)/panda3d-vc$(BUILD_TOOLSET_VERSION)$(ARCHITECTURE_SUFFIX)-$(BUILD_CONFIGURATION)/panda3d.7z'
destinationFolder: '$(Build.BinariesDirectory)'
cleanDestinationFolder: false
# extract artifacts
- task: ExtractFiles@1
displayName: Extract render_pipeline_cpp
inputs:
archiveFilePatterns: '$(Build.BinariesDirectory)/render_pipeline_cpp-vc$(BUILD_TOOLSET_VERSION)$(ARCHITECTURE_SUFFIX)-$(BUILD_CONFIGURATION)/render_pipeline_cpp.7z'
destinationFolder: '$(Build.BinariesDirectory)'
cleanDestinationFolder: false
# extract artifacts
- task: ExtractFiles@1
displayName: Extract rpcpp_plugins
inputs:
archiveFilePatterns: '$(Build.BinariesDirectory)/rpcpp_plugins-vc$(BUILD_TOOLSET_VERSION)$(ARCHITECTURE_SUFFIX)-$(BUILD_CONFIGURATION)/rpcpp_plugins.7z'
destinationFolder: '$(Build.BinariesDirectory)'
cleanDestinationFolder: false
# copy artifacts
- task: CopyFiles@2
displayName: Copy rpcpp_plugins
inputs:
sourceFolder: $(Build.BinariesDirectory)/rpcpp_plugins
contents: '**'
targetFolder: $(Build.BinariesDirectory)/render_pipeline_cpp
cleanTargetFolder: false
# configure & generate
- task: CMake@1
displayName: CMake Generate
env:
CMAKE_PREFIX_PATH: $(Build.BinariesDirectory);
inputs:
cmakeArgs: >-
.. -G "$(CMAKE_GENERATOR)" -Wno-dev -T "v$(BUILD_TOOLSET_VERSION),host=x64"
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_APPLOCAL_DEPS:BOOL=OFF
-DVCPKG_TARGET_TRIPLET=x64-windows-vc$(BUILD_TOOLSET_VERSION)
-DCMAKE_INSTALL_PREFIX="$(Build.BinariesDirectory)/$(REPO_NAME)"
-Dpanda3d_ROOT:PATH="$(Build.BinariesDirectory)/panda3d"
-Drpcpp_samples_BUILD_panda3d_samples:BOOL=ON
-Drpcpp_samples_BUILD_render_pipeline_samples:BOOL=ON
-Drpcpp_samples_BUILD_rpcpp_samples:BOOL=ON
-Drpcpp_samples_BUILD_snippets:BOOL=ON
# build
- task: CMake@1
displayName: CMake Build
inputs:
cmakeArgs: --build . --config $(BUILD_CONFIGURATION)
# tests
#- script: ctest -C $(BUILD_CONFIGURATION) --output-on-failure
# install
- task: CMake@1
displayName: CMake Install
inputs:
cmakeArgs: --build . --config $(BUILD_CONFIGURATION) --target install
# packaging
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)/$(REPO_NAME)'
archiveType: '7z'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(REPO_NAME).7z'
# publish
- task: PublishBuildArtifacts@1
inputs:
artifactName: '$(REPO_NAME)-vc$(BUILD_TOOLSET_VERSION)$(ARCHITECTURE_SUFFIX)-$(BUILD_CONFIGURATION)'