/
azure-pipelines.yml
230 lines (196 loc) · 11.1 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
221
222
223
224
225
226
227
228
229
230
variables:
LR: release-3_10
LTR: release-3_4
CTEST_CUSTOM_TESTS_IGNORE: "ProcessingGdalAlgorithmsRasterTest;ProcessingGdalAlgorithmsVectorTest;ProcessingGrass7AlgorithmsImageryTest;ProcessingGrass7AlgorithmsRasterTest;ProcessingGrass7AlgorithmsVectorTest;ProcessingGuiTest;ProcessingOtbAlgorithmsTest;ProcessingQgisAlgorithmsTestPt1;ProcessingQgisAlgorithmsTestPt2;ProcessingQgisAlgorithmsTestPt3;ProcessingQgisAlgorithmsTestPt4;ProcessingScriptUtilsTest;PyQgsAnnotation;PyQgsAppStartup;PyQgsAuthManagerOAuth2OWSTest;PyQgsAuthManagerPasswordOWSTest;PyQgsAuthManagerPKIOWSTest;PyQgsAuthManagerProxy;PyQgsAuthSettingsWidget;PyQgsAuxiliaryStorage;PyQgsBlockingNetworkRequest;PyQgsExifTools;PyQgsFileDownloader;PyQgsFileUtils;PyQgsGeometryTest;PyQgsImageCache;PyQgsImportIntoPostGIS;PyQgsLayoutAtlas;PyQgsLayoutLegend;PyQgsLayoutMap;PyQgsLayoutMapGrid;PyQgsMapLayer;PyQgsOfflineEditingWFS;PyQgsOGRProvider;PyQgsOGRProviderGpkg;PyQgsOGRProviderSqlite;PyQgsPalLabelingCanvas;PyQgsPalLabelingLayout;PyQgsPalLabelingPlacement;PyQgsPointDisplacementRenderer;PyQgsProject;PyQgsProviderConnectionGpkg;PyQgsProviderConnectionPostgres;PyQgsPythonProvider;PyQgsRasterFileWriter;PyQgsRasterLayer;PyQgsSelectiveMasking;PyQgsServerAccessControlWMSGetlegendgraphic;PyQgsServerApi;PyQgsServerCacheManager;PyQgsServerLocaleOverride;PyQgsServerSecurity;PyQgsServerSettings;PyQgsServerWMS;PyQgsServerWMSDimension;PyQgsServerWMSGetFeatureInfo;PyQgsServerWMSGetLegendGraphic;PyQgsServerWMSGetMap;PyQgsServerWMSGetPrint;PyQgsServerWMTS;PyQgsSettings;PyQgsShapefileProvider;PyQgsSpatialiteProvider;PyQgsSvgCache;PyQgsSymbolLayer;PyQgsTaskManager;PyQgsTextRenderer;PyQgsVectorFileWriter;PyQgsVectorLayer;PyQgsVectorLayerUtils;PyQgsVirtualLayerProvider;PyQgsWFSProviderGUI;PyQgsZipUtils;qgis_3drenderingtest;qgis_alignrastertest;qgis_arcgisrestutilstest;qgis_banned_keywords;qgis_browsermodeltest;qgis_callouttest;qgis_compositionconvertertest;qgis_coordinatereferencesystemtest;qgis_datadefinedsizelegendtest;qgis_datumtransformdialog;qgis_diagramtest;qgis_doxygen_order;qgis_dxfexporttest;qgis_expressiontest;qgis_filedownloader;qgis_geometrycheckstest;qgis_geometrytest;qgis_geonodeconnectiontest;qgis_grassprovidertest7;qgis_imagecachetest;qgis_invertedpolygonrenderertest;qgis_labelingenginetest;qgis_layerdefinitiontest;qgis_layout3dmaptest;qgis_layouthtmltest;qgis_layoutlabeltest;qgis_layoutmapgridtest;qgis_layoutmaptest;qgis_layoutpicturetest;qgis_layoutscalebartest;qgis_layouttabletest;qgis_legendrenderertest;qgis_licenses;qgis_maprendererjobtest;qgis_maprotationtest;qgis_mapsettingsutilstest;qgis_maptooladdfeatureline;qgis_mimedatautilstest;qgis_networkaccessmanagertest;qgis_openclutilstest;qgis_painteffecttest;qgis_pallabelingtest;qgis_processingtest;qgis_projecttest;qgis_qgisappclipboard;qgis_rasterlayersaveasdialog;qgis_shellcheck;qgis_sipify;qgis_sip_include;qgis_sip_uptodate;qgis_spelling;qgis_styletest;qgis_svgcachetest;qgis_taskmanagertest;qgis_transformdialog;qgis_vectorfilewritertest;qgis_wcsprovidertest;qgis_ziplayertest;qgis_meshcalculator;qgis_pointlocatortest;PyQgsDatumTransform"
Agent.Source.Git.ShallowFetchDepth: 120
trigger:
branches:
include:
- master
- $(LR)
- $(LTR)
- azure-pipelines
pr:
- master
- $(LR)
- $(LTR)
jobs:
- job: OSGeo4W
pool:
vmImage: vs2015-win2012r2
timeoutInMinutes: 360
strategy:
maxParallel: 4
matrix:
x86:
OSGEO4W_ROOT: C:\OSGeo4W
OSGEO4W_ARCH: x86
CLCACHE_DIR: c:\clcache-x86
PLATFORM: x86
CC: C:\OSGeo4W\bin\clcache.bat
CXX: C:\OSGeo4W\bin\clcache.bat
x86_64:
OSGEO4W_ROOT: C:\OSGeo4W64
OSGEO4W_ARCH: x86_64
CLCACHE_DIR: c:\clcache-x86_64
PLATFORM: x64
CC: C:\OSGeo4W64\bin\clcache.bat
CXX: C:\OSGeo4W64\bin\clcache.bat
steps:
- bash: |
if [ "$BUILD_REASON" = "PullRequest" ]; then
branch=$SYSTEM_PULLREQUEST_TARGETBRANCH
pr=$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
else
branch=$BUILD_SOURCEBRANCHNAME
fi
echo "BRANCH: ${branch}"
echo "PR: ${pr}"
echo "LR: ${LR}"
echo "LTR: ${LTR}"
case "${branch}" in
"${LTR}")
OSGEO4W_PKG=qgis-ltr-dev
OSGEO4W_DEPS=qgis-ltr-dev-deps
;;
"${LR}")
OSGEO4W_PKG=qgis-rel-dev
OSGEO4W_DEPS=qgis-rel-dev-deps
;;
*)
OSGEO4W_PKG=qgis-dev
OSGEO4W_DEPS=qgis-dev-deps
;;
esac
target=Experimental
major=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt)
minor=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt)
patch=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt)
binary=$(curl --location-trusted https://download.osgeo.org/osgeo4w/$OSGEO4W_ARCH/release/qgis/$OSGEO4W_PKG/LATEST.sha | sed -e "s/:.*$//")
(( binary++ )) || true
version=$major.$minor.$patch
sha="${BUILD_SOURCEVERSION:0:10}"
if [ "$BUILD_REASON" = "PullRequest" ]; then
buildname="PR $pr / $branch ($BUILD_BUILDID) ($sha) ($OSGEO4W_PKG $target $OSGEO4W_ARCH)" # no colons allowed here
else
buildname="$OSGEO4W_PKG-$version-$sha-$target-VC14-$OSGEO4W_ARCH"
fi
url=$buildname
url=${url//(/%28}
url=${url//)/%29}
url=${url// /+}
url="https://cdash.orfeo-toolbox.org/index.php?project=QGIS&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercount=2&showfilters=1&filtercombine=and&field1=buildname&compare1=61&value1=$url&field2=site&compare2=61&value2=azure-pipelines"
echo "##vso[task.setvariable variable=TARGET]$target"
echo "##vso[task.setvariable variable=OSGEO4W_PKG]$OSGEO4W_PKG"
echo "##vso[task.setvariable variable=OSGEO4W_DEPS]$OSGEO4W_DEPS"
echo "##vso[task.setvariable variable=MAJOR]$major"
echo "##vso[task.setvariable variable=MINOR]$minor"
echo "##vso[task.setvariable variable=PATCH]$patch"
echo "##vso[task.setvariable variable=BINARY]$binary"
echo "##vso[task.setvariable variable=VERSION]$version"
echo "##vso[task.setvariable variable=BUILDNAME]$buildname"
echo "##vso[task.setvariable variable=DASHURL]$url"
displayName: 'Setup build variables'
- script: curl --output c:\setup-x86.exe https://cygwin.com/setup-x86.exe
displayName: 'Download cygwin Installer'
- script: curl --output c:\osgeo4w-setup.exe https://download.osgeo.org/osgeo4w/osgeo4w-setup-%OSGEO4W_ARCH%.exe
displayName: 'Download OSGeo4W Installer'
- script: curl --location-trusted --output c:\cmake.msi https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5-win64-x64.msi
displayName: 'Download CMake Installer'
- script: curl --location-trusted --output c:\ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip
displayName: 'Download Ninja'
# - script: curl --location-trusted --output c:\depends.zip http://www.dependencywalker.com/depends22_%PLATFORM%.zip
# displayName: 'Download Dependency walker'
# Too large…
# - task: Cache@2
# inputs:
# key: 'cygwin | $(Date:yyyyMMdd)'
# path: 'c:\cygwin'
# restoreKeys: |
# cygwin | $(Date:yyyyMM)
# cygwin | $(Date:yyyy)
# cygwin
# displayName: Cache cygwin
- powershell: ms-windows/osgeo4w/runasadmin.ps1 c:\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/temp/cygwin -P "bison,flex,git,poppler,doxygen,unzip"
displayName: 'Installing cygwin'
# Too large…
# - task: Cache@2
# inputs:
# key: 'osgeo4w | $(OSGEO4W_ARCH) | $(Date:yyyyMMdd)'
# path: '$(OSGEO4W_ROOT)'
# restoreKeys: |
# osgeo4w | $(OSGEO4W_ARCH) | $(Date:yyyyMMdd)
# osgeo4w | $(OSGEO4W_ARCH) | $(Date:yyyyMM)
# osgeo4w | $(OSGEO4W_ARCH) | $(Date:yyyy)
# osgeo4w | $(OSGEO4W_ARCH)
# displayName: Cache OSGeo4W
- powershell: ms-windows/osgeo4w/runasadmin.ps1 c:\osgeo4w-setup.exe --autoaccept --advanced --arch $env:OSGEO4W_ARCH --quiet-mode --upgrade-also --root $env:OSGEO4W_ROOT --only-site -s http://download.osgeo.org/osgeo4w -l c:\temp\osgeo4w -P $env:OSGEO4W_DEPS -P python3-clcache
displayName: 'Installing OSGeo4W'
- script: |
rmdir /s /q c:\temp\cygwin
rmdir /s /q c:\temp\osgeo4w
displayName: 'Clear package caches'
- powershell: ms-windows/osgeo4w/runasadmin.ps1 msiexec.exe /X C:\Windows\Installer\146218.msi /qn /norestart /l*v c:\cmake-uninstall.log
displayName: 'Uninstalling old CMake'
- powershell: ms-windows/osgeo4w/runasadmin.ps1 msiexec.exe /I c:\cmake.msi /qn /norestart /l*v c:\cmake-install.log
displayName: 'Installing CMake'
- script: c:\cygwin\bin\unzip -o c:\ninja.zip -d %OSGEO4W_ROOT%\bin
displayName: 'Extracting Ninja'
# - script: c:\cygwin\bin\unzip -o c:\depends.zip -d %OSGEO4W_ROOT%\bin
# displayName: 'Extracting Dependency Walker'
- script: |
PATH %OSGEO4W_ROOT%\bin;%ProgramFiles%\CMake\bin;%PATH%
cmake --version
ctest --version
ninja --version
displayName: 'Display tool versions'
# Too large…
# - task: Cache@2
# inputs:
# key: 'clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyyMMdd) | $(Hours)'
# path: '$(CLCACHE_DIR)'
# restoreKeys: |
# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyyMMdd) | $(Hours)
# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyyMMdd)
# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyyMM)
# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyy)
# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG)
# displayName: Cache clcache
- script: |
echo on
PATH c:\cygwin\bin;%OSGEO4W_ROOT%\bin;%PATH%
cd ms-windows\osgeo4w
touch skippackage
set OSGEO4W_CXXFLAGS=/MD /MP /Od /D NDEBUG
@echo "##[section] %OSGEO4W_ARCH% results available at %DASHURL%"
package-nightly.cmd %VERSION% %BINARY% %OSGEO4W_PKG% %OSGEO4W_ARCH% %BUILD_SOURCEVERSION:~0,10% azure-pipelines
displayName: 'Building QGIS'
# - script: |
# echo on
# PATH %OSGEO4W_ROOT%\bin;%PATH%
# cd ms-windows\osgeo4w\build-%OSGEO4W_PKG%-%OSGEO4W_ARCH%
# set /P tag=<Testing\TAG
# dir /s /b Testing\*.log
# echo ##vso[task.uploadfile]%CD%\Testing\Temporary\LastBuild_%tag%.log
# call %OSGEO4W_ROOT%\bin\o4w_env.bat
# call %OSGEO4W_ROOT%\bin\qt5_env.bat
# call %OSGEO4W_ROOT%\bin\py3_env.bat
# depends /c /f:1 /ot:c:\crssync.log output\bin\crssync.exe
# echo ##vso[task.uploadfile]c:\crssync.log
# displayName: 'Upload build log'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: 'ms-windows/osgeo4w/build-$(OSGEO4W_PKG)-$(OSGEO4W_ARCH)/Testing/*/Test.xml'
failTaskOnFailedTests: true
displayName: 'Publishing tests'
# - script: |
# PATH c:\cygwin\bin;%PATH%
# pwd
# du -sc c:\cygwin
# du -sc %OSGEO4W_ROOT%
# du -sc %CLCACHE_DIR%
# du -sc .
# rmdir /s /q ms-windows\osgeo4w\build-$(OSGEO4W_PKG)-$(OSGEO4W_ARCH)
# displayName: Clean before creating the caches
# vim: set nowrap :