-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy path.travis.yml
More file actions
127 lines (116 loc) · 4.61 KB
/
Copy path.travis.yml
File metadata and controls
127 lines (116 loc) · 4.61 KB
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
language: cpp
sudo: false
matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
packages: ['libgtkmm-2.4-dev', 'gerbv', 'moreutils', 'autopoint']
env: COMPILER=g++-4.8 BOOST=1_56_0 SKIP_GERBERIMPORTER_TESTS=1
- os: linux
compiler: gcc
addons:
apt:
packages: ['libgtkmm-2.4-dev', 'gerbv', 'moreutils', 'autopoint']
env: COMPILER=g++-4.8 BOOST=1_66_0
- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7', 'libgtkmm-2.4-dev', 'gerbv', 'moreutils', 'autopoint']
env: COMPILER=g++-7 BOOST=1_56_0 SKIP_GERBERIMPORTER_TESTS=1
- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7', 'libgtkmm-2.4-dev', 'lcov', 'ggcov', 'autopoint', 'automake', 'moreutils']
env: COMPILER=g++-7 BOOST=1_66_0 ENABLE_CODE_COVERAGE="--enable-code-coverage"
- os: linux
compiler: clang
addons:
apt:
packages: ['libgtkmm-2.4-dev', 'gerbv', 'moreutils', 'autopoint']
env: COMPILER=clang++ BOOST=1_56_0 SKIP_GERBERIMPORTER_TESTS=1
- os: linux
compiler: clang
addons:
apt:
packages: ['libgtkmm-2.4-dev', 'gerbv', 'moreutils', 'autopoint']
env: COMPILER=clang++ BOOST=1_66_0
- os: osx
compiler: gcc
env: COMPILER=g++ BOOST=1_56_0 SKIP_GERBERIMPORTER_TESTS=1
- os: osx
compiler: clang
env: COMPILER=clang++ BOOST=1_56_0 SKIP_GERBERIMPORTER_TESTS=1
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update &&
brew reinstall -s libtool &&
brew install boost@1.60 &&
brew install gtkmm gerbv moreutils &&
brew install librsvg &&
export BOOST_DIR="/usr/local/opt/boost@1.60";
fi
- >
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
for i in {1..5}; do
wget -T5 -t1 -O "boost_${BOOST}_amd64.tar.xz" "https://github.com/eyal0/pcb2gcode/releases/download/1.3.3/boost_${BOOST}_amd64.tar.xz" && break;
done &&
tar xJf "boost_${BOOST}_amd64.tar.xz" &&
export BOOST_DIR="$PWD/boost"
fi
- >
if [ "$SKIP_GERBERIMPORTER_TESTS" != "1" ]; then
mkdir .local &&
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PWD/.local/lib/pkgconfig &&
git clone git://git.geda-project.org/gerbv.git &&
pushd gerbv &&
git checkout 061240c &&
sh autogen.sh &&
CFLAGS=-std=gnu99 ./configure --disable-update-desktop-database --prefix=$PWD/../.local &&
make -j 2 &&
make install &&
popd &&
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/gerbv/src/.libs;
fi
- >
if [ "${ENABLE_CODE_COVERAGE}" ]; then
pip install --user cpp-coveralls colour_runner unittest2 termcolor concurrencytest in_place;
fi
- >
for i in {1..5}; do
wget -T5 -t1 -O "parallel-latest.tar.bz2" "http://ftpmirror.gnu.org/parallel/parallel-latest.tar.bz2" && break;
done &&
tar xjf "parallel-latest.tar.bz2" &&
export CXX="$COMPILER"
script:
- autoreconf -fvi || travis_terminate 1
- >
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
./configure --disable-dependency-tracking --disable-silent-rules "${ENABLE_CODE_COVERAGE}" --with-boost="$BOOST_DIR";
fi || travis_terminate 1
- >
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
./configure --disable-dependency-tracking --disable-silent-rules --with-boost="$BOOST_DIR" --enable-static-boost "${ENABLE_CODE_COVERAGE}";
fi || travis_terminate 1
- chronic make -j 2 || travis_terminate 1
- pushd testing/gerbv_example/ || travis_terminate 1
- ARGS='--bridges=0.5 --bridgesnum=2 --zbridges=-0.6 --al-front=true --al-back=true --al-probefeed=100 --al-x=15.0000 --al-y=15.0000 --tile-x=3 --tile-y=2' || travis_terminate 1
- >
if [ "${BOOST}" != "1_56_0" ]; then # If the version of boost is modern then
export VECTORIAL="--vectorial=true"; # always use vectorial because all examples should work with modern boost
fi || travis_terminate 1
- ls | ../../parallel-*/src/parallel -j 2 --halt soon,fail=1 "pushd {}; echo 'Running on {}' ; ../../../pcb2gcode ${VECTORIAL} || exit ; popd" || travis_terminate 1
- popd || travis_terminate 1
- lcov --directory . -z || true #Ignore errors
- VERBOSE=1 SKIP_GERBERIMPORTER_TESTS_PNG=1 make -j 2 check || travis_terminate 1
- if [ "${ENABLE_CODE_COVERAGE}" ]; then ./integration_tests.py; fi || travis_terminate 1
after_success:
- >
if [ "${ENABLE_CODE_COVERAGE}" ]; then
coveralls --verbose --gcov gcov-7 --gcov-options '\-lpr' -E "^${PWD}/(boost|gerbv|.local)/.*" -E ".*_tests.cpp";
fi