-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
236 lines (197 loc) · 7.22 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# 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
#
# Try 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
matrix:
exclude:
- os: osx
compiler: gcc
# 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
# 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;
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
- if [[ $LINUX && $CLANG ]]; then
sudo apt-get install -qq doxygen texlive 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;
pip install matplotlib;
fi
# Use tap for ADMS
- if [[ $OSX ]]; then
brew tap guitorri/tap;
brew install adms;
fi
# Install official Qt (184MB)
# Homebrew Qt binary has no Qt3Support (build from souce takes hours)
- if [[ $OSX ]]; then
QT_VERSION=4.8.6-1 ;
curl -L -O http://download.qt.io/archive/qt/4.8/4.8.6/qt-opensource-mac-${QT_VERSION}.dmg ;
hdiutil mount qt-opensource-mac-${QT_VERSION}.dmg ;
sudo installer -pkg /Volumes/Qt\ 4.8.6/Qt.mpkg -target / ;
hdiutil unmount /Volumes/Qt\ 4.8.6 ;
fi
# Grab tip of Qucs-Test
- git clone --depth=1 --branch=master git://github.com/Qucs/qucs-test.git qucs-test
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
# 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.4.tar.gz -O /tmp/adms-2.3.4.tar.gz;
tar -xzvf /tmp/adms-2.3.4.tar.gz;
cd adms-2.3.4 && ./configure --prefix=/usr && make && sudo make install && cd ..;
fi
# Check ADMS
- which admsXml && admsXml --version
# Build Qucs GUI components
- cd qucs
- ./autogen.sh
- ./configure --enable-maintainer-mode --prefix=/usr --disable-dependency-tracking
- make && sudo make install
- cd ..
# Test qucs installation
- qucs -v
# Build Qucs-core
- cd qucs-core
- ./bootstrap.sh
# Only collect coverage for GCC (LINUX)
# `make check-code-coverage` is failing due to old lcov
- if [[ $GCC ]]; then
./configure --enable-maintainer-mode --prefix=/usr --with-mkadms=`which admsXml` --disable-dependency-tracking --enable-debug --enable-code-coverage --with-gcov=gcov-4.8 --with-gtest;
make && sudo make install && make check;
fi
- if [[ $CLANG ]]; then
./configure --enable-maintainer-mode --prefix=/usr --with-mkadms=`which admsXml` --disable-dependency-tracking --with-gtest;
make && sudo make install && make check;
fi
- cd ..
# Test qucsator installation
- qucsator -v
# Run Qucs-Test suite and collect coverage
# Need to be on `script` section to raise error as failure
# Use qucsator in-tree to generate gcov coverage for GCC (LINUX)
# Testsuite
- if [[ $LINUX ]]; then
cd qucs-test && python run.py --prefix $HOME/build/Qucs/qucs/qucs-core/src/ --qucsator --exclude skip.txt && cd -;
fi
- if [[ $OSX ]]; then
cd qucs-test && python run.py --prefix $HOME/build/Qucs/qucs/qucs-core/src/ --qucsator --exclude skip_OSX.txt && cd -;
fi
# Qucs equation system
# disabled, need fix on matrix parser
- cd qucs-test && python run_equations.py --prefix $HOME/build/Qucs/qucs/qucs-core/src/ && cd -
# Run Doxygen for qucs-GUI and qucs-core
- if [[ $LINUX && $CLANG && $MASTER ]]; then
TOP=`pwd`;
cd qucs/contrib/doxygen/;
VERSION=$(cat ../../VERSION);
sed "s/0\.\0\.18/${VERSION}/g" doxygen.cfg > temp;
mv temp doxygen.cfg;
doxygen doxygen.cfg;
cd ${TOP};
cd qucs-doc;
./autogen.sh;
cd doxygen;
make doxygen;
cd ${TOP};
fi
after_success:
# Send coverage data to Coveralls
- if [[ $GCC ]]; then
coveralls --exclude qucs-core/src/components/verilog --exclude examples --exclude qucs --exclude qucs-doc --exclude adms-2.3.4 --gcov-options '\-lp' --gcov gcov-4.8;
fi
# Publish HTML into Qucs/qucs-doxygen repo
# See: http://awestruct.org/auto-deploy-to-github-pages/
# Clone repo, put the html pages on its gh_pages branch
# Credentials taken from the secure environment variables GIT_NAME, GIT_EMAIL and GH_TOKEN
- if [[ $LINUX && $CLANG && $MASTER ]]; then
git config --global user.name ${GIT_NAME} ;
git config --global user.email ${GIT_EMAIL} ;
git clone https://github.com/Qucs/qucs-doxygen.git qucs-doxygen ;
cd qucs-doxygen ;
git checkout gh-pages ;
git rm -r * ;
mv ../qucs/contrib/doxygen/html/ qucs/ ;
mv ../qucs-doc/doxygen/html/ qucs-core/ ;
git add --all . ;
git commit -m "Auto-updating Doxygen developer documentation" ;
git push https://${GH_TOKEN}@github.com/Qucs/qucs-doxygen gh-pages ;
fi