Revision f366eb33f9c733384a7fb02f877245a71c343cf6 authored by Konrad Werys on 23 August 2018, 12:09:02 UTC, committed by Konrad Werys on 23 August 2018, 12:09:02 UTC
1 parent f1c0e95
.travis.yml
#------------------------------------#
# OxShmolli2 #
#------------------------------------#
sudo: OFF
language: cpp
os:
- linux
- osx
compiler:
- gcc
# - clang
branches:
# Blacklist the documentation branch
except:
- gh-pages
# Environment variables
env:
# VXL c++11 needs cmake 3.9.5, which is not installed on travis. TODO: fix it
matrix:
- CXX_STANDARD=98
# - CXX_STANDARD=11
global:
- GH_REPO_NAME: OxShmolli2 # used in documentation script
- DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile # used in documentation script
- INPUT_FOR_DOXY: "'. ./app ./lib ./tests'" # used in documentation script
- OUTPUT_FOR_DOXY: "${TRAVIS_BUILD_DIR}/code_docs/${GH_REPO_NAME}" # used in documentation script
- GH_REPO_REF: github.com/MRKonrad/OxShmolli2.git # used in documentation script
- USE_ITK: "OFF"
- EXTENDED_BUILD: "OFF"
- DEPLOY_BUILD: "OFF"
- secure: 4wedfy5OEFLLO3/29WFF8fFE8jOqXDIb8Kc4VOBw2Yrr599NFDpDBgy9dzGtDzvvpkt/hbSh5lSSPB8KzN6+zX8JTJg2LNPmVEfpZILiTOpOKnydLHWWuznMSrtEic1DDGTp30sJXk3JWBKpmAsDMAssM35lwLNIR9BjpKOadACt5FTOvwXneCnbVr8iJ4F38EIInKQYwVhntBiCvcl+YrrLW6zSbJruEBGX1SpRRgQp8DcT9z4fOob0bIl27VFQcenHx694uzv/qIkU7pgfqV9CB3OTNjwsrgM/tY6O903PtXUpE/LA9ZCDj8NdTdOJa5OBBgsUGKu3vcc9qL5oLUKGqpMHInPpIBLDzuGaypMC2Fl675DAxe11EVGgX4ZtQAphdUw0PnFGCr5f8PafaFuKXKq0TpAn9ZO8QH3L5OrRbpLG2QDHcjYnhzyoaCNtNcQS0syPO51auzFdDRKNsq7Yvjph0uYLSlrgK2ZH2HJWeYgmgVKn79KYRmNEHTnHj+RHSnLP4b20SmQM2gOQ6v/+WMlShjgn5uul9k3s76baBrGsNgyHH95/2KG8NiSHVhwQzerY+tCn5aoRrVu+BbNT2IzdHoncf7JvE6CliQpMH/tW4EBrg0ceyvzemzVd7blbIWRRWkYrE6sqFvMOzSx6R8Jd059rEFu6JtEGGgQ=
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
before_install:
- cd ${TRAVIS_BUILD_DIR}
# download ITK
- export USE_ITK="OFF"
- cd ..;
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
curl -L -O https://www.dropbox.com/s/zi7wfc9qev2529d/ITK413_osx_install.zip;
unzip -a -q ITK413_osx_install.zip;
export USE_ITK="ON";
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
curl -L -O https://www.dropbox.com/s/w35r9k376gg1cc3/ITK413_linux_install.zip;
unzip -a -q ITK413_linux_install.zip;
export USE_ITK="ON";
fi
- cd ${TRAVIS_BUILD_DIR};
# condition for the extended build (with coveralls and documentation)
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "g++" ] && [ "$CXX_STANDARD" == "98" ]; then
EXTENDED_BUILD="ON";
fi
# condition for the deployment build
- if [ "$CXX" == "g++" ] && [ "$CXX_STANDARD" == "98" ]; then
export DEPLOY_BUILD="ON";
fi
# install coveralls only in linux g++
- if [ "$EXTENDED_BUILD" == "ON" ]; then
pip install --user cpp-coveralls;
fi
script:
# configure and generate
- cmake . -DUSE_NR2=OFF -DUSE_NR3=OFF -DUSE_PRIVATE_NR2=OFF -DCMAKE_CXX_STANDARD=${CXX_STANDARD} -DUSE_ITK=${USE_ITK}
# add coverage option for coveralls (only in linux g++)
- if [ "$EXTENDED_BUILD" == "ON" ]; then
cmake -DCOVERAGE=1 . ;
fi
# this is make
- make -j8
- make install
# tests. Also needed to get the coverage
- cd install/tests
- ./OxShmolli2Tests
- cd $TRAVIS_BUILD_DIR
after_success:
# Run coverage analysis only in linux g++
- if [ "$EXTENDED_BUILD" == "ON" ]; then
coveralls --root . -E ".*CMakeFiles.*" --exclude CMakeTmp --exclude thirdParty --exclude include --exclude install --exclude CmakeConfigForOxShmolli2.h;
fi
# Generate and deploy documentation only in linux g++
- if [ "$EXTENDED_BUILD" == "ON" ]; then
chmod +x generateDocumentationAndDeploy.sh;
./generateDocumentationAndDeploy.sh;
fi
before_deploy:
- echo "Ready to deploy?"
- export exe_extended_name=OxShmolli2Exe_${TRAVIS_BRANCH}_${TRAVIS_OS_NAME} # just a variable
# Problem: when deploying an executable as it is, somewhere in the process its permission to execute (-x) is lost.
# Solution: zip it and deploy the archive
- mkdir deployment
- cp OxShmolli2Exe ${exe_extended_name}
- cd deployment
- zip -r ${exe_extended_name}.zip ../${exe_extended_name}
- cd ..
deploy:
provider: releases # GitHub
api_key:
secure: 4wedfy5OEFLLO3/29WFF8fFE8jOqXDIb8Kc4VOBw2Yrr599NFDpDBgy9dzGtDzvvpkt/hbSh5lSSPB8KzN6+zX8JTJg2LNPmVEfpZILiTOpOKnydLHWWuznMSrtEic1DDGTp30sJXk3JWBKpmAsDMAssM35lwLNIR9BjpKOadACt5FTOvwXneCnbVr8iJ4F38EIInKQYwVhntBiCvcl+YrrLW6zSbJruEBGX1SpRRgQp8DcT9z4fOob0bIl27VFQcenHx694uzv/qIkU7pgfqV9CB3OTNjwsrgM/tY6O903PtXUpE/LA9ZCDj8NdTdOJa5OBBgsUGKu3vcc9qL5oLUKGqpMHInPpIBLDzuGaypMC2Fl675DAxe11EVGgX4ZtQAphdUw0PnFGCr5f8PafaFuKXKq0TpAn9ZO8QH3L5OrRbpLG2QDHcjYnhzyoaCNtNcQS0syPO51auzFdDRKNsq7Yvjph0uYLSlrgK2ZH2HJWeYgmgVKn79KYRmNEHTnHj+RHSnLP4b20SmQM2gOQ6v/+WMlShjgn5uul9k3s76baBrGsNgyHH95/2KG8NiSHVhwQzerY+tCn5aoRrVu+BbNT2IzdHoncf7JvE6CliQpMH/tW4EBrg0ceyvzemzVd7blbIWRRWkYrE6sqFvMOzSx6R8Jd059rEFu6JtEGGgQ=
file_glob: ON # to use wildcards
file: deployment/*
skip_cleanup: ON
on:
tags: ON
condition: ${DEPLOY_BUILD} == "ON" # I guess I have to pick one compiler
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...