forked from OSGeo/PROJ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
75 lines (67 loc) · 2.42 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
branches:
except:
- /(cherry-pick-)?backport-\d+-to-/
environment:
matrix:
# VS 2015
- platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
BUILD_SHARED_LIBS: OFF
CMAKE_GENERATOR: Ninja
# VS 2017
# - platform: x64
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# BUILD_SHARED_LIBS: ON
# CMAKE_GENERATOR: Ninja
shallow_clone: true
cache:
- C:\Tools\vcpkg\installed\ -> appveyor.yml
build_script:
- set VCPKG_ROOT=C:\Tools\vcpkg
- set VCPKG_INSTALLED=%VCPKG_ROOT%\installed\%platform%-windows
# If cached directory does not exist, update vcpkg and install dependencies
# The checkout of a precise sha1 for VS2015 is a workaround for https://github.com/microsoft/vcpkg/issues/11666
- if not exist %VCPKG_INSTALLED%\bin (
cd "%VCPKG_ROOT%" &
git pull > nul &
(if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (git checkout a64dc07690bc8806e717e190f62eb58e198b599c)) &
.\bootstrap-vcpkg.bat -disableMetrics &
vcpkg install sqlite3[core,tool]:"%platform%"-windows &
vcpkg install tiff:"%platform%"-windows &
vcpkg install curl:"%platform%"-windows &
cd %APPVEYOR_BUILD_FOLDER%
)
- dir %VCPKG_INSTALLED%\bin
- set PATH=%VCPKG_INSTALLED%\bin;%PATH%
# See https://www.appveyor.com/docs/lang/cpp/
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" if %platform%==x86
(call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86)
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017"
(call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %platform% )
#
- set PROJ_BUILD=%APPVEYOR_BUILD_FOLDER%\build
- mkdir %PROJ_BUILD%
- cd %PROJ_BUILD%
- set PROJ_DIR=%APPVEYOR_BUILD_FOLDER%\proj_dir
- >-
cmake ..
-D CMAKE_BUILD_TYPE=Release
-D BUILD_SHARED_LIBS="%BUILD_SHARED_LIBS%"
-D CMAKE_C_FLAGS="/WX"
-D CMAKE_CXX_FLAGS="/WX"
-D CMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake
-D CMAKE_INSTALL_PREFIX="%PROJ_DIR%"
- ninja -v
- ninja install
- dir %PROJ_DIR%\bin
test_script:
- echo test_script
- set PROJ_LIB=%PROJ_DIR%\share\proj
- cd %PROJ_BUILD%
- ctest -V -C Release
- set PATH=%PROJ_DIR%\bin;%PATH%
- set BUILD_MODE=shared
- if BUILD_SHARED_LIBS==OFF (set BUILD_MODE=static)
- call %APPVEYOR_BUILD_FOLDER%\test\postinstall\test_cmake.bat %PROJ_DIR% %BUILD_MODE%
- proj
deploy: off