diff --git a/.ci/travis/docker_image/before_install.sh b/.ci/travis/docker_image/before_install.sh deleted file mode 100755 index 36c02ec02546..000000000000 --- a/.ci/travis/docker_image/before_install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -########################################################################### -# before_install.sh -# --------------------- -# Date : March 2019 -# Copyright : (C) 2019 by Denis Rouzaud -# Email : denis@opengis.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. # -# # -########################################################################### diff --git a/.ci/travis/docker_image/before_script.sh b/.ci/travis/docker_image/before_script.sh deleted file mode 100755 index 811844baa78c..000000000000 --- a/.ci/travis/docker_image/before_script.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -########################################################################### -# before_install.sh -# --------------------- -# Date : March 2019 -# Copyright : (C) 2019 by Denis Rouzaud -# Email : denis@opengis.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. # -# # -########################################################################### - - -set -e - -.ci/travis/scripts/echo_travis_var.sh - -pushd .docker - - - -echo "travis_fold:start:docker_build" -echo "${bold}Docker build deps${endbold}" -docker --version - -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 ${DOCKER_BUILD_DEPS_FILE} . -echo "push to qgis/qgis3-build-deps:${DOCKER_TAG}" -docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" -docker push "qgis/qgis3-build-deps:${DOCKER_TAG}" - -echo "travis_fold:end:docker_build" - - -popd diff --git a/.ci/travis/docker_image/install.sh b/.ci/travis/docker_image/install.sh deleted file mode 100755 index 809a773fce43..000000000000 --- a/.ci/travis/docker_image/install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -########################################################################### -# before_install.sh -# --------------------- -# Date : March 2019 -# Copyright : (C) 2019 by Denis Rouzaud -# Email : denis@opengis.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. # -# # -########################################################################### - - diff --git a/.ci/travis/docker_image/script.sh b/.ci/travis/docker_image/script.sh deleted file mode 100755 index e234920de1e0..000000000000 --- a/.ci/travis/docker_image/script.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env bash -########################################################################### -# before_install.sh -# --------------------- -# Date : March 2019 -# Copyright : (C) 2019 by Denis Rouzaud -# Email : denis@opengis.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. # -# # -########################################################################### - - -set -e - -# test if ccache dir exists (coming from Travis cache) -[[ -d ${CCACHE_DIR} ]] && echo "cache directory (${CCACHE_DIR}) exists" || mkdir -p "${CCACHE_DIR}" - -# copy ccache dir within QGIS source so it can be accessed from docker -cp -r ${CCACHE_DIR}/. ${TRAVIS_BUILD_DIR}/.ccache_image_build - -echo "Cache directory size: "$(du -h --max-depth=0 ${TRAVIS_BUILD_DIR}/.ccache_image_build) - -# calculate timeouts -CURRENT_TIME=$(date +%s) -TIMEOUT=$((( TRAVIS_AVAILABLE_TIME - TRAVIS_UPLOAD_TIME ) * 60 - CURRENT_TIME + TRAVIS_TIMESTAMP)) -#TIMEOUT=$(( TIMEOUT < 300 ? 300 : TIMEOUT )) -echo "Timeout: ${TIMEOUT}s" - -# building docker images -pushd "${TRAVIS_BUILD_DIR}/.docker" -echo "${bold}Building QGIS Docker image '${DOCKER_TAG}'...${endbold}" -DOCKER_BUILD_ARGS="--build-arg DOCKER_TAG=${DOCKER_TAG} \ - --build-arg BUILD_TIMEOUT=${TIMEOUT} \ - --build-arg CC --build-arg CXX" -docker build ${DOCKER_BUILD_ARGS} \ - --cache-from "qgis/qgis:${DOCKER_TAG}" \ - -t "qgis/qgis:BUILDER" \ - -f qgis.dockerfile .. - -docker run --name qgis_container qgis/qgis:BUILDER /bin/true - -echo "Copy build cache from Docker container to Travis cache directory" -rm -rf "${CCACHE_DIR:?}/"* -mkdir -p ${CCACHE_DIR} -docker cp qgis_container:/QGIS/.ccache_image_build/. ${CCACHE_DIR} - -docker cp qgis_container:/QGIS/build_exit_value ${HOME}/build_exit_value - -if [[ $(cat ${HOME}/build_exit_value) == "TIMEOUT" ]]; then - echo "Build timeout, not pushing image or triggering PyQGIS docs" - exit 1 -else - echo "${bold}Finalize image…${endbold}" - # enable experimental features in Docker to squash - echo '{ "experimental": true}' | sudo tee /etc/docker/daemon.json - sudo service docker restart - docker build ${DOCKER_BUILD_ARGS} \ - --cache-from "qgis/qgis:BUILDER" \ - --squash \ - -t "qgis/qgis:${DOCKER_TAG}" \ - -f qgis.dockerfile .. - - echo "${bold}Pushing image to docker hub…${endbold}" - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" - docker push "qgis/qgis:${DOCKER_TAG}" - - echo "Trigger build of PyQGIS Documentation…" - if [[ ${TRIGGER_PYQGIS_DOC} =~ ^TRUE$ ]]; then - body='{ - "ref": "master", - "inputs": {"qgis_branch": "__QGIS_VERSION_BRANCH__"} - }' - body=$(sed "s/__QGIS_VERSION_BRANCH__/${TRAVIS_BRANCH}/;" <<< $body) - curl -X POST \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token ${GH_TOKEN}" \ - https://api.github.com/repos/qgis/pyqgis/actions/workflows/2246440/dispatches \ - -d "${body}" - else - echo "skipped from configuration" - fi -fi diff --git a/.travis.yml b/.travis.yml index 91575a97a257..d2d65662aecf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -language: python # This lets us use newer python versions from virtualenv +language: python python: "3.7" compiler: clang dist: bionic @@ -8,8 +8,6 @@ cache: pip: true directories: - ${HOME}/.ccache_testing - - ${HOME}/.ccache_docker_build_focal - - ${HOME}/.ccache_docker_build_bionic timeout: 1000 if: NOT branch =~ /^(cherry-pick-)?backport-\d+-/ AND NOT branch =~ /-patch-\d+$/ @@ -49,64 +47,6 @@ matrix: # Label ID can be found here https://api.github.com/repos/qgis/QGIS/labels - RUN_FLAKY_TESTS=$(.ci/travis/scripts/pr_has_label.py $TRAVIS_PULL_REQUEST 1271248184) - -########################################################## -# -# DOCKER IMAGE BUILD JOBS ON CRON OR TAG -# -########################################################## - - - ########################################################## - # BIONIC DOCKER BUILD ON CRON OR TAG - ########################################################## - - os: linux - name: bionic docker build 🐳 - if: repo = qgis/QGIS AND (tag IS PRESENT OR type = cron) - services: docker - sudo: required # required to restart Docker Daemon with experimental features - env: - - TRAVIS_CONFIG=docker_image - - CCACHE_DIR=${HOME}/.ccache_docker_build_bionic - - TRIGGER_PYQGIS_DOC=FALSE - - DOCKER_TAG=$( echo $TRAVIS_BRANCH | sed 's/master/latest/' ) - - DOCKER_BUILD_DEPS_FILE=qgis3-build-deps.dockerfile - - CC=/usr/lib/ccache/clang - - CXX=/usr/lib/ccache/clang++ - - ########################################################## - # FOCAL DOCKER BUILD ON CRON OR TAG - ########################################################## - - os: linux - name: focal docker build 🔭 - if: repo = qgis/QGIS AND (tag IS PRESENT OR type = cron) - services: docker - sudo: required # required to restart Docker Daemon with experimental features - env: - - TRAVIS_CONFIG=docker_image - - CCACHE_DIR=${HOME}/.ccache_docker_build_focal - - TRIGGER_PYQGIS_DOC=TRUE - - DOCKER_TAG="$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )_focal" - - DOCKER_BUILD_DEPS_FILE=qgis3-build-deps-focal.dockerfile - - CC=/usr/lib/ccache/gcc - - CXX=/usr/lib/ccache/g++ # Building SIP binding freezes with Clang in Docker, maybe a SIP issue, maybe not - - - - # OSX based build with QT4 and Python 2 -# - os: osx -# osx_image: xcode8.3 # MacOS 10.12: Sierra -# cache: -# pip: true -# directories: -# - $HOME/.ccache -# env: -# - TRAVIS_CONFIG=macos -# - IGNORE_BUILD_FAILURES=YES -# -# allow_failures: -# - os: osx - git: depth: 120