-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
237 lines (201 loc) · 7.2 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
#
# 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
dist: trusty
virtualenv:
system_site_packages: true
cache:
apt: true
ccache: true
directories:
- $HOME/Library/Caches/Homebrew
# packages required by all Linux builds
# additional packages are defined in the matrix, depending on needs
addons:
apt:
packages: &native_deps
- gperf
- latex2html
- octave
- doxygen # add packages for Doxygen and qucs-doc PDF build
- texlive
- texlive-math-extra
- texlive-science
- transfig
- gnuplot
- texlive-publishers
- graphviz
- texlive-font-utils
- ps2eps
- pgf
- python-tk
matrix:
include:
- os: linux
compiler: gcc
env: BUILD=cmake
addons:
apt:
packages:
- *native_deps
- os: linux
compiler: gcc
env: BUILD=autotools
addons:
apt:
packages:
- *native_deps
- lcov # lcov is required by configure, only gcov really needed thou
- python-tk
- os: linux
compiler: clang
env: BUILD=autotools
addons:
apt:
packages:
- *native_deps
- os: osx
# Qt 4.8.7 official installer works up to OSX 10.10 or xcode6.4
# Use bottle (with Qt3Support) from cartr/qt4
osx_image: xcode11.3
compiler: clang
env: BUILD=autotools
addons:
homebrew:
update: true # remove once Travis bug is fixed: https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296
taps:
- cartr/qt4
- guitorri/tap
packages:
- flex
- bison
- qt@4 # from tap
- adms # from tap
- python@3
- ccache
# 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 [[ $BUILD == autotools ]]; then AUTOTOOLS=true; fi
- if [[ $BUILD == cmake ]]; then CMAKE=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
# python3
- if [[ $LINUX ]]; then pyenv global 3.6; fi
#- if [[ ! $OSX ]]; then
# source .travis_check.sh $TRAVIS_OS_NAME;
# fi
install:
# Setup Linux
# Set up for Coveralls for GCC (LINUX) only
- if [[ $GCC ]]; then pip3 install --user cpp-coveralls --quiet; fi
# Qucs-Test uses Numpy to compare results
- if [[ $LINUX ]]; then pip3 install --user --only-binary=numpy,matplotlib numpy matplotlib --quiet; fi
# Setup OSX
# Installed already: autoconf automake libtool pkg-config
- if [[ $OSX ]]; then
export PATH="/usr/local/opt/flex/bin:$PATH";
export PATH="/usr/local/opt/bison/bin:$PATH";
pip3 install matplotlib;
brew install ccache;
export PATH="/usr/local/opt/ccache/libexec:$PATH";
fi
before_script:
- ccache --version
- ccache --zero-stats
script:
- python3 --version
- pip3 --version
- uname -a
- $CXX --version
- awk --version | head -n1
- autoconf --version
- automake --version
- which flex && flex --version
- which bison && bison --version
# use gcov matched to GCC
- if [[ $GCC && $AUTOTOOLS ]]; then which gcov-4.8 && gcov-4.8 --version; fi
- if [[ $GCC && $AUTOTOOLS ]]; then lcov --version; fi
- pip3 list --format=columns # List installed packages
- pwd
- ls
- if [[ $LINUX && $CLANG ]]; then
ls -trla /usr/lib/ccache;
fi
# For some reason clang compiler toolchain installation in Ubuntu does not have symlink in the ccache symlinks directory, so workaround it
- if [[ $LINUX && $CLANG ]]; then
ln -s $(which ccache) $HOME/clang && ln -s $(which ccache) $HOME/clang++ && export PATH=$HOME:$PATH;
fi
# fetch gtest...
- wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz -O /tmp/gtest.tar.gz --quiet
- 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)
# install locally to avoid using sudo, add local bin/ to PATH so the Qucs configure can find it
- 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 --quiet || travis_terminate 1;
tar -xzvf /tmp/adms-2.3.6.tar.gz;
cd adms-2.3.6 && ./configure --prefix=$HOME && make && make install && cd .. || travis_terminate 1;
export PATH=$HOME/bin:$PATH;
fi
# Check available tools
- which admsXml && admsXml --version
# enable parallel make after building ADMS
- export MAKEFLAGS="-j2"
# run all checks
- ./bootstrap
- if [[ $OSX ]]; then
./configure --disable-dependency-tracking --with-gtest=/tmp/gtest --disable-doc PYTHON=python3 || travis_terminate 1;
make || travis_terminate 1;
make qucscheck PYTHON=python3 || travis_terminate 1;
fi
# clang 5.0.0 complains a lot about unused command line arguments
# set CXXFLAGS also in 'make distcheck' as specifying DISTCHECK_CONFIGURE_FLAGS will retrigger configure
- if [[ $LINUX && $AUTOTOOLS && $CLANG ]]; then
./configure CXXFLAGS="-Wno-unused-command-line-argument" --disable-dependency-tracking --with-gtest=/tmp/gtest --enable-doc || travis_terminate 1;
make distcheck DISTCHECK_CONFIGURE_FLAGS="CXXFLAGS=-Wno-unused-command-line-argument --with-gtest=/tmp/gtest --enable-doc" || travis_terminate 1;
fi
- if [[ $LINUX && $AUTOTOOLS && $GCC ]]; then
./configure --disable-dependency-tracking --with-gtest=/tmp/gtest --disable-doc || travis_terminate 1;
make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-gtest=/tmp/gtest --disable-dependency-tracking --disable-doc" || travis_terminate 1;
fi
# with cmake build only
- if [[ $CMAKE ]]; then
mkdir build;
cd build;
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME || travis_terminate 1;
make || travis_terminate 1;
make test || travis_terminate 1;
make install || travis_terminate 1;
export PATH=$HOME/bin:$PATH;
qucs -v || travis_terminate 1;
qucsator -v || travis_terminate 1;
fi
- echo $TRAVIS_BRANCH
# incomplete
- echo incomplete stuff, $TRAVIS_BRANCH
- if [[ $TRAVIS_BRANCH == develop ]] ; then
echo developmentstuff...;
fi
- ccache --show-stats