Skip to content
Snippets Groups Projects
Commit d7a3b8fa authored by René Fritze's avatar René Fritze
Browse files

[travis] copy config from xt-common

parent 3f14fd13
No related branches found
No related tags found
No related merge requests found
# This file is part of the dune-xt-grid project:
# https://github.com/dune-community/dune-xt-grid
# The copyright lies with the authors of this file (see below).
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# Authors:
# Felix Schindler (2016)
# Rene Milk (2015)
"travis" : {
"branch" : "$ENV{TRAVIS_BRANCH}",
"build_number" : "$ENV{TRAVIS_BUILD_NUMBER}",
"commit" : "$ENV{TRAVIS_COMMIT}",
"commit_range" : "$ENV{TRAVIS_COMMIT_RANGE}",
"job_number" : "$ENV{TRAVIS_JOB_NUMBER}",
"pull_request" : "$ENV{TRAVIS_PULL_REQUEST}",
"repo_slug" : "$ENV{TRAVIS_REPO_SLUG}"
}
# This file is part of the dune-xt-common project:
# https://github.com/dune-community/dune-xt-common
# The copyright lies with the authors of this file (see below).
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# Authors:
# Felix Schindler (2016)
# Rene Milk (2015)
string(SUBSTRING "$ENV{TRAVIS_COMMIT}" 0 7 COMMIT_ID)
set(CTEST_SITE "travis")
set(CTEST_BUILD_NAME "$ENV{TRAVIS_BUILD_NUMBER}-${COMMIT_ID}-$ENV{TRAVIS_OS_NAME}-$ENV{CXX}")
set(CTEST_SOURCE_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}")
set(CTEST_BINARY_DIRECTORY "$ENV{DUNE_BUILD_DIR}/dune-xt-common")
configure_file(${CTEST_SOURCE_DIRECTORY}/.travis.cfg.in ${CTEST_BINARY_DIRECTORY}/travis.cfg)
set(CTEST_NOTES_FILES ${CTEST_BINARY_DIRECTORY}/travis.cfg)
find_program(GCOV gcov-4.9)
set(CTEST_COVERAGE_COMMAND ${GCOV})
set(COVERAGE_EXTRA_FLAGS "-l -p")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_BUILD_TYPE}")
set(CTEST_CONFIGURATION_TYPE "Debug")
ctest_start(Continuous)
ctest_configure()
ctest_build()
ctest_test()
if($ENV{CXX} MATCHES "g\\+\\+")
ctest_coverage()
endif()
ctest_submit()
# This file is part of the dune-xt-grid project:
# https://github.com/dune-community/dune-xt-grid
# The copyright lies with the authors of this file (see below).
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# Authors:
# Felix Schindler (2015 - 2016)
# Rene Milk (2015 - 2016)
# Tobias Leibner (2015)
sudo: required
dist: trusty
language: generic
addons:
apt:
sources: &commonsources
packages: &commonpackages
- cmake
- cmake-data
- doxygen
- texlive-base
- python-virtualenv
- libboost1.55-all-dev
- python-pip
- libtbb-dev
- ccache
- libsuitesparse-dev
- lcov
- curl
- ninja-build
- python3-requests
before_install:
- |-
: ${OPTS:="config.opts/travis.ninja"} && export OPTS
- |-
: ${BUILD_CMD:="ninja -k 10000 -j 2"} && export BUILD_CMD
# workaround for https://github.com/travis-ci/travis-ci/issues/5285
- sudo -E apt-get install -y -q python-pip python3-pip
- sudo -E pip3 install virtualenv cpp-coveralls
- sudo -E pip install virtualenv cpp-coveralls
- export PATH=/usr/lib/ccache:$PATH
- cd $HOME
- test -d src || git clone https://github.com/dune-community/dune-xt-super.git src
- cd $HOME/src
- git submodule update --init --recursive
- git submodule status
- export DCTRL_ARG="--builddir=${DUNE_BUILD_DIR} --opts=${OPTS}"
# our local scripts look for an OPTS env entry
- ./local/bin/download_external_libraries.py
- ./local/bin/build_external_libraries.py
# ensures ${MY_MODULE} from travis own checkout is used
- echo removing modules ${MODULES_TO_DELETE}
- rm -rf ${MODULES_TO_DELETE} ${MY_MODULE}
# command to install dependencies
install:
- cd $HOME/src
#- export INST_DCTRL=$HOME/dune/bin/dunecontrol
- export SRC_DCTRL=$PWD/dune-common/bin/dunecontrol
- ${SRC_DCTRL} ${DCTRL_ARG} all
# move my travis checkout into this source tree
- cp -ra ${TRAVIS_BUILD_DIR} .
before_script:
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} configure
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD}
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} test_binaries
script:
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} test
- ${TRAVIS_BUILD_DIR}/bin/upload_test_logs.bash
- PYTHONPATH=$HOME/src/scripts/python/ python3 -c "import travis_report as tp; tp.clang_format_status(\"${TRAVIS_BUILD_DIR}\")"
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} headercheck
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} install | grep -v "Installing"
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} package_source
# runs independent of 'script' failure/success
after_script:
# reset for ctest
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec make clean
- export CTEST_ARG="--output-on-failure -S ${TRAVIS_BUILD_DIR}/.travis.ctest"
# ctest errors on coverage gathering, this should NOT fail our entire build
#- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ctest ${CTEST_ARG} || echo "CTest Failed"
notifications:
email:
on_success: change
on_failure: change
webhooks:
- https://buildtimetrend.herokuapp.com/travis
#after_success:
#- coveralls
branches:
except:
- gh-pages
cache:
directories:
- $HOME/.ccache
env:
global:
- MY_MODULE=dune-xt-grid DUNE_BUILD_DIR=${HOME}/dune_build/ INSTALL_DIR=$HOME/dune CTEST_OUTPUT_ON_FAILURE=1
matrix:
include:
- os: linux
compiler: gcc
addons: &gcc49
apt:
sources:
- *commonsources
- 'ubuntu-toolchain-r-test'
packages:
- *commonpackages
- ['g++-4.9', 'gcc-4.9']
env: CXX=g++-4.9 CC=gcc-4.9
- os: linux
compiler: gcc
addons: *gcc49
env: CXX=g++-4.9 CC=gcc-4.9 MODULES_TO_DELETE="dune-fem dune-pdelab dune-typetree dune-grid dune-istl"
- os: linux
compiler: gcc
addons: *gcc49
env: CXX=g++-4.9 CC=gcc-4.9 MODULES_TO_DELETE="dune-fem dune-pdelab"
- os: linux
compiler: gcc
addons:
apt:
sources:
- *commonsources
- 'ubuntu-toolchain-r-test'
packages:
- *commonpackages
- ['g++-5', 'gcc-5']
env: CXX=g++-5 CC=gcc-5
- os: linux
compiler: clang
addons:
apt:
sources:
- *commonsources
- ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
packages:
- *commonpackages
- ['clang-3.7']
env: CXX=clang++-3.7 CC=clang-3.7
- os: linux
compiler: clang
addons:
apt:
sources:
- *commonsources
- ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
packages:
- *commonpackages
- ['clang-3.7']
env: OPTS=config.opts/travis.make BUILD_CMD="make -k -j2" CXX=clang++-3.7 CC=clang-3.7
#- os: linux
#compiler: clang
#addons:
#apt:
#sources:
#- *commonsources
#- ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
#packages:
#- *commonpackages
#- ['clang-3.8']
#env: CXX=clang++-3.8 CC=clang-3.8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment