File tree Expand file tree Collapse file tree 9 files changed +208
-132
lines changed Expand file tree Collapse file tree 9 files changed +208
-132
lines changed Original file line number Diff line number Diff line change 1212# (at your option) any later version. #
1313# #
1414# ##########################################################################
15-
16- ccache -s
17-
18- [ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log
Original file line number Diff line number Diff line change 1313# #
1414# ##########################################################################
1515
16- # #################################################
17- #
18- # Get precompiled dependencies
19- #
20- # #################################################
2116
22- pushd ${HOME}
23-
24- # fetching data from github should be just as fast as S3
25- curl -s -S -L https://github.com/opengisch/osgeo4travis/archive/qt55bin.tar.gz | tar --strip-components=1 -xz -C /home/travis &
26- SETUP_OSGEO4W_PID=$!
27-
28- mkdir /home/travis/osgeo4travis
29-
30- # other dependencies live in a cached folder
31- pushd depcache
32- # Download newer version of cmake than in the repository
33- [[ -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
34- tar --strip-components=1 -zx -f cmake-3.5.0-Linux-x86_64.tar.gz -C /home/travis/osgeo4travis
35-
36- # Download OTB package for Processing tests
37- [[ -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
38- sh ./OTB-5.6.0-Linux64.run
39-
40- wait $SETUP_OSGEO4W_PID
41-
42- popd
43- popd
44-
45- pip install psycopg2 numpy nose2 pyyaml mock future termcolor
17+ # pip3 install termcolor
Original file line number Diff line number Diff line change 1313# #
1414# ##########################################################################
1515
16- printf " [qgis_test]\nhost=localhost\ndbname=qgis_test\nuser=postgres " > ~ /.pg_service.conf
16+ set -e
1717
18- export PGUSER=postgres
19- $TRAVIS_BUILD_DIR /tests/testdata/provider/testdata_pg.sh
18+ pushd .docker
19+
20+ docker --version
21+ docker-compose --version
22+ docker-compose -f $DOCKER_COMPOSE config
23+ # docker pull ubuntu:16.04
24+ docker pull " qgis/qgis3-build-deps:${DOCKER_TAG} " || true
25+ docker build --cache-from " qgis/qgis3-build-deps:${DOCKER_TAG} " -t " qgis/qgis3-build-deps:${DOCKER_TAG} " .
26+ # image should be pushed even if QGIS build fails
27+ # but push is achieved only on branches (not for PRs)
28+ if [[ $DOCKER_PUSH =~ true ]]; then
29+ docker login -u=" $DOCKER_USERNAME " -p=" $DOCKER_PASSWORD "
30+ # docker tag "qgis/qgis3-build-deps:${DOCKER_TAG}" "qgis/qgis3-build-deps:latest"
31+ docker push " qgis/qgis3-build-deps:${DOCKER_TAG} "
32+ fi
33+
34+ popd
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ export CTEST_PARALLEL_LEVEL=1
6+ export CCACHE_TEMPDIR=/tmp
7+ ccache -M 500M
8+ ccache -z
9+
10+ cd /root/QGIS
11+
12+ mkdir -p build-docker &&
13+
14+ pushd build-docker
15+
16+ cmake \
17+ -GNinja \
18+ -DWITH_STAGED_PLUGINS=ON \
19+ -DWITH_GRASS=OFF \
20+ -DSUPPRESS_QT_WARNINGS=ON \
21+ -DENABLE_MODELTEST=ON \
22+ -DENABLE_PGTEST=ON \
23+ -DWITH_QSPATIALITE=ON \
24+ -DWITH_QWTPOLAR=OFF \
25+ -DWITH_APIDOC=OFF \
26+ -DWITH_ASTYLE=OFF \
27+ -DWITH_DESKTOP=ON \
28+ -DWITH_BINDINGS=ON \
29+ -DDISABLE_DEPRECATED=ON \
30+ -DCXX_EXTRA_FLAGS=${CLANG_WARNINGS} ..
31+
32+ # printf "[qgis_test]\nhost=postgres\nport=5432\ndbname=docker\nuser=docker\npassword=docker" > ~/.pg_service.conf
33+ # export PGUSER=docker
34+ # export PGHOST=postgres
35+ # export PGPASSWORD=docker
36+ #
37+ # /root/QGIS/tests/testdata/provider/testdata_pg.sh
38+
39+ python3 /root/QGIS/.ci/travis/scripts/ctest2travis.py \
40+ 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
41+
42+ ccache -s
43+
44+ popd
45+
46+
47+ [ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log
Original file line number Diff line number Diff line change 1313# #
1414# ##########################################################################
1515
16- mkdir build
17- cd build
18-
19- ln -s ${HOME} /osgeo4travis/bin/ccache ${HOME} /osgeo4travis/bin/clang++-${LLVM_VERSION}
20- ln -s ${HOME} /osgeo4travis/bin/ccache ${HOME} /osgeo4travis/bin/clang-${LLVM_VERSION}
21-
22- ccache -s
23- ccache -z
24-
25- export CXX=" clang++-${LLVM_VERSION} "
26- export CC=" clang-${LLVM_VERSION} "
27- # export CXX="g++-6"
28- # export CC="gcc-6"
29- export PATH=${HOME} /osgeo4travis/bin:${PATH}
30- export PYTHONPATH=${HOME} /osgeo4travis/lib/python3.3/site-packages/
31-
32- cmake --version
33- ${CC} --version
34- ${CXX} --version
35-
36- # CLANG_WARNINGS="-Wimplicit-fallthrough"
37- CLANG_WARNINGS=" "
38-
39- # Include this line for debug reasons
40- # -DCMAKE_BUILD_TYPE=RelWithDebInfo \
41- #
42- CMAKE_FLAGS="
43- -DCMAKE_PREFIX_PATH=/home/travis/osgeo4travis
44- -DWITH_STAGED_PLUGINS=ON
45- -DWITH_GRASS=ON
46- -DWITH_GRASS7=ON
47- -DGRASS_PREFIX7=/home/travis/osgeo4travis/grass-7.0.4
48- -DSUPPRESS_QT_WARNINGS=ON
49- -DENABLE_MODELTEST=ON
50- -DENABLE_PGTEST=ON
51- -DWITH_QSPATIALITE=ON
52- -DWITH_QWTPOLAR=OFF
53- -DWITH_APIDOC=OFF
54- -DWITH_ASTYLE=OFF
55- -DWITH_INTERNAL_YAML=OFF
56- -DDISABLE_DEPRECATED=ON
57- -DCXX_EXTRA_FLAGS=${CLANG_WARNINGS}
58- "
59-
60- # The following options trigger a minimalized build to
61- # reduce the travis build time so we don't time out and
62- # have a chance of slowly filling the ccache.
63- if [ " $CACHE_WARMING " = true ] ; then
64- CMAKE_FLAGS="
65- ${CMAKE_FLAGS}
66- -DWITH_DESKTOP=OFF
67- -DWITH_SERVER=OFF
68- -DWITH_CUSTOM_WIDGETS=OFF
69- "
70- else
71- CMAKE_FLAGS="
72- ${CMAKE_FLAGS}
73- -DWITH_DESKTOP=ON
74- -DWITH_SERVER=ON
75- -DWITH_CUSTOM_WIDGETS=ON
76- "
77- fi
78-
79- cmake $CMAKE_FLAGS ..
16+ shopt -s expand_aliases
17+ alias python=python3
Original file line number Diff line number Diff line change 1313# #
1414# ##########################################################################
1515
16- export PYTHONPATH=${HOME} /osgeo4travis/lib/python3.3/site-packages/
17- export PATH=${HOME} /osgeo4travis/bin:${HOME} /osgeo4travis/sbin:${HOME} /OTB-5.6.0-Linux64/bin:${PATH}
18- export LD_LIBRARY_PATH=${HOME} /osgeo4travis/lib
19- export CTEST_PARALLEL_LEVEL=1
20- export CCACHE_TEMPDIR=/tmp
21- ccache -M 500M
22- ccache -z
16+ set -e
2317
24- DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
18+ DIR=$( git rev-parse --show-toplevel ) /.docker
2519
26- # Set OTB application path (installed in before_install.sh script)
27- export OTB_APPLICATION_PATH=${HOME} /OTB-5.6.0-Linux64/lib/otb/applications
28- export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
20+ pushd $DIR
2921
30- export CTEST_BUILD_COMMAND=" /usr/bin/make -j3 -i -k"
22+ ccachedir=${HOME} /.ccache
23+ mkdir -p $ccachedir
3124
32- python ${TRAVIS_BUILD_DIR} /.ci/travis/scripts/ctest2travis.py \
33- xvfb-run ctest -V -E " $( cat ${DIR} /blacklist.txt | sed -r ' /^(#.*?)?$/d' | paste -sd ' |' -) " -S ${DIR} /../travis.ctest --output-on-failure
25+ docker-compose -f $DOCKER_COMPOSE run --rm qgis-deps
26+
27+ popd
Original file line number Diff line number Diff line change 1+
2+
3+ FROM ubuntu:16.04
4+ MAINTAINER Denis Rouzaud <denis.rouzaud@gmail.com>
5+
6+ LABEL Description="Docker container with QGIS dependencies" Vendor="QGIS.org" Version="1.0"
7+
8+ ENV CORES 8
9+
10+ RUN apt-get update \
11+ && apt-get install -y software-properties-common \
12+ && add-apt-repository ppa:ubuntugis/ubuntugis-unstable \
13+ && apt-get update \
14+ && apt-get install -y \
15+ bison \
16+ ca-certificates \
17+ ccache \
18+ clang \
19+ cmake \
20+ dh-python \
21+ flex \
22+ gdal-bin \
23+ graphviz \
24+ grass-dev \
25+ libexpat1-dev \
26+ libfcgi-dev \
27+ libgdal-dev \
28+ libgeos-dev \
29+ libgsl-dev \
30+ libpq-dev \
31+ libproj-dev \
32+ libqca-qt5-2-dev \
33+ libqca-qt5-2-plugins \
34+ libqt5opengl5-dev \
35+ libqt5scintilla2-dev \
36+ libqt5sql5-sqlite \
37+ libqt5svg5-dev \
38+ libqt5webkit5-dev \
39+ libqt5xmlpatterns5-dev \
40+ libqwt-qt5-dev \
41+ libspatialindex-dev \
42+ libspatialite-dev \
43+ libsqlite3-dev \
44+ libsqlite3-mod-spatialite \
45+ libzip-dev \
46+ lighttpd \
47+ locales \
48+ ninja-build \
49+ pkg-config \
50+ poppler-utils \
51+ postgresql-client \
52+ pyqt5-dev \
53+ pyqt5-dev-tools \
54+ pyqt5.qsci-dev \
55+ python3-all-dev \
56+ python3-dev \
57+ python3-future \
58+ python3-gdal \
59+ python3-mock \
60+ python3-nose2 \
61+ python3-pip \
62+ python3-psycopg2 \
63+ python3-pyqt5 \
64+ python3-pyqt5.qsci \
65+ python3-pyqt5.qtsql \
66+ python3-pyqt5.qtsvg \
67+ python3-sip \
68+ python3-sip-dev \
69+ python3-termcolor \
70+ python3-yaml \
71+ qt5keychain-dev \
72+ qtbase5-dev \
73+ qtpositioning5-dev \
74+ qtscript5-dev \
75+ qttools5-dev \
76+ qttools5-dev-tools \
77+ spawn-fcgi \
78+ txt2tags \
79+ xauth \
80+ xfonts-100dpi \
81+ xfonts-75dpi \
82+ xfonts-base \
83+ xfonts-scalable \
84+ xvfb \
85+ && pip3 install \
86+ psycopg2 \
87+ numpy \
88+ nose2 \
89+ pyyaml \
90+ mock \
91+ future \
92+ termcolor \
93+ && apt-get autoremove -y python3-pip python2.7 \
94+ && apt-get clean
95+
96+ RUN echo "alias python=python3" >> ~/.bash_aliases
97+
98+ ENV CC=/usr/lib/ccache/clang
99+ ENV CXX=/usr/lib/ccache/clang++
100+ ENV QT_SELECT=5
101+
102+ # RUN cmake --version
103+ # RUN ${CC} --version
104+ # RUN ${CXX} --version
105+
106+ CMD /root/QGIS/.ci/travis/linux/docker-build-test.sh
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ postgres :
4+ image : kartoza/postgis:9.5-2.2
5+ command : sh -c "echo \"host all all 172.18.0.0/16 md5\" >> /etc/postgresql/9.5/main/pg_hba.conf && /start-postgis.sh"
6+
7+ qgis-deps :
8+ image : qgis/qgis3-build-deps:${DOCKER_TAG}
9+ volumes :
10+ - ${TRAVIS_BUILD_DIR}:/root/QGIS
11+ - $HOME/.ccache:/root/.ccache
12+ links :
13+ - postgres
14+ environment :
15+ - TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR}
16+ - TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}
17+ - TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}
18+ - TRAVIS_COMMIT_RANGE=${TRAVIS_COMMIT_RANGE}
19+ - TRAVIS_OS_NAME=${TRAVIS_OS_NAME}
Original file line number Diff line number Diff line change @@ -3,39 +3,28 @@ matrix:
33 include :
44 # QT5 based build with Python 3 // using container based builds and prebuild binary dependencies in osgeo4travis
55 - os : linux
6+ services : docker
67 language : python # This lets us use newer python versions from virtualenv
78 env :
8- - LLVM_VERSION=3.8
99 - TRAVIS_CONFIG=linux
10- dist : precise
10+ - DOCKER_COMPOSE=${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml
11+ - DOCKER_TAG=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && echo $TRAVIS_BRANCH | sed 's/master/latest/' || echo "latest" )
12+ - DOCKER_PUSH=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_PULL_REQUEST =~ false ]] && echo "true" || echo "false" )
13+
14+ dist : trusty
1115 sudo : false
1216 cache :
1317 apt : true
1418 pip : true
1519 directories :
1620 - $HOME/.ccache
17- - $HOME/depcache
1821 timeout : 1000
1922 compiler : clang
20- python : " 3.3 "
23+ python : " 3.5 "
2124 addons :
22- postgresql : " 9.4"
2325 apt :
2426 sources :
25- - llvm-toolchain-precise-3.8
26- - ubuntu-toolchain-r-test
2727 packages :
28- - bison
29- - flex
30- - libpq-dev
31- - libfcgi-dev
32- - libfftw3-3
33- - libgsl0-dev
34- - pkg-config
35- - poppler-utils
36- - xvfb
37- - clang-3.8
38- - libzip-dev
3928
4029
4130 - os : linux
You can’t perform that action at this time.
0 commit comments