-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5256 from qgis/docker2
[travis] Use docker to run test
- Loading branch information
Showing
58 changed files
with
383 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/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 | ||
|
||
########### | ||
# Configure | ||
########### | ||
pushd /root/QGIS | ||
mkdir -p build | ||
|
||
pushd build | ||
|
||
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} .. | ||
|
||
####### | ||
# Build | ||
####### | ||
echo "travis_fold:start:ninja-build.1" | ||
ninja | ||
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 | ||
/root/QGIS/tests/testdata/provider/testdata_pg.sh | ||
popd # /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 | ||
######################## | ||
ccache -s | ||
|
||
popd # build | ||
popd # /root/QGIS | ||
|
||
[ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
FROM ubuntu:16.04 | ||
MAINTAINER Denis Rouzaud <denis.rouzaud@gmail.com> | ||
|
||
LABEL Description="Docker container with QGIS dependencies" Vendor="QGIS.org" Version="1.0" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y software-properties-common \ | ||
&& add-apt-repository ppa:ubuntugis/ubuntugis-unstable \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
bison \ | ||
ca-certificates \ | ||
ccache \ | ||
clang \ | ||
cmake \ | ||
curl \ | ||
dh-python \ | ||
flex \ | ||
gdal-bin \ | ||
git \ | ||
graphviz \ | ||
grass-dev \ | ||
libexpat1-dev \ | ||
libfcgi-dev \ | ||
libgdal-dev \ | ||
libgeos-dev \ | ||
libgsl-dev \ | ||
libpq-dev \ | ||
libproj-dev \ | ||
libqca-qt5-2-dev \ | ||
libqca-qt5-2-plugins \ | ||
libqt5opengl5-dev \ | ||
libqt5scintilla2-dev \ | ||
libqt5sql5-sqlite \ | ||
libqt5svg5-dev \ | ||
libqt5webkit5-dev \ | ||
libqt5xmlpatterns5-dev \ | ||
libqwt-qt5-dev \ | ||
libspatialindex-dev \ | ||
libspatialite-dev \ | ||
libsqlite3-dev \ | ||
libsqlite3-mod-spatialite \ | ||
libzip-dev \ | ||
lighttpd \ | ||
locales \ | ||
ninja-build \ | ||
pkg-config \ | ||
poppler-utils \ | ||
postgresql-client \ | ||
pyqt5-dev \ | ||
pyqt5-dev-tools \ | ||
pyqt5.qsci-dev \ | ||
python3-all-dev \ | ||
python3-dev \ | ||
python3-future \ | ||
python3-gdal \ | ||
python3-mock \ | ||
python3-nose2 \ | ||
python3-pip \ | ||
python3-psycopg2 \ | ||
python3-pyqt5 \ | ||
python3-pyqt5.qsci \ | ||
python3-pyqt5.qtsql \ | ||
python3-pyqt5.qtsvg \ | ||
python3-sip \ | ||
python3-sip-dev \ | ||
python3-termcolor \ | ||
python3-yaml \ | ||
qt5keychain-dev \ | ||
qtbase5-dev \ | ||
qtpositioning5-dev \ | ||
qtscript5-dev \ | ||
qttools5-dev \ | ||
qttools5-dev-tools \ | ||
spawn-fcgi \ | ||
txt2tags \ | ||
xauth \ | ||
xfonts-100dpi \ | ||
xfonts-75dpi \ | ||
xfonts-base \ | ||
xfonts-scalable \ | ||
xvfb \ | ||
&& pip3 install \ | ||
psycopg2 \ | ||
numpy \ | ||
nose2 \ | ||
pyyaml \ | ||
mock \ | ||
future \ | ||
termcolor \ | ||
&& apt-get autoremove -y python3-pip python2.7 \ | ||
&& apt-get clean | ||
|
||
RUN echo "alias python=python3" >> ~/.bash_aliases | ||
|
||
ENV CC=/usr/lib/ccache/clang | ||
ENV CXX=/usr/lib/ccache/clang++ | ||
ENV QT_SELECT=5 | ||
ENV LANG=C.UTF-8 | ||
|
||
CMD /root/QGIS/.ci/travis/linux/docker-build-test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
ARG DOCKER_TAG=latest | ||
|
||
FROM qgis/qgis3-build-deps:$DOCKER_TAG | ||
MAINTAINER Denis Rouzaud <denis.rouzaud@gmail.com> | ||
|
||
RUN ls /root/.ccache | ||
|
||
RUN echo "DDDD" | ||
RUN /root/QGIS/.ci/travis/linux/docker-build-test.sh |
Oops, something went wrong.