mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Merge pull request #8499 from qgis/multi-docker-yaml
build docker images baed on cosmic and bionic
This commit is contained in:
commit
d77d832ac5
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
###########################################################################
|
||||
# after_script.sh
|
||||
# ---------------------
|
||||
# Date : February 2017
|
||||
# Copyright : (C) 2017 by Denis Rouzaud
|
||||
# Email : denis.rouzaud@gmail.com
|
||||
###########################################################################
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
###########################################################################
|
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
###########################################################################
|
||||
# after_script.sh
|
||||
# ---------------------
|
||||
# Date : September 2015
|
||||
# Copyright : (C) 2015 by Matthias Kuhn
|
||||
# Email : matthias at opengis dot ch
|
||||
###########################################################################
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
###########################################################################
|
@ -18,15 +18,8 @@ set -e
|
||||
|
||||
pushd .docker
|
||||
|
||||
source $(git rev-parse --show-toplevel)/.ci/travis/scripts/travis_envvar_helper.sh
|
||||
|
||||
|
||||
DOCKER_DEPS_PUSH=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ push ]] && echo "true" || echo "false" )
|
||||
DOCKER_DEPS_IMAGE_REBUILD=$( [[ $TRAVIS_COMMIT_MESSAGE =~ '[docker] update dependencies' ]] && echo "true" || echo "false" )
|
||||
# on cron job, QGIS image is built and push without testing
|
||||
DOCKER_QGIS_IMAGE_BUILD_PUSH=$(create_qgis_image)
|
||||
QGIS_LAST_BUILD_SUCCESS=true # TODO use API to know if last build succeed https://developer.travis-ci.com/resource/builds
|
||||
|
||||
|
||||
echo "travis_fold:start:travis_env"
|
||||
echo "${bold}Travis environment variables${endbold}"
|
||||
@ -36,8 +29,8 @@ echo "DOCKER_TAG: $DOCKER_TAG"
|
||||
echo "TRAVIS_COMMIT_MESSAGE: $TRAVIS_COMMIT_MESSAGE"
|
||||
echo "DOCKER_DEPS_PUSH: $DOCKER_DEPS_PUSH"
|
||||
echo "DOCKER_DEPS_IMAGE_REBUILD: $DOCKER_DEPS_IMAGE_REBUILD"
|
||||
echo "DOCKER_QGIS_IMAGE_BUILD_PUSH: $DOCKER_QGIS_IMAGE_BUILD_PUSH"
|
||||
echo "QGIS_LAST_BUILD_SUCCESS: $QGIS_LAST_BUILD_SUCCESS"
|
||||
echo "DOCKER_BUILD_QGIS_IMAGE: $DOCKER_BUILD_QGIS_IMAGE"
|
||||
echo "DOCKER_BUILD_DEPS_FILE: $DOCKER_BUILD_DEPS_FILE"
|
||||
echo "TRAVIS_TIMESTAMP: $TRAVIS_TIMESTAMP"
|
||||
echo "travis_fold:end:travis_env"
|
||||
|
||||
@ -45,16 +38,16 @@ echo "travis_fold:end:travis_env"
|
||||
echo "travis_fold:start:docker_build"
|
||||
echo "${bold}Docker build deps${endbold}"
|
||||
docker --version
|
||||
if [[ $DOCKER_QGIS_IMAGE_BUILD_PUSH =~ false ]]; then
|
||||
if [[ $DOCKER_BUILD_QGIS_IMAGE =~ false ]]; then
|
||||
docker-compose --version
|
||||
docker-compose -f "${DOCKER_COMPOSE}" config
|
||||
docker-compose -f ${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml config
|
||||
fi
|
||||
|
||||
if [[ $DOCKER_DEPS_IMAGE_REBUILD =~ true ]]; then
|
||||
docker build --no-cache -t "qgis/qgis3-build-deps:${DOCKER_TAG}" -f qgis3-build-deps.dockerfile .
|
||||
docker build --no-cache -t "qgis/qgis3-build-deps:${DOCKER_TAG}" -f ${DOCKER_BUILD_DEPS_FILE} .
|
||||
else
|
||||
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}" -f qgis3-build-deps.dockerfile .
|
||||
docker build --cache-from "qgis/qgis3-build-deps:${DOCKER_TAG}" -t "qgis/qgis3-build-deps:${DOCKER_TAG}" -f ${DOCKER_BUILD_DEPS_FILE} .
|
||||
fi
|
||||
echo "travis_fold:end:docker_build"
|
||||
|
||||
|
@ -59,6 +59,9 @@ cmake \
|
||||
-DPYTHON_TEST_WRAPPER="timeout -sSIGSEGV 55s"\
|
||||
-DCXX_EXTRA_FLAGS="${CLANG_WARNINGS}" \
|
||||
-DWERROR=TRUE \
|
||||
-DQT5_3DEXTRA_LIBRARY="/usr/lib/x86_64-linux-gnu/libQt53DExtras.so" \
|
||||
-DQT5_3DEXTRA_INCLUDE_DIR="/root/QGIS/external/qt3dextra-headers" \
|
||||
-DCMAKE_PREFIX_PATH="/root/QGIS/external/qt3dextra-headers/cmake" \
|
||||
..
|
||||
echo "travis_fold:end:cmake"
|
||||
|
||||
|
@ -16,13 +16,10 @@
|
||||
|
||||
set -e
|
||||
|
||||
source $(git rev-parse --show-toplevel)/.ci/travis/scripts/travis_envvar_helper.sh
|
||||
|
||||
DOCKER_QGIS_IMAGE_BUILD_PUSH=$(create_qgis_image)
|
||||
|
||||
mkdir -p "$CCACHE_DIR"
|
||||
|
||||
if [[ $DOCKER_QGIS_IMAGE_BUILD_PUSH =~ true ]]; then
|
||||
if [[ ${DOCKER_BUILD_QGIS_IMAGE} =~ true ]]; then
|
||||
# building docker images
|
||||
DIR=$(git rev-parse --show-toplevel)/.docker
|
||||
pushd "${DIR}"
|
||||
echo "${bold}Building QGIS Docker image '${DOCKER_TAG}'...${endbold}"
|
||||
@ -36,5 +33,6 @@ if [[ $DOCKER_QGIS_IMAGE_BUILD_PUSH =~ true ]]; then
|
||||
docker push "qgis/qgis:${DOCKER_TAG}"
|
||||
popd
|
||||
else
|
||||
docker-compose -f "${DOCKER_COMPOSE}" run --rm qgis-deps
|
||||
# running tests
|
||||
docker-compose -f ${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml run --rm qgis-deps
|
||||
fi
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
create_qgis_image () {
|
||||
|
||||
if [[ ! $TRAVIS_REPO_SLUG =~ qgis/QGIS ]]; then
|
||||
echo false
|
||||
return
|
||||
fi
|
||||
if [[ $TRAVIS_EVENT_TYPE =~ cron ]] || [[ -n $TRAVIS_TAG ]]; then
|
||||
echo true
|
||||
return
|
||||
fi
|
||||
echo false
|
||||
}
|
139
.docker/qgis3-build-deps-cosmic.dockerfile
Normal file
139
.docker/qgis3-build-deps-cosmic.dockerfile
Normal file
@ -0,0 +1,139 @@
|
||||
FROM ubuntu:18.10
|
||||
MAINTAINER Denis Rouzaud <denis@opengis.ch>
|
||||
|
||||
LABEL Description="Docker container with QGIS dependencies" Vendor="QGIS.org" Version="1.0"
|
||||
|
||||
# && echo "deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main" >> /etc/apt/sources.list \
|
||||
# && echo "deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main" >> /etc/apt/sources.list \
|
||||
# && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160 \
|
||||
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y software-properties-common \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y \
|
||||
apt-transport-https \
|
||||
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 \
|
||||
libqt53dextras5 \
|
||||
libqt53drender5 \
|
||||
libqt5concurrent5 \
|
||||
libqt5opengl5-dev \
|
||||
libqt5positioning5 \
|
||||
libqt5qml5 \
|
||||
libqt5quick5 \
|
||||
libqt5quickcontrols2-5 \
|
||||
libqt5scintilla2-dev \
|
||||
libqt5sql5-odbc \
|
||||
libqt5sql5-sqlite \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5-dev \
|
||||
libqt5xml5 \
|
||||
libqt5xmlpatterns5-dev \
|
||||
libqt5serialport5-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 \
|
||||
qt3d5-dev \
|
||||
qt3d-assimpsceneimport-plugin \
|
||||
qt3d-defaultgeometryloader-plugin \
|
||||
qt3d-gltfsceneio-plugin \
|
||||
qt3d-scene2d-plugin \
|
||||
qt5keychain-dev \
|
||||
qtbase5-dev \
|
||||
qtdeclarative5-dev-tools \
|
||||
qtpositioning5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools \
|
||||
qtbase5-private-dev \
|
||||
saga \
|
||||
spawn-fcgi \
|
||||
txt2tags \
|
||||
xauth \
|
||||
xfonts-100dpi \
|
||||
xfonts-75dpi \
|
||||
xfonts-base \
|
||||
xfonts-scalable \
|
||||
xvfb \
|
||||
&& pip3 install \
|
||||
psycopg2 \
|
||||
numpy \
|
||||
nose2 \
|
||||
pyyaml \
|
||||
mock \
|
||||
future \
|
||||
termcolor \
|
||||
owslib \
|
||||
oauthlib \
|
||||
pyopenssl \
|
||||
&& apt-get clean
|
||||
|
||||
|
||||
# MSSQL: client side
|
||||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
|
||||
RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/msprod.list
|
||||
RUN apt-get update
|
||||
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools
|
||||
|
||||
# Avoid sqlcmd termination due to locale -- see https://github.com/Microsoft/mssql-docker/issues/163
|
||||
RUN echo "nb_NO.UTF-8 UTF-8" > /etc/locale.gen
|
||||
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
RUN locale-gen
|
||||
|
||||
|
||||
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
|
||||
ENV PATH="/usr/local/bin:${PATH}"
|
||||
|
||||
CMD /root/QGIS/.ci/travis/linux/docker-build-test.sh
|
103
.travis.yml
103
.travis.yml
@ -1,42 +1,49 @@
|
||||
language: python # This lets us use newer python versions from virtualenv
|
||||
python: "3.5"
|
||||
compiler: clang
|
||||
dist: trusty
|
||||
sudo: false
|
||||
cache:
|
||||
apt: true
|
||||
pip: true
|
||||
directories:
|
||||
- $HOME/.ccache
|
||||
timeout: 1000
|
||||
|
||||
env:
|
||||
global:
|
||||
- TRAVIS_TIMESTAMP=$(date +%s)
|
||||
- CCACHE_DIR=${HOME}/.ccache
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
# QT5 based build with Python 3 // using container based builds and prebuild binary dependencies in osgeo4travis
|
||||
|
||||
##########################################################
|
||||
#
|
||||
# TESTS FOR STANDARD COMMITS
|
||||
#
|
||||
##########################################################
|
||||
|
||||
##########################################################
|
||||
# QGIS TESTS ON BIONIC
|
||||
##########################################################
|
||||
- os: linux
|
||||
if: type != cron
|
||||
services: docker
|
||||
language: python # This lets us use newer python versions from virtualenv
|
||||
env:
|
||||
- TRAVIS_CONFIG=linux
|
||||
- DOCKER_COMPOSE=${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml
|
||||
# TRAVIS_BRANCH is either the git tag or the branch name when no tag
|
||||
- DOCKER_TAG=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && echo $TRAVIS_BRANCH | sed 's/master/latest/' || echo "latest" )
|
||||
- TRAVIS_TIMESTAMP=$(date +%s)
|
||||
- CCACHE_DIR=${HOME}/.ccache
|
||||
dist: trusty
|
||||
sudo: false
|
||||
cache:
|
||||
apt: true
|
||||
pip: true
|
||||
directories:
|
||||
- $HOME/.ccache
|
||||
timeout: 1000
|
||||
compiler: clang
|
||||
python: "3.5"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
packages:
|
||||
|
||||
- DOCKER_BUILD_QGIS_IMAGE=false
|
||||
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps.dockerfile
|
||||
|
||||
##########################################################
|
||||
# CODE LAYOUT
|
||||
##########################################################
|
||||
- os: linux
|
||||
language: python
|
||||
python: "3.5"
|
||||
if: type != cron
|
||||
env:
|
||||
- TRAVIS_CONFIG=code_layout
|
||||
dist: trusty
|
||||
sudo: false
|
||||
cache:
|
||||
apt: true
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@ -69,6 +76,44 @@ matrix:
|
||||
- libstrictures-perl
|
||||
- libstring-escape-perl
|
||||
- libtry-tiny-perl
|
||||
|
||||
|
||||
|
||||
##########################################################
|
||||
#
|
||||
# DOCKER IMAGE BUILD JOBS ON CRON OR TAG
|
||||
#
|
||||
##########################################################
|
||||
|
||||
|
||||
##########################################################
|
||||
# BIONIC DOCKER BUILD ON CRON OR TAG
|
||||
##########################################################
|
||||
- os: linux
|
||||
if: repo = qgis/QGIS AND (tag IS PRESENT OR type = cron)
|
||||
services: docker
|
||||
env:
|
||||
- TRAVIS_CONFIG=linux
|
||||
- DOCKER_TAG=$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )
|
||||
- DOCKER_DEBIAN_DISTRO=bionic
|
||||
- DOCKER_BUILD_QGIS_IMAGE=true
|
||||
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps.dockerfile
|
||||
|
||||
##########################################################
|
||||
# COSMIC DOCKER BUILD ON CRON OR TAG
|
||||
##########################################################
|
||||
- os: linux
|
||||
if: repo = qgis/QGIS AND (tag IS PRESENT OR type = cron)
|
||||
services: docker
|
||||
env:
|
||||
- TRAVIS_CONFIG=linux
|
||||
- DOCKER_TAG=$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )_cosmic
|
||||
- DOCKER_DEBIAN_DISTRO=cosmic
|
||||
- DOCKER_BUILD_QGIS_IMAGE=true
|
||||
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps-cosmic.dockerfile
|
||||
|
||||
|
||||
|
||||
# OSX based build with QT4 and Python 2
|
||||
# - os: osx
|
||||
# osx_image: xcode8.3 # MacOS 10.12: Sierra
|
||||
@ -92,7 +137,6 @@ notifications:
|
||||
on_success: change
|
||||
skip_join: true
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/467e3aff72e344d1dae3
|
||||
@ -111,6 +155,3 @@ before_script:
|
||||
|
||||
script:
|
||||
- ./.ci/travis/${TRAVIS_CONFIG}/script.sh
|
||||
|
||||
after_script:
|
||||
- ./.ci/travis/${TRAVIS_CONFIG}/after_script.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user