Revision 0f64bd4d449519c67265fd7ec8a2a80305326d38 authored by Layal on 02 August 2018, 22:24:20 UTC, committed by Layal on 02 August 2018, 22:24:20 UTC
1 parent 6682ced
.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:
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
addons:
apt:
sources:
ubuntu-toolchain-r-test;
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
before_install:
- cd ${TRAVIS_BUILD_DIR}
# install coveralls only in linux g++
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "g++" ]; then
pip install --user cpp-coveralls;
fi
script:
# configure and generate
- cmake .
# add coverage option for coveralls (only in linux g++)
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "g++" ]; 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 [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "g++" ]; then
coveralls --root . -E ".*CMakeFiles.*" --exclude thirdParty --exclude CMakeTmp --exclude include --exclude install --exclude CmakeConfigForOxShmolli2.h;
fi
# Generate and deploy documentation only in linux g++
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "g++" ]; 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: ${CXX} == "g++" # I guess I have to pick one compiler
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...