Attempt for auto mason publish

This commit is contained in:
Blake Thompson 2015-04-27 21:23:47 -05:00
parent c64dc3672a
commit 42e2b462a4
2 changed files with 62 additions and 4 deletions

View file

@ -5,6 +5,10 @@ sudo: false
git:
depth: 2
env:
global:
- secure: "N3a5nzzsgpuu45k8qWdYsHNxrSnqeAGLTOYpfYoAH7B94vuf7pa7XV1tQjXbxrnx2D6ryTdtUtyRKwy7zXbwXxGt4DpczWEo8f6DUd6+obAp3kdnXABg2Sj4oA7KMs0F0CmoADy0jdUZD5YyOJHu64LCIIgzEQ9q49PFMNbU3IE="
- secure: "iQYPNpMtejcgYeUkWZGIWz1msIco5qydJrhZTSCQOYahAQerdT7q5WZEpEo3G6IWOGgO1eo7GFuY8DvqQjw1+jC9b9mhkRNdo3LhGTKS9Gsbl5Q27k0rjlaFZmmQHrfPlQJwhfAIp+KLugHtQw5bCoLh+95E3j0F0DayF1tuJ3s="
addons:
postgresql: "9.4"
apt:
@ -47,11 +51,28 @@ install:
script:
- source bootstrap.sh
- if [[ ${COVERAGE} == true ]]; then ./configure CUSTOM_LDFLAGS='--coverage' CUSTOM_CXXFLAGS='--coverage' CUSTOM_CFLAGS='--coverage' DEBUG=True; else ./configure; fi;
- if [[ ${COVERAGE} != true ]]; then
export MASON_NAME=mapnik;
export MASON_VERSION=latest;
export MASON_LIB_FILE=lib/libmapnik-wkt.a
source ./.mason.sh;
./configure PREFIX=${MASON_PREFIX} PATH_REPLACE='';
else
./configure CUSTOM_LDFLAGS='--coverage' CUSTOM_CXXFLAGS='--coverage' CUSTOM_CFLAGS='--coverage' DEBUG=True;
fi;
- make
- git clone --depth=1 https://github.com/mapnik/test-data test-data
- git clone --depth=1 https://github.com/mapbox/mapnik-test-data tests/data/mapnik-test-data
- make test
- PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user cpp-coveralls
- if [[ ${COVERAGE} == true ]]; then ./mason_packages/.link/bin/cpp-coveralls --build-root . --gcov-options '\-lp' --exclude mason_packages --exclude .sconf_temp --exclude benchmark --exclude deps --exclude scons --exclude test --exclude demo --exclude docs --exclude fonts --exclude utils > /dev/null; fi;
- if [[ ${COVERAGE} != true ]]; then make bench; fi;
- if [[ ${COVERAGE} != true ]]; then
./mason_latest.sh mapnik install latest;
fi;
- if [[ ${COVERAGE} == true ]]; then
PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user cpp-coveralls;
fi;
- if [[ ${COVERAGE} == true ]]; then
./mason_packages/.link/bin/cpp-coveralls --build-root . --gcov-options '\-lp' --exclude mason_packages --exclude .sconf_temp --exclude benchmark --exclude deps --exclude scons --exclude test --exclude demo --exclude docs --exclude fonts --exclude utils > /dev/null;
fi;
- if [[ ${COVERAGE} != true ]]; then
make bench;
fi;

37
mason_latest.sh Normal file
View file

@ -0,0 +1,37 @@
#!/usr/bin/env bash
MASON_NAME=mapnik
MASON_VERSION=latest
MASON_LIB_FILE=lib/libmapnik-wkt.a
. ${MASON_DIR:-~/.mason}/mason.sh
function mason_load_source {
""
}
function mason_compile {
HERE=$(pwd)
python -c "data=open('$MASON_PREFIX/bin/mapnik-config','r').read();open('$MASON_PREFIX/bin/mapnik-config','w').write(data.replace('$HERE','.'))"
mkdir -p ${MASON_PREFIX}/share/gdal
mkdir -p ${MASON_PREFIX}/share/proj
mkdir -p ${MASON_PREFIX}/share/icu
cp -r $GDAL_DATA/ ${MASON_PREFIX}/share/gdal/
cp -r $PROJ_LIB/ ${MASON_PREFIX}/share/proj/
cp -r $ICU_DATA/*dat ${MASON_PREFIX}/share/icu/
find ${MASON_PREFIX} -name "*.pyc" -exec rm {} \;
}
function mason_cflags {
""
}
function mason_ldflags {
""
}
function mason_clean {
""
}
mason_run "$@"