forked from valhalla/valhalla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.azure-pipelines.yml
74 lines (63 loc) · 3.2 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
# Azure Pipelines for Valhalla
#
# TODO: Shallow clone blocked by
# https://developercommunity.visualstudio.com/content/problem/294872/yaml-build-ignores-fetchdepth.html
# TODO: Once CMake 3.13 is available replace -H with -S option
#
jobs:
- job: VS2017
displayName: 'Windows 2016 | VS2017'
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
x86:
PLATFORM: 'x86'
GENERATOR: 'Visual Studio 15 2017'
x64:
PLATFORM: 'x64'
GENERATOR: 'Visual Studio 15 2017 Win64'
variables:
BUILD_CFG: 'Release'
BUILD_DIR: '$(Agent.WorkFolder)\build'
VCPKG_DIR: '$(Agent.WorkFolder)\vcpkg'
steps:
- script: |
git config core.symlinks true
git reset --hard
displayName: 'Fix symlinks to third-party .proto files'
- script: git submodule update --init --recursive
displayName: 'Pull submodules'
- powershell: |
Get-Content -TotalCount 1 -Path .\proto\fileformat.proto
Get-Content -TotalCount 1 -Path .\proto\osmformat.proto
displayName: 'Check symlinks to third-party .proto files'
- script: |
git clone --depth 1 https://github.com/microsoft/vcpkg %VCPKG_DIR%
echo.set(VCPKG_BUILD_TYPE release)>> %VCPKG_DIR%\triplets\%PLATFORM%-windows.cmake
call %VCPKG_DIR%\bootstrap-vcpkg.bat
%VCPKG_DIR%\vcpkg.exe version
displayName: 'Install vcpkg'
- script: |
%VCPKG_DIR%\vcpkg.exe install boost-algorithm boost-config boost-core boost-heap boost-lexical-cast boost-property-tree boost-variant protobuf zlib --triplet %PLATFORM%-windows
%VCPKG_DIR%\vcpkg.exe list
if exist %VCPKG_DIR%\downloads rmdir /S /Q %VCPKG_DIR%\downloads
if exist %VCPKG_DIR%\packages rmdir /S /Q %VCPKG_DIR%\packages
displayName: 'Install vcpkg packages'
- script: |
move /Y third_party\OSM-binary\src\fileformat.proto third_party\OSM-binary\src\fileformat.proto.orig
move /Y third_party\OSM-binary\src\osmformat.proto third_party\OSM-binary\src\osmformat.proto.orig
echo syntax = "proto2"; > third_party\OSM-binary\src\fileformat.proto
type third_party\OSM-binary\src\fileformat.proto.orig >> third_party\OSM-binary\src\fileformat.proto
echo syntax = "proto2"; > third_party\OSM-binary\src\osmformat.proto
type third_party\OSM-binary\src\osmformat.proto.orig >> third_party\OSM-binary\src\osmformat.proto
del /Q third_party\OSM-binary\src\fileformat.proto.orig
del /Q third_party\OSM-binary\src\osmformat.proto.orig
displayName: 'Patch .proto files of OSMPBF with syntax=proto2'
- script: |
cmake --version
cmake -H$(Build.SourcesDirectory) -B%BUILD_DIR% -G "%GENERATOR%" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_DIR%\scripts\buildsystems\vcpkg.cmake -DVCPKG_APPLOCAL_DEPS=ON -DENABLE_CCACHE=OFF -DENABLE_DATA_TOOLS=OFF -DENABLE_HTTP=OFF -DENABLE_NODE_BINDINGS=OFF -DENABLE_PYTHON_BINDINGS=OFF -DENABLE_SERVICES=OFF -DENABLE_TOOLS=OFF
displayName: 'Run CMake to configure build'
- script: |
cmake --build %BUILD_DIR% --config %BUILD_CFG%
displayName: 'Run CMake to build'