File: appveyor.yml

package info (click to toggle)
osm2pgsql 0.96.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,304 kB
  • sloc: cpp: 11,462; python: 543; sh: 98; makefile: 17
file content (117 lines) | stat: -rw-r--r-- 4,037 bytes parent folder | download
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
environment:
  global:
    BZIP2_VER: 1.0.6
    EXPAT_VER: 2.2.5
    PROJ4_VER: 4.9.3
    ZLIB_VER: 1.2.11
    LUA_VER: 5.3.4
    LUA_INCLUDE_DIR: C:\lua\include
    LUA_LIBRARIES: C:\lua\lua53.lib
    LUA_DLL: C:\lua\lua53.dll
    WINGETOPT_VER: v0.95
    GETOPT_INCLUDE_DIR: C:\wingetopt\src
    GETOPT_LIBRARY: C:\wingetopt\build\wingetopt.lib
    BOOST_PATH: C:\Libraries\boost_1_63_0
    POSTGRESQL_VER: 9.6.6
    TESTS_POSTGRESQL_ROOT: C:\Progra~1\PostgreSQL\9.6
    POSTGIS_VER: 2.4.3
    POSTGIS_URL: "https://lonvia.dev.openstreetmap.org/osm2pgsql-winbuild/postgis-bundle-pg96-2.4.3x64.zip"
    PGUSER: postgres
    PGPASSWORD: Password12!
  matrix:
    - arch: x86
    - arch: x64

os: Visual Studio 2015

services:
  - postgresql96

clone_folder: c:\osm2pgsql

clone_depth: 1

init:
  - git config --global core.autocrlf input
  - if "%arch%"=="x86" (
      set vcvarsall_arg=x86&&
      set conda_path=C:\Miniconda36\Scripts&&
      set conda_library_path=C:\Miniconda36\envs\osm2pgsql\Library&&
      set lua_url=https://lonvia.dev.openstreetmap.org/osm2pgsql-winbuild/lua_x86.zip&&
      set build_type=Release)
  - if "%arch%"=="x64" (
      set vcvarsall_arg=amd64&&
      set conda_path=C:\Miniconda36-x64\Scripts&&
      set conda_library_path=C:\Miniconda36-x64\envs\osm2pgsql\Library&&
      set lua_url=https://lonvia.dev.openstreetmap.org/osm2pgsql-winbuild/lua_x64.zip&&
      set build_type=Release)
  - '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall" %vcvarsall_arg%'

install:
  - set PATH=%TESTS_POSTGRESQL_ROOt%\bin;%PATH%;%conda_path%
  - cd c:\
  - conda config --set always_yes yes
  - conda create --name osm2pgsql
  - activate osm2pgsql
  - conda install bzip2=%BZIP2_VER% expat=%EXPAT_VER% proj4=%PROJ4_VER% zlib=%ZLIB_VER% postgresql=%POSTGRESQL_VER%
  - ps: if (!(Test-Path "C:\lua_$env:arch.zip")){(new-object net.webclient).DownloadFile($env:lua_url, "C:\lua_$env:arch.zip")}
  - 7z x -y C:\lua_%arch%.zip -oC:\lua
  - ps: if (!(Test-Path "C:\postgis.zip")){(new-object net.webclient).DownloadFile($env:POSTGIS_URL, "C:\postgis.zip")}
  - 7z x C:\postgis.zip -oC:\postgis
  - xcopy /e /y /q C:\postgis\postgis-bundle-pg96-2.4.3x64 %TESTS_POSTGRESQL_ROOT%
  - git clone https://github.com/alex85k/wingetopt -b %WINGETOPT_VER% C:\wingetopt
  - python -V
  - pip install psycopg2

before_build:
  - cd C:\wingetopt
  - mkdir build
  - cd build
  - cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%build_type%
  - nmake

build_script:
  - mkdir c:\osm2pgsql\build
  - cd c:\osm2pgsql\build
  - >
    cmake .. -LA -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%build_type% -DBUILD_TESTS=ON
    -DLUA_INCLUDE_DIR=%LUA_INCLUDE_DIR% -DLUA_LIBRARIES=%LUA_LIBRARIES% 
    -DGETOPT_INCLUDE_DIR=%GETOPT_INCLUDE_DIR% -DGETOPT_LIBRARY=%GETOPT_LIBRARY%
    -DBOOST_ROOT=%BOOST_PATH% -DBoost_USE_STATIC_LIBS=ON
  - nmake

after_build:
  - mkdir osm2pgsql-bin
  - copy /y *.exe osm2pgsql-bin
  - copy /y ..\*.style osm2pgsql-bin
  - copy /y ..\*.lua osm2pgsql-bin
  - copy /y %conda_library_path%\bin\libpq.dll osm2pgsql-bin
  - copy /y %conda_library_path%\bin\libeay32.dll osm2pgsql-bin
  - copy /y %conda_library_path%\bin\ssleay32.dll osm2pgsql-bin
  - copy /y %conda_library_path%\bin\zlib.dll osm2pgsql-bin
  - copy /y %conda_library_path%\bin\expat.dll osm2pgsql-bin
  - copy /y %conda_library_path%\bin\libbz2.dll osm2pgsql-bin
  - copy /y %LUA_DLL% osm2pgsql-bin
  - 7z a c:\osm2pgsql\osm2pgsql_%build_type%_%arch%.zip osm2pgsql-bin -tzip

before_test:
  - cd c:\
  - mkdir temp
  - cacls temp /T /E /G Users:F
  - cacls temp /T /E /G "Network Service":F
  - |
    psql -c "CREATE TABLESPACE tablespacetest LOCATION 'c:/temp'"
  - set PATH=c:\osm2pgsql\build\osm2pgsql-bin;%PATH%
  - set PROJ_LIB=%conda_library_path%\share

test_script:
  - cd c:\osm2pgsql\build
  #- ctest -VV -L NoDB
  - ctest -VV -LE FlatNodes # enable when Postgis will be available

artifacts:
  - path: osm2pgsql_%build_type%_%arch%.zip

cache:
  - C:\lua_%arch%.zip -> appveyor.yml
  - C:\postgis.zip -> appveyor.yml