Skip to content
Permalink
Browse files

Travis setup to compile mapscript_csharp for linux

  • Loading branch information...
R
R committed Jan 19, 2019
1 parent fd5641d commit a7f6436158ba08e823a844ef5732ef14188f5db3
Showing with 25 additions and 4 deletions.
  1. +1 −1 .gitignore
  2. +1 −0 .travis.yml
  3. +6 −1 Makefile
  4. +5 −2 mapscript/csharp/CMakeLists.txt
  5. +12 −0 mapscript/csharp/run_test.sh
@@ -5,4 +5,4 @@ nbproject
tags
tests/map.png
.vagrant

.idea
@@ -52,6 +52,7 @@ before_install:
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
- sudo apt-get update
- sudo apt-get install --allow-unauthenticated protobuf-c-compiler libprotobuf-c0-dev bison flex python-lxml libfribidi-dev swig cmake librsvg2-dev colordiff libpq-dev libpng12-dev libjpeg-dev libgif-dev libgeos-dev libgd2-xpm-dev libfreetype6-dev libfcgi-dev libcurl4-gnutls-dev libcairo2-dev libgdal1-dev libproj-dev libxml2-dev python-dev libexempi-dev lcov lftp postgis libharfbuzz-dev gdal-bin
- sudo apt-get install --allow-unauthenticated libmono-system-drawing4.0-cil mono-mcs
- sudo apt-get install --allow-unauthenticated php5-dev || sudo apt-get install --allow-unauthenticated php7-dev
- sudo pip install git+git://github.com/tbonfort/cpp-coveralls.git@extensions
- cd msautotest
@@ -2,12 +2,13 @@ AUTOTEST_OPTS=-strict -q
PHP_MAPSCRIPT=build/mapscript/php/php_mapscript.so
PYTHON_MAPSCRIPT_PATH=build/mapscript/python
JAVA_MAPSCRIPT_PATH=build/mapscript/java
CSHARP_MAPSCRIPT_PATH=build/mapscript/csharp
BUILDPATH=../../build
FLEX=flex
YACC=yacc
CMAKEFLAGS=-DCMAKE_C_FLAGS="--coverage" -DCMAKE_CXX_FLAGS="--coverage" \
-DCMAKE_SHARED_LINKER_FLAGS="-lgcov" -DWITH_CLIENT_WMS=1 \
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_PHP=1 \
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_CSHARP=1 -DWITH_PHP=1 \
-DWITH_PYTHON=1 -DWITH_JAVA=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 -DWITH_FCGI=0 -DWITH_EXEMPI=1 \
-DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=1 -DWITH_CURL=1 -DWITH_HARFBUZZ=1 -DWITH_POINT_Z_M=1
all: cmakebuild
@@ -46,10 +47,14 @@ php-testcase:
java-testcase:
test -d "$(JAVA_MAPSCRIPT_PATH)" && (export JAVA_MAPSCRIPT_SO="../../$(JAVA_MAPSCRIPT_PATH)" && cd mapscript/java && ./run_test.sh)

csharp-testcase:
test -d "$(CSHARP_MAPSCRIPT_PATH)" && (export CSHARP_MAPSCRIPT_SO="../../$(CSHARP_MAPSCRIPT_PATH)" && cd mapscript/csharp && ./run_test.sh)

test: cmakebuild
@$(MAKE) $(MFLAGS) wxs-testcase renderers-testcase misc-testcase gdal-testcase query-testcase mspython-testcase
@./print-test-results.sh
@$(MAKE) $(MFLAGS) php-testcase
@$(MAKE) $(MFLAGS) csharp-testcase


lexer: maplexer.c
@@ -42,8 +42,11 @@ else()
SWIG_ADD_LIBRARY(mapscript LANGUAGE csharp SOURCES ../mapscript.i)
endif()


set_target_properties(mapscript PROPERTIES OUTPUT_NAME "mapscript")
if (WIN32)
set_target_properties(mapscript PROPERTIES OUTPUT_NAME "mapscript")
else()
set_target_properties(mapscript PROPERTIES OUTPUT_NAME "libmapscript")
endif()

SWIG_LINK_LIBRARIES(mapscript ${MAPSERVER_LIBMAPSERVER})

@@ -0,0 +1,12 @@
#!/bin/sh -ex
cd ${CSHARP_MAPSCRIPT_SO}
echo .: Testing shpdump.exe :.
mono shpdump.exe ../../../tests/point.shp
echo .: Testing drawmap.exe :.
mono drawmap.exe ../../../tests/test.map ./map.png
echo .: Testing shapeinfo.exe :.
mono shapeinfo.exe ../../../tests/point.shp
echo .: Testing getbytes.exe :.
mono getbytes.exe ../../../tests/test.map test_csharp2.png
echo .: Testing RFC24.exe :.
mono RFC24.exe ../../../tests/test.map

0 comments on commit a7f6436

Please sign in to comment.
You can’t perform that action at this time.