forked from Qucs/qucs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
191 lines (161 loc) · 5.53 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# This script sets up Travis CI with the following matrix:
#
# linux: gcc , make check, qucs-test, gcov, coveralls integration
# linux: clang, make check, qucs-test, doxygen deploy
# osx: clang, make check, qucs-test
#
# The matrix tries to balance the run time of the instances instead of
# creating new instances for shorter jobs.
#
# Most time consuming tasks:
# - setup of gcc
# - gcov data collection
# - install Qt on OSX
# - doxygen build (master only)
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
python:
- "2.7"
virtualenv:
system_site_packages: true
# Force OSX 10.10 as Qt 4.8.7 installer does not work with OSX 10.11
osx_image: xcode6.4
matrix:
exclude:
- os: osx
compiler: gcc
addons:
apt:
packages:
- octave
# Set secure environment with encrypted string containing GIT_NAME, GIT_EMAIL and GH_TOKEN
env:
global:
- secure: "HfplEtCmFfgmKIKWfwe/Pw+BZcciFiIfw5gP/nF7IRVDSIjxOzwBHC+E/TyayR1iRmp3dHs6/fOrLFFNWJZzzH/qdmxGybrvECkgp5oF2ho6paAa3zcdTXan6r0+ye4JV20n6pqBtOM5IS3eQv1eFc81lTa80hzBiPQfEp3tW9w="
before_install:
# Set variables for readability.
- if [[ $TRAVIS_OS_NAME == linux ]]; then LINUX=true; fi
- if [[ $TRAVIS_OS_NAME == osx ]]; then OSX=true; fi
- if [[ $CC == gcc ]]; then GCC=true; fi
- if [[ $CC == clang ]]; then CLANG=true; fi
- if [[ $TRAVIS_BRANCH == master ]] ; then MASTER=true; fi
- which $CC
# workaround clang not system wide, fail on sudo make install for adms
- export CC=`which $CC`
# Set xvfb for headless qucs GUI test
- "export DISPLAY=:99.0"
- if [[ $LINUX ]]; then sh -e /etc/init.d/xvfb start; fi
install:
# Setup Linux
# Set package repository for g++4.8, newer GNU tools
- if [[ $LINUX ]]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo add-apt-repository -y ppa:dns/gnu;
fi
# Install dependencies
- if [[ $LINUX ]]; then
sudo apt-get update -qq;
sudo apt-get install build-essential;
sudo apt-get install libqt4-dev libqt4-qt3support;
sudo apt-get install automake libtool gperf flex bison;
sudo apt-get install latex2html;
fi
# We want to compile with g++ 4.8 when rather than the default g++
- if [[ $LINUX && $GCC ]]; then
sudo apt-get install -qq gcc-4.8 g++-4.8;
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90;
fi
# Set up for Coveralls for GCC (LINUX) only
# lcov is required by configure, only gcov really needed thou
- if [[ $GCC ]]; then
sudo apt-get install lcov ;
sudo pip install cpp-coveralls ;
fi
# Set up for Doxygen and qucs-doc PDF build
- if [[ $LINUX && $CLANG ]]; then
sudo apt-get install -qq doxygen texlive texlive-math-extra texlive-science transfig gnuplot texlive-publishers graphviz ;
fi
# Qucs-Test uses Numpy to compare results
- if [[ $LINUX ]]; then sudo apt-get install -qq python-numpy; fi
- if [[ $LINUX ]]; then sudo apt-get install -qq python-matplotlib; fi
# Setup OSX
# Installed already: autoconf automake libtool pkg-config
- if [[ $OSX ]]; then
brew update;
brew install flex;
brew link --force flex;
brew install bison;
brew link --force bison;
brew install python;
pip install matplotlib;
fi
# Use tap for ADMS
- if [[ $OSX ]]; then
brew tap guitorri/tap;
brew install adms;
fi
# Install official Qt (185MB)
# Homebrew Qt binary has no Qt3Support (build from souce takes hours)
- if [[ $OSX ]]; then
QT_VERSION=4.8.7 ;
curl -L -O http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-opensource-mac-${QT_VERSION}.dmg ;
hdiutil mount qt-opensource-mac-${QT_VERSION}.dmg ;
sudo installer -pkg /Volumes/Qt\ 4.8.7/Qt.mpkg -target / ;
hdiutil unmount /Volumes/Qt\ 4.8.7 ;
fi
script:
- uname -a
- $CXX --version
- autoconf --version
- automake --version
- which flex && flex --version
- which bison && bison --version
# use gcov matched to GCC
- if [[ $GCC ]]; then which gcov-4.8 && gcov-4.8 --version; fi
- if [[ $GCC ]]; then lcov --version; fi
- python --version
- python -c "import numpy; print numpy.__version__"
- pwd
- ls
# fetch gtest...
- wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz -O /tmp/gtest.tar.gz
- mkdir /tmp/gtest
- tar --strip-components=1 -C /tmp/gtest -xvf /tmp/gtest.tar.gz
# Build ADMS from release (avoid need of Perl and its modules)
- if [[ $LINUX ]]; then
wget http://sourceforge.net/projects/mot-adms/files/adms-source/2.3/adms-2.3.6.tar.gz -O /tmp/adms-2.3.6.tar.gz;
tar -xzvf /tmp/adms-2.3.6.tar.gz;
cd adms-2.3.6 && ./configure --prefix=/usr && make && sudo make install && cd ..;
fi
# Check available tools
- which admsXml && admsXml --version
# run all checks
- ./bootstrap
- CONFIGURE_FLAGS=--disable-doc
- if [[ $LINUX && $CLANG ]]; then
CONFIGURE_FLAGS="";
fi
- DISTCHECK_CONFIGURE_FLAGS="--with-gtest=/tmp/gtest --disable-dependency-tracking --disable-doc"
- if [[ $LINUX && $CLANG ]]; then
DISTCHECK_CONFIGURE_FLAGS="--with-gtest=/tmp/gtest --enable-doc";
fi
- echo ${CONFIGURE_FLAGS}
- echo ${DISTCHECK_CONFIGURE_FLAGS}
- ./configure --disable-dependency-tracking --with-gtest=/tmp/gtest ${CONFIGURE_FLAGS}
- if [ "$OSX" = true ]; then
make;
make qucscheck;
else
make distcheck DISTCHECK_CONFIGURE_FLAGS="${DISTCHECK_CONFIGURE_FLAGS}";
fi
- echo $TRAVIS_BRANCH
# incomplete
- echo $TRAVIS_BRANCH
- if [[ $TRAVIS_BRANCH == develop ]] ; then
echo developmentstuff...;
fi