forked from osm2pgsql-dev/osm2pgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
86 lines (73 loc) · 2.79 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
77
78
79
80
81
82
83
84
85
86
environment:
global:
PGUSER: postgres
PGPASSWORD: Password12!
BOOST_ROOT: c:/libs/boost
PREFIX: c:\libs
PSQL_ROOT: C:/Program Files/PostgreSQL/9.4
CMAKE_PREFIX_PATH: c:\libs;C:\Program Files\PostgreSQL\9.4
POSTGIS_FILE: postgis-pg94-binaries-2.3.2w64gcc48
matrix:
- configuration: Release
# Operating system (build VM template)
os: Visual Studio 2015
cache:
- C:\libs\%POSTGIS_FILE%.zip -> appveyor.yml
- C:\osm2pgsql_win_deps_release.7z -> appveyor.yml
services:
- postgresql94 # enable when Postgis will be available
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# clone directory
clone_folder: c:\osm2pgsql
clone_depth: 1
platform: x64
install:
# by default, all script lines are interpreted as batch
- cd c:\
- if exist libs ( rmdir c:\libs /s /q )
- mkdir libs
- if not exist osm2pgsql_win_deps_release.7z ( curl -O https://lonvia.dev.openstreetmap.org/osm2pgsql-winbuild/osm2pgsql_win_deps_release.7z )
- 7z x osm2pgsql_win_deps_release.7z | find ":"
- cd c:\libs
- echo Downloading and installing PostGIS:
- if not exist %POSTGIS_FILE%.zip ( curl -L -O -S -s https://lonvia.dev.openstreetmap.org/osm2pgsql-winbuild/%POSTGIS_FILE%.zip )
- 7z x %POSTGIS_FILE%.zip
- echo xcopy /e /y /q %POSTGIS_FILE% %PSQL_ROOT%
- xcopy /e /y /q %POSTGIS_FILE% "%PSQL_ROOT%"
- echo Creating tablespace for tablespace test...
- mkdir temp
- cacls temp /T /E /G Users:F
- cacls temp /T /E /G "Network Service":F
- echo Installing psycopg2 Python module...
- python -V
- pip install psycopg2
build_script:
- mkdir c:\osm2pgsql\build
- cd c:\osm2pgsql\build
- echo Running cmake...
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
- cmake .. -LA -G "NMake Makefiles" -DBOOST_ROOT=%BOOST_ROOT% -DCMAKE_BUILD_TYPE=%Configuration% -DCMAKE_INSTALL_PREFIX=%PREFIX% -DBoost_USE_STATIC_LIBS=ON -DBUILD_TESTS=ON
- nmake
- mkdir osm2pgsql-bin
- copy /y *.exe osm2pgsql-bin
- copy /y ..\*.style osm2pgsql-bin
- copy /y ..\*.lua osm2pgsql-bin
- copy /y %PREFIX%\bin\*.dll osm2pgsql-bin
- copy /y "%PSQL_ROOT%\bin\libpq.dll" osm2pgsql-bin
- copy /y "%PSQL_ROOT%\bin\libintl-8.dll" osm2pgsql-bin
- copy /y "%PSQL_ROOT%\bin\libeay32.dll" osm2pgsql-bin
- copy /y "%PSQL_ROOT%\bin\ssleay32.dll" osm2pgsql-bin
- 7z a c:\osm2pgsql\osm2pgsql_%Configuration%.zip osm2pgsql-bin -tzip
test_script:
- |
"%PSQL_ROOT%/bin/psql" -c "CREATE TABLESPACE tablespacetest LOCATION 'c:/libs/temp'"
- set PATH=c:\osm2pgsql\build\osm2pgsql-bin;%PATH%
- set PROJ_LIB=c:\libs\share
- cd c:\osm2pgsql\build
# - ctest -VV -L NoDB
- ctest -VV -LE FlatNodes # enable when Postgis will be available
artifacts:
- path: osm2pgsql_Release.zip
name: osm2pgsql_Release.zip