Skip to content

Commit 0a281c0

Browse files
author
alex85k
committed
Add MSYS2 building to Appveyor
1 parent c93f731 commit 0a281c0

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

appveyor.yml

+18-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
environment:
88
matrix:
9-
- config: Dev
9+
- config: MSYS2
1010
autocrlf: true
1111
- config: Dev
12-
autocrlf: false
12+
autocrlf: true
1313
- config: RelWithDebInfo
1414
autocrlf: true
15+
- config: Dev
16+
autocrlf: false
1517
- config: RelWithDebInfo
1618
autocrlf: false
1719

@@ -25,13 +27,26 @@ init:
2527
- git config --global core.autocrlf %autocrlf%
2628
- git config --get core.autocrlf
2729

30+
install:
31+
- cd c:\projects
32+
- git clone https://github.com/osmcode/osm-testdata
33+
- if [%config%]==[MSYS2] (
34+
C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade
35+
&& C:\msys64\usr\bin\pacman -Rc --noconfirm mingw-w64-x86_64-gcc-libs
36+
)
37+
2838
# clone directory
2939
clone_folder: c:\projects\libosmium
3040

3141
platform: x64
3242

3343
build_script:
34-
- build-appveyor.bat
44+
- cd c:\projects\libosmium
45+
- if [%config%]==[MSYS2] (
46+
build-msys2.bat
47+
) else (
48+
build-appveyor.bat
49+
)
3550

3651
# remove garbage VS messages
3752
# http://help.appveyor.com/discussions/problems/4569-the-target-_convertpdbfiles-listed-in-a-beforetargets-attribute-at-c-does-not-exist-in-the-project-and-will-be-ignored

build-msys2.bat

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
echo "Adding MSYS2 to path..."
2+
SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
3+
echo %PATH%
4+
5+
echo "Installing MSYS2 packages..."
6+
bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-geos mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-cppcheck mingw-w64-x86_64-doxygen mingw-w64-x86_64-gdb mingw-w64-x86_64-sparsehash mingw-w64-x86_64-gdal mingw-w64-x86_64-ruby mingw-w64-x86_64-libspatialite mingw-w64-x86_64-spatialite-tools mingw-w64-x86_64-clang-tools-extra"
7+
bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-postgresql mingw-w64-x86_64-netcdf mingw-w64-x86_64-crypto++"
8+
call C:\msys64\mingw64\bin\gem.cmd install json
9+
10+
echo "Setting PROJ_LIB variable for correct PROJ.4 working"
11+
set PROJ_LIB=c:\msys64\mingw64\share\proj
12+
13+
echo "Generating makefiles"
14+
mkdir build
15+
cd build
16+
cmake .. -G "MSYS Makefiles" -DBUILD_DATA_TESTS=ON -DBUILD_HEADERS=OFF
17+
18+
echo "Building"
19+
make
20+
21+
echo "Testing"
22+
ctest

0 commit comments

Comments
 (0)