Skip to content
Permalink
Browse files

Merge branch 'master' into usr_bin_env

  • Loading branch information
lbartoletti committed Oct 27, 2017
2 parents be8b911 + c9ca175 commit 0ec041d4cd2bda186db92d92398b33b8352cf7a5
Showing 4,441 changed files with 618,056 additions and 102,473 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
@@ -16,9 +16,9 @@ set -e

pushd build

export CTEST_BUILD_DIR=${TRAVIS_BUILD_DIR}
export CTEST_BUILD_COMMAND="/usr/bin/make -j3 -i -k"
python3 ${TRAVIS_BUILD_DIR}/.ci/travis/scripts/ctest2travis.py xvfb-run ctest -V --output-on-failure -S ${TRAVIS_BUILD_DIR}/.ci/travis/travis.ctest

ctest -V -R PyQgsDocCoverage
python3 ${TRAVIS_BUILD_DIR}/.ci/travis/scripts/ctest2travis.py xvfb-run ctest -V --output-on-failure -S ${TRAVIS_BUILD_DIR}/.ci/travis/travis.ctest

popd
@@ -12,7 +12,3 @@
# (at your option) any later version. #
# #
###########################################################################

ccache -s

[ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log
@@ -13,33 +13,5 @@
# #
###########################################################################

##################################################
#
# Get precompiled dependencies
#
##################################################

pushd ${HOME}

# fetching data from github should be just as fast as S3
curl -s -S -L https://github.com/opengisch/osgeo4travis/archive/qt55bin.tar.gz | tar --strip-components=1 -xz -C /home/travis &
SETUP_OSGEO4W_PID=$!

mkdir /home/travis/osgeo4travis

# other dependencies live in a cached folder
pushd depcache
# Download newer version of cmake than in the repository
[[ -f cmake-3.5.0-Linux-x86_64.tar.gz ]] || curl -s -S -O https://cmake.org/files/v3.5/cmake-3.5.0-Linux-x86_64.tar.gz
tar --strip-components=1 -zx -f cmake-3.5.0-Linux-x86_64.tar.gz -C /home/travis/osgeo4travis

# Download OTB package for Processing tests
[[ -f OTB-5.6.0-Linux64.run ]] || curl -s -S -O https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-5.6.0-Linux64.run
sh ./OTB-5.6.0-Linux64.run

wait $SETUP_OSGEO4W_PID

popd
popd

pip install psycopg2 numpy nose2 pyyaml mock future termcolor
#pip3 install termcolor
@@ -13,7 +13,24 @@
# #
###########################################################################

printf "[qgis_test]\nhost=localhost\ndbname=qgis_test\nuser=postgres" > ~/.pg_service.conf
set -e

export PGUSER=postgres
$TRAVIS_BUILD_DIR/tests/testdata/provider/testdata_pg.sh
pushd .docker

echo "travis_fold:start:docker"
docker --version
docker-compose --version
docker-compose -f $DOCKER_COMPOSE config
#docker pull ubuntu:16.04
docker pull "qgis/qgis3-build-deps:${DOCKER_TAG}" || true
docker build --cache-from "qgis/qgis3-build-deps:${DOCKER_TAG}" -t "qgis/qgis3-build-deps:${DOCKER_TAG}" .
echo "travis_fold:end:docker"
# image should be pushed even if QGIS build fails
# but push is achieved only on branches (not for PRs)
if [[ $DOCKER_PUSH =~ true ]]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
#docker tag "qgis/qgis3-build-deps:${DOCKER_TAG}" "qgis/qgis3-build-deps:latest"
docker push "qgis/qgis3-build-deps:${DOCKER_TAG}"
fi

popd
@@ -11,7 +11,6 @@ PyQgsAppStartup

# temporary during processing refactoring
ProcessingParametersTest
ProcessingGdalAlgorithmsTest

# code layout tests are run on separate build
qgis_spelling
@@ -0,0 +1,90 @@
#!/usr/bin/env bash

set -e

##############
# Setup ccache
##############
export CCACHE_TEMPDIR=/tmp
ccache -M 500M
ccache -z

############################
# Setup the (c)test environment
############################
export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
export CTEST_BUILD_COMMAND="/usr/bin/ninja"
export CTEST_PARALLEL_LEVEL=1

##############################
# Variables for output styling
##############################

bold=$(tput bold)
endbold=$(tput sgr0)

###########
# Configure
###########
pushd /root/QGIS > /dev/null
mkdir -p build

pushd build > /dev/null

echo "travis_fold:start:cmake"
echo "${bold}Running cmake...${endbold}"
cmake \
-GNinja \
-DWITH_STAGED_PLUGINS=ON \
-DWITH_GRASS=OFF \
-DSUPPRESS_QT_WARNINGS=ON \
-DENABLE_MODELTEST=ON \
-DENABLE_PGTEST=ON \
-DWITH_QSPATIALITE=ON \
-DWITH_QWTPOLAR=OFF \
-DWITH_APIDOC=OFF \
-DWITH_ASTYLE=OFF \
-DWITH_DESKTOP=ON \
-DWITH_BINDINGS=ON \
-DDISABLE_DEPRECATED=ON \
-DCXX_EXTRA_FLAGS=${CLANG_WARNINGS} ..
echo "travis_fold:end:cmake"

#######
# Build
#######
echo "travis_fold:start:ninja-build.1"
echo "${bold}Building QGIS...${endbold}"
${CTEST_BUILD_COMMAND}
echo "travis_fold:end:ninja-build.1"

############################
# Restore postgres test data
############################
printf "[qgis_test]\nhost=postgres\nport=5432\ndbname=qgis_test\nuser=docker\npassword=docker" > ~/.pg_service.conf
export PGUSER=docker
export PGHOST=postgres
export PGPASSWORD=docker
export PGDATABASE=qgis_test

pushd /root/QGIS > /dev/null
/root/QGIS/tests/testdata/provider/testdata_pg.sh
popd > /dev/null # /root/QGIS

###########
# Run tests
###########
python3 /root/QGIS/.ci/travis/scripts/ctest2travis.py xvfb-run ctest -V -E "$(cat /root/QGIS/.ci/travis/linux/blacklist.txt | sed -r '/^(#.*?)?$/d' | paste -sd '|' -)" -S /root/QGIS/.ci/travis/travis.ctest --output-on-failure

########################
# Show ccache statistics
########################
echo "travis_fold:start:ccache.stats"
echo "ccache statistics"
ccache -s
echo "travis_fold:end:ccache.stats"

popd > /dev/null # build
popd > /dev/null # /root/QGIS

[ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log || true
@@ -13,67 +13,5 @@
# #
###########################################################################

mkdir build
cd build

ln -s ${HOME}/osgeo4travis/bin/ccache ${HOME}/osgeo4travis/bin/clang++-${LLVM_VERSION}
ln -s ${HOME}/osgeo4travis/bin/ccache ${HOME}/osgeo4travis/bin/clang-${LLVM_VERSION}

ccache -s
ccache -z

export CXX="clang++-${LLVM_VERSION}"
export CC="clang-${LLVM_VERSION}"
#export CXX="g++-6"
#export CC="gcc-6"
export PATH=${HOME}/osgeo4travis/bin:${PATH}
export PYTHONPATH=${HOME}/osgeo4travis/lib/python3.3/site-packages/

cmake --version
${CC} --version
${CXX} --version

# CLANG_WARNINGS="-Wimplicit-fallthrough"
CLANG_WARNINGS=""

# Include this line for debug reasons
# -DCMAKE_BUILD_TYPE=RelWithDebInfo \
#
CMAKE_FLAGS="
-DCMAKE_PREFIX_PATH=/home/travis/osgeo4travis
-DWITH_STAGED_PLUGINS=ON
-DWITH_GRASS=ON
-DWITH_GRASS7=ON
-DGRASS_PREFIX7=/home/travis/osgeo4travis/grass-7.0.4
-DSUPPRESS_QT_WARNINGS=ON
-DENABLE_MODELTEST=ON
-DENABLE_PGTEST=ON
-DWITH_QSPATIALITE=ON
-DWITH_QWTPOLAR=OFF
-DWITH_APIDOC=OFF
-DWITH_ASTYLE=OFF
-DWITH_INTERNAL_YAML=OFF
-DDISABLE_DEPRECATED=ON
-DCXX_EXTRA_FLAGS=${CLANG_WARNINGS}
"

# The following options trigger a minimalized build to
# reduce the travis build time so we don't time out and
# have a chance of slowly filling the ccache.
if [ "$CACHE_WARMING" = true ] ; then
CMAKE_FLAGS="
${CMAKE_FLAGS}
-DWITH_DESKTOP=OFF
-DWITH_SERVER=OFF
-DWITH_CUSTOM_WIDGETS=OFF
"
else
CMAKE_FLAGS="
${CMAKE_FLAGS}
-DWITH_DESKTOP=ON
-DWITH_SERVER=ON
-DWITH_CUSTOM_WIDGETS=ON
"
fi

cmake $CMAKE_FLAGS ..
shopt -s expand_aliases
alias python=python3
@@ -13,21 +13,10 @@
# #
###########################################################################

export PYTHONPATH=${HOME}/osgeo4travis/lib/python3.3/site-packages/
export PATH=${HOME}/osgeo4travis/bin:${HOME}/osgeo4travis/sbin:${HOME}/OTB-5.6.0-Linux64/bin:${PATH}
export LD_LIBRARY_PATH=${HOME}/osgeo4travis/lib
export CTEST_PARALLEL_LEVEL=1
export CCACHE_TEMPDIR=/tmp
ccache -M 500M
ccache -z
set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR=$(git rev-parse --show-toplevel)/.docker

# Set OTB application path (installed in before_install.sh script)
export OTB_APPLICATION_PATH=${HOME}/OTB-5.6.0-Linux64/lib/otb/applications
export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
mkdir -p $CCACHE_DIR

export CTEST_BUILD_COMMAND="/usr/bin/make -j3 -i -k"

python ${TRAVIS_BUILD_DIR}/.ci/travis/scripts/ctest2travis.py \
xvfb-run ctest -V -E "$(cat ${DIR}/blacklist.txt | sed -r '/^(#.*?)?$/d' | paste -sd '|' -)" -S ${DIR}/../travis.ctest --output-on-failure
docker-compose -f $DOCKER_COMPOSE run --rm qgis-deps
@@ -52,12 +52,9 @@ brew install \
spatialindex \
fastcgi \
qtkeychain \
gnu-sed
gnu-sed \
libzip


# Fix qscintilla typo
wget https://gist.githubusercontent.com/m-kuhn/f70e4b160dd7b18eb8d637ed2a75df6d/raw/6eb8a0c8601ec52ad9ad41c01d0fad68fe967aa1/qsci.patch
patch -p1 /usr/local/share/sip/QSci/qscilexer.sip qsci.patch

mkdir -p ${HOME}/Library/Python/3.6/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/opt/gdal2-python/lib/python3.6/site-packages")' >> ${HOME}/Library/Python/3.6/lib/python/site-packages/gdal2.pth
@@ -37,7 +37,8 @@ fcgi
expat
sqlite
flex
bison"
bison
libzip"

full_prefixes=""
for p in ${prefixes}; do
@@ -30,6 +30,7 @@ ccache -z
TIMEOUT=$(expr 40 \* 60 - `date +%s` + `cat /tmp/travis_timestamp`)

export CTEST_BUILD_COMMAND=/usr/local/bin/ninja
export CTEST_BUILD_DIR=${TRAVIS_BUILD_DIR}

gtimeout ${TIMEOUT}s ctest -V -E "$(cat ${DIR}/blacklist.txt | gsed -r '/^(#.*?)?$/d' | gpaste -sd '|' -)" -S ${DIR}/../travis.ctest --output-on-failure

@@ -77,7 +77,7 @@ def start_test_fold():
updated_line = line.decode('utf-8')
if re.match('Run dashboard with model Experimental', updated_line):
start_fold('build')
updated_line = 'Compiling\n{}'.format(updated_line)
updated_line = '{title}\n{line}'.format(title=colored('Running tests...', 'yellow', attrs=['bold']), line=updated_line)

elif re.match('Test project /home/travis/build/qgis/QGIS/build', updated_line):
end_fold() # tag=build
@@ -111,6 +111,9 @@ def start_test_fold():
if not in_failing_test and re.search('[0-9]+% tests passed, [0-9]+ tests failed out of', updated_line):
end_fold()

if re.search('100% tests passed', updated_line):
updated_line = colored(updated_line, 'green')

if re.match('Submit files', updated_line):
start_fold('submit')
elif re.search('Test results submitted to', updated_line):
@@ -1,5 +1,5 @@
SET (CTEST_SOURCE_DIRECTORY $ENV{TRAVIS_BUILD_DIR})
SET (CTEST_BINARY_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}/build")
SET (CTEST_SOURCE_DIRECTORY $ENV{CTEST_BUILD_DIR})
SET (CTEST_BINARY_DIRECTORY $ENV{CTEST_BUILD_DIR}/build)
#SET (CTEST_SOURCE_DIRECTORY /usr/src/QGIS)
#SET (CTEST_BINARY_DIRECTORY /usr/src/qgis-build)

0 comments on commit 0ec041d

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