This repository has been archived by the owner on Aug 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
76 lines (64 loc) · 3.11 KB
/
.appveyor.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
# AppVeyor for Valhalla
#
# TODO: Build and run tests and/or tools
#
version: 1.0.{build}
image:
- Visual Studio 2017
environment:
BUILD_CFG: Release
BUILD_DIR: '%APPVEYOR_BUILD_FOLDER%\build'
VCPKG_DIR: 'C:\Tools\vcpkg'
matrix:
- PLATFORM: x64
GENERATOR: 'Visual Studio 15 2017 Win64'
TOOLSET: 'v141,host=x64'
- PLATFORM: x86
GENERATOR: 'Visual Studio 15 2017'
TOOLSET: v141
cache:
# Invalidate vcpkg cache whenever top-level build configuration is changed
- C:\Tools\vcpkg -> CMakeLists.txt, .appveyor.yml
clone_depth: 1
install:
- ps: 'Write-Host "Fix symlinks to third-party .proto files" -ForegroundColor Magenta'
- cmd: |
git config core.symlinks true
git reset --hard
- ps: 'Write-Host "Pull submodules" -ForegroundColor Magenta'
- cmd: git submodule update --init --recursive
- ps: 'Write-Host "Check symlinks to third-party .proto files" -ForegroundColor Magenta'
- ps: |
Get-Content -TotalCount 1 -Path .\proto\fileformat.proto
Get-Content -TotalCount 1 -Path .\proto\osmformat.proto
- ps: 'Write-Host "Install vcpkg" -ForegroundColor Magenta'
- cmd: |
%VCPKG_DIR%\vcpkg.exe version
%VCPKG_DIR%\vcpkg.exe remove --outdated --recurse
cd %VCPKG_DIR% & git pull > NUL & cd ..
echo set(VCPKG_BUILD_TYPE release) >> %VCPKG_DIR%\triplets\x64-windows.cmake
call %VCPKG_DIR%\bootstrap-vcpkg.bat
%VCPKG_DIR%\vcpkg.exe version
- ps: 'Write-Host "Install vcpkg packages" -ForegroundColor Magenta'
- cmd: |
%VCPKG_DIR%\vcpkg.exe install 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
before_build:
- ps: 'Write-Host "Patch .proto files of OSMPBF with syntax=proto2" -ForegroundColor Magenta'
- cmd: |
cd %APPVEYOR_BUILD_FOLDER%
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\*.orig
build_script:
- cmd: cmake --version
- ps: 'Write-Host "Run CMake to configure build" -ForegroundColor Magenta'
- cmd: cmake -H%APPVEYOR_BUILD_FOLDER% -B%BUILD_DIR% -G "%GENERATOR%" -T "%TOOLSET%" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_DIR%\scripts\buildsystems\vcpkg.cmake -DVCPKG_APPLOCAL_DEPS=ON -DBOOST_ROOT=C:\Libraries\boost_1_67_0 -DENABLE_CCACHE=OFF -DENABLE_DATA_TOOLS=OFF -DENABLE_HTTP=OFF -DENABLE_NODE_BINDINGS=OFF -DENABLE_PYTHON_BINDINGS=OFF -DENABLE_SERVICES=OFF -DENABLE_TOOLS=OFF
- ps: 'Write-Host "Run CMake to build" -ForegroundColor Magenta'
- cmd: cmake --build %BUILD_DIR% --config %BUILD_CFG%