Revision 40b62f75a6ab62728b5e343f2e6a84d6a05e6eda authored by Konrad Werys on 10 August 2018, 15:47:09 UTC, committed by Konrad Werys on 10 August 2018, 15:47:09 UTC
1 parent 9538d78
.travis.yml
#------------------------------------#
# OxShmolli2 #
#------------------------------------#
# TODO: it would be nice to 'addons: apt: sources:' conditional. Unfortunately if (like the one below) does not work:
# if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "g++" ]; then
sudo: false
language: cpp
os:
- linux
- osx
compiler:
- gcc
# - clang
branches:
# Blacklist the documentation branch
except:
- gh-pages
# Environment variables
env:
- CXX_STANDARD=98
- CXX_STANDARD=11
global:
# used in documentation script
- GH_REPO_NAME: OxShmolli2
- DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile
- INPUT_FOR_DOXY: "'. ./app ./lib ./tests'"
- OUTPUT_FOR_DOXY: "${TRAVIS_BUILD_DIR}/code_docs/${GH_REPO_NAME}"
- GH_REPO_REF: github.com/MRKonrad/OxShmolli2.git
- secure: 4wedfy5OEFLLO3/29WFF8fFE8jOqXDIb8Kc4VOBw2Yrr599NFDpDBgy9dzGtDzvvpkt/hbSh5lSSPB8KzN6+zX8JTJg2LNPmVEfpZILiTOpOKnydLHWWuznMSrtEic1DDGTp30sJXk3JWBKpmAsDMAssM35lwLNIR9BjpKOadACt5FTOvwXneCnbVr8iJ4F38EIInKQYwVhntBiCvcl+YrrLW6zSbJruEBGX1SpRRgQp8DcT9z4fOob0bIl27VFQcenHx694uzv/qIkU7pgfqV9CB3OTNjwsrgM/tY6O903PtXUpE/LA9ZCDj8NdTdOJa5OBBgsUGKu3vcc9qL5oLUKGqpMHInPpIBLDzuGaypMC2Fl675DAxe11EVGgX4ZtQAphdUw0PnFGCr5f8PafaFuKXKq0TpAn9ZO8QH3L5OrRbpLG2QDHcjYnhzyoaCNtNcQS0syPO51auzFdDRKNsq7Yvjph0uYLSlrgK2ZH2HJWeYgmgVKn79KYRmNEHTnHj+RHSnLP4b20SmQM2gOQ6v/+WMlShjgn5uul9k3s76baBrGsNgyHH95/2KG8NiSHVhwQzerY+tCn5aoRrVu+BbNT2IzdHoncf7JvE6CliQpMH/tW4EBrg0ceyvzemzVd7blbIWRRWkYrE6sqFvMOzSx6R8Jd059rEFu6JtEGGgQ=
- EXTENDED_BUILD: "FALSE"
- DEPLOY_BUILD: "FALSE"
addons:
apt:
sources:
ubuntu-toolchain-r-test;
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
before_install:
- cd ${TRAVIS_BUILD_DIR}
# condition for the extended build (with coveralls and documentation)
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "g++" ] && [ "CXX_STANDARD" == "11"]; then
EXTENDED_BUILD="TRUE";
fi
# condition for the deployment build
- if [ "$CXX" == "g++" ] && [ "CXX_STANDARD" == "11"]; then
DEPLOY_BUILD="TRUE";
fi
# install coveralls only in linux g++
- if [ "$EXTENDED_BUILD" == "TRUE" ]; 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}
# add coverage option for coveralls (only in linux g++)
- if [ "$EXTENDED_BUILD" == "TRUE" ]; 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" == "TRUE" ]; 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" == "TRUE" ]; 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: true # to use wildcards
file:
- deployment/*
skip_cleanup: true
on:
tags: true
condition: ${DEPLOY_BUILD} == "TRUE" # I guess I have to pick one compiler
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...