This repository has been archived by the owner on May 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.appveyor.yml
124 lines (101 loc) · 4.5 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
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
118
119
120
121
122
123
124
image:
- Ubuntu2004
- Visual Studio 2019
platform: x64
configuration: Release
clone_depth: 1
skip_tags: true
for:
- matrix:
only:
- image: Ubuntu2004
services:
- mssql
- mysql
environment:
DEB_NAME: "nanogis.ubuntu.2004"
install:
- sh: sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
- sh: sudo apt-get update
- sh: sudo apt-get -y install libboost-dev
- sh: sudo apt-get -y install libgdal-dev
- sh: sudo apt-get -y install libgl1-mesa-dev
- sh: PATH=$PATH:$HOME/Qt/5.15.2/gcc_64/bin
- ps: Invoke-WebRequest -Uri https://github.com/catchorg/Catch2/releases/download/v2.13.3/catch.hpp -OutFile $env:APPVEYOR_BUILD_FOLDER\..\catch.hpp
build_script:
- sh: cd $APPVEYOR_BUILD_FOLDER/example/nanogis
- sh: qmake
- sh: make
- sh: cd $APPVEYOR_BUILD_FOLDER
- sh: mkdir $APPVEYOR_BUILD_FOLDER/$DEB_NAME
- sh: mkdir $APPVEYOR_BUILD_FOLDER/$DEB_NAME/usr
- sh: mkdir $APPVEYOR_BUILD_FOLDER/$DEB_NAME/usr/local
- sh: mkdir $APPVEYOR_BUILD_FOLDER/$DEB_NAME/usr/local/bin
- sh: cp $APPVEYOR_BUILD_FOLDER/example/nanogis/nanogis $APPVEYOR_BUILD_FOLDER/$DEB_NAME/usr/local/bin
- sh: mkdir $APPVEYOR_BUILD_FOLDER/$DEB_NAME/DEBIAN
- sh: cp $APPVEYOR_BUILD_FOLDER/example/nanogis/control $APPVEYOR_BUILD_FOLDER/$DEB_NAME/DEBIAN/control
- sh: dpkg-deb --build $APPVEYOR_BUILD_FOLDER/$DEB_NAME
test_script:
- sh: cd $APPVEYOR_BUILD_FOLDER/test
- sh: export CXXFLAGS="-DBARK_TEST_MYSQL_SERVER=localhost -DBARK_TEST_ODBC_MSSQL_SERVER=localhost -DBARK_TEST_DATABASE_PWD=Password12!"
- sh: make -f ./makefile.ubuntu test
artifacts:
- path: $(DEB_NAME).deb
name: $(DEB_NAME).deb
deploy:
provider: GitHub
auth_token:
secure: eK6200vsXUmBfsFy8CVFVCsgBL+WDOP2j2HHHdbcEo5ToHFBljTDUWDNgFq0U5xw
artifact: $(DEB_NAME).deb
- matrix:
only:
- image: Visual Studio 2019
services:
- mssql2019
- mysql
- postgresql12
init:
- net start MSSQL$SQL2019
environment:
NANOGIS_ARCHIVE: nanogis.windows.zip
NANOGIS_ROOT: C:\nanogis
OSGEO4W_ROOT: C:\OSGeo4W64
PGUSER: postgres
PGPASSWORD: Password12!
install:
- mkdir %OSGEO4W_ROOT%
- ps: Invoke-WebRequest -Uri https://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe -OutFile $env:OSGEO4W_ROOT\osgeo4w-setup-x86_64.exe
- call %OSGEO4W_ROOT%\osgeo4w-setup-x86_64.exe -q -k -r -A -s https://download.osgeo.org/osgeo4w/ -a x86_64 -P curl,gdal,libmysql,libmysql-devel,libpq,proj,spatialite,sqlite3 -R %OSGEO4W_ROOT% > NUL
- del /Q /F %OSGEO4W_ROOT%\bin\boost*.dll %OSGEO4W_ROOT%\bin\mod_spatialite.dll
- call %OSGEO4W_ROOT%\bin\o4w_env.bat
- curl -L -O -S -s https://download.osgeo.org/postgis/windows/pg12/postgis-bundle-pg12-3.1.0x64.zip
- call "C:\Program Files\7-Zip\7z.exe" x postgis-bundle-pg12-3.1.0x64.zip > nul
- xcopy /s /y /q postgis-bundle-pg12-3.1.0x64 "C:\Program Files\PostgreSQL\12"
- ps: Invoke-WebRequest -Uri https://github.com/catchorg/Catch2/releases/download/v2.13.3/catch.hpp -OutFile $env:OSGEO4W_ROOT\include\catch.hpp
- 'SET INCLUDE=%INCLUDE%;C:\Libraries\boost_1_73_0;%OSGEO4W_ROOT%\include;%OSGEO4W_ROOT%\include\libpq;%OSGEO4W_ROOT%\include\mysql'
- 'SET LIB=%LIB%;%OSGEO4W_ROOT%\lib'
- call C:\Qt\5.15\msvc2019_64\bin\qtenv2.bat
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
build_script:
- cd %APPVEYOR_BUILD_FOLDER%/example/nanogis
- qmake
- nmake
after_build:
- mkdir %NANOGIS_ROOT%
- copy %APPVEYOR_BUILD_FOLDER%\example\nanogis\release\nanogis.exe %NANOGIS_ROOT%
- windeployqt --no-quick-import --no-translations --no-system-d3d-compiler --no-webkit2 --no-opengl-sw %NANOGIS_ROOT%\nanogis.exe > NUL
- copy %OSGEO4W_ROOT%\bin\*.dll %NANOGIS_ROOT% > NUL
- call "C:\Program Files\7-Zip\7z.exe" a %APPVEYOR_BUILD_FOLDER%\example\%NANOGIS_ARCHIVE% %NANOGIS_ROOT%
before_test:
- call "C:\Program Files\PostgreSQL\12\bin\psql" -d postgres -U postgres -c "CREATE EXTENSION postgis;"
test_script:
- cd %APPVEYOR_BUILD_FOLDER%/test
- SET CXXFLAGS=/DBARK_TEST_MYSQL_SERVER=localhost /DBARK_TEST_ODBC_MSSQL_SERVER=(local)\\SQL2019 /DBARK_TEST_POSTGRES_SERVER=localhost /DBARK_TEST_DATABASE_PWD=Password12!&& nmake -f ./makefile.windows test
artifacts:
- path: example\%NANOGIS_ARCHIVE%
name: $(NANOGIS_ARCHIVE)
deploy:
provider: GitHub
auth_token:
secure: eK6200vsXUmBfsFy8CVFVCsgBL+WDOP2j2HHHdbcEo5ToHFBljTDUWDNgFq0U5xw
artifact: $(NANOGIS_ARCHIVE)