From c361b64096c75a6d65d4234601c83ff381198eba Mon Sep 17 00:00:00 2001 From: fabien Date: Wed, 26 Dec 2018 16:19:25 -0600 Subject: Travis implementation allowing to build four targets on change of master or a matching pattern of feature/*. This implementation differs from existing fltk-test and also gitlab implementation : - minimum, fast light implementation: stripoped all unused constructions compared to other implementations - supports successful builds of four targets (linu, osx and then gcc and clang for each of them) - uses before_script instead of before_install - uses after_success for building documentation, instead of building always if error - only builds documentation on linux targets for now (can easily change if future) --- .travis.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..981dcaea5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,53 @@ +sudo: required +dist: trusty +cache: ccache + +language: + - c++ +# - objective-c + +os: + - linux + - osx + +compiler: + - gcc + - clang + +branches: + only: + - master + - /^feature.*$/ + +before_script: + - | + if [ $TRAVIS_OS_NAME == linux ]; then + sudo apt-get update -q + sudo apt-get install -y libxinerama-dev libxcursor-dev libasound2-dev + sudo apt-get install -y doxygen + elif [ $TRAVIS_OS_NAME == osx ]; then + brew install ccache # need to install on OSX + export PATH="/usr/local/opt/ccache/libexec:$PATH" + brew install doxygen + fi + +script: + - | + autoconf + ./configure + make + +after_success: + - | + if [ $TRAVIS_OS_NAME == linux ]; then + doxygen --version + cd documentation + make html + cd - + fi + +notifications: + email: + recipients: + - fabien@onepost.net + -- cgit v1.2.3 From 8c44c9a6b15b077f418269465bf88420d2d2f043 Mon Sep 17 00:00:00 2001 From: fab672000 Date: Thu, 27 Dec 2018 21:47:23 -0600 Subject: As requested implement cmake builds and also implement matrix customization to use a static analyzer and also doc gen in only one target to avoid having too many targets --- .travis.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 981dcaea5..9d8a45160 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,17 @@ compiler: - gcc - clang +env: + - | + ANALYZE=false + DOC=false + +matrix: + include: + os: linux + compiler: clang + env: ANALYZE=true DOC=true + branches: only: - master @@ -33,13 +44,23 @@ before_script: script: - | - autoconf - ./configure - make + if [ $ANALYZE = "false" ]; then + autoconf + ./configure + make + mkdir cmake-build + cmake -G "Unix Makefiles" -S . -B"./cmake-build" + cd cmake-build + make + else + scan-build cmake -G "Unix Makefiles" + scan-build --status-bugs -v + make + fi after_success: - | - if [ $TRAVIS_OS_NAME == linux ]; then + if [ $DOC = "true" ]; then doxygen --version cd documentation make html @@ -50,4 +71,4 @@ notifications: email: recipients: - fabien@onepost.net - + \ No newline at end of file -- cgit v1.2.3