-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
158 lines (156 loc) · 9.25 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
language: cpp
env:
global:
# SECRET_KEY, used to push docs to github and to init coverity scans
- secure: "i2f2UVDnyHT/9z0U3XvgTj8eDERvnc1Wk7HpseEjb75JwGzqn/2R+RKHmoSrwK3hFgij2IMxZL19XtHFwMz9t5A/huAAKD74KMMI/QpeZEJ/sjT3CTLcE9HEVDdJOjc7dfLRxb2hZtgvx8clZIMrpeUdPhci8openff30KvXVbg="
# These linux-specific parameters could be moved into matrix.include items, but that's lots of repetition
sudo: required
dist: trusty
matrix:
fast_finish: true
include:
- os: linux
compiler: gcc
env: BUILD_TYPE=normal BUILD_WITH=cmake
- os: linux
compiler: gcc
env: BUILD_TYPE=normal BUILD_WITH=autoconf
- os: linux
compiler: gcc
env: BUILD_TYPE=coverage BUILD_WITH=autoconf
- os: linux
compiler: clang
env: BUILD_TYPE=asan BUILD_WITH=cmake
- os: linux
compiler: clang
env: BUILD_TYPE=tsan BUILD_WITH=cmake
- os: osx
osx_image: xcode6.4 # OS X 10.10
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=cmake
- os: osx
osx_image: xcode6.4 # OS X 10.10
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=autoconf
- os: osx
osx_image: xcode7.3 # OS X 10.11
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=cmake
- os: osx
osx_image: xcode7.3 # OS X 10.11
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=autoconf
- os: osx
osx_image: xcode8.2 # macOS 10.12
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=cmake
- os: osx
osx_image: xcode8.2 # macOS 10.12
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=autoconf
- os: linux
compiler: gcc
env: BUILD_TYPE=tarball BUILD_WITH=cmake
- os: linux
compiler: gcc
env: BUILD_TYPE=tarball BUILD_WITH=autoconf
before_install:
- "echo os: [$TRAVIS_OS_NAME] build: [$BUILD_TYPE]"
- if [[ "$BUILD_TYPE" == "normal" ]]; then export CFGFLAGS= MYCXXFLAGS= MYLDFLAGS=; fi
- if [[ "$BUILD_TYPE" == "tarball" ]]; then export CFGFLAGS="--with-gtest=/usr/src/gtest --with-gmock=/usr/src/gmock --disable-swig" MYCXXFLAGS= MYLDFLAGS=; fi
- if [[ "$BUILD_TYPE" == "asan" ]]; then export CFGFLAGS=--enable-debug MYCXXFLAGS="-fsanitize=address -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIE" MYLDFLAGS="-fsanitize=address -pie"; fi
- if [[ "$BUILD_TYPE" == "tsan" ]]; then export CFGFLAGS=--enable-debug MYCXXFLAGS="-fsanitize=thread -O1 -fPIE" MYLDFLAGS="-fsanitize=thread"; fi
- if [[ "$BUILD_TYPE" == "coverage" ]]; then export CFGFLAGS="--enable-debug --disable-perl --disable-python" MYCXXFLAGS=--coverage MYLDFLAGS=--coverage DISABLED_ZNC_PERL_PYTHON_TEST=1; fi
- if [[ "$BUILD_WITH" == "cmake" ]]; then export CFGSUFFIX=.sh UNITTEST=unittest INTTEST=inttest; else export CFGSUFFIX= UNITTEST=test INTTEST=test2; fi
# UBSan randomly crashes clang, and very often :(
# CFGFLAGS=--enable-debug MYCXXFLAGS="-fsanitize=undefined -O1 -fPIE -fno-sanitize-recover" MYLDFLAGS="-fsanitize=undefined -pie -fno-sanitize-recover"
- if [[ "$TRAVIS_REPO_SLUG" == "znc/znc" && "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "master" ]]; then openssl aes-256-cbc -d -in .travis-github.enc -out ~/znc-github-key -k ${SECRET_KEY}; fi
- export SECRET_KEY=no
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cat /proc/cpuinfo /proc/meminfo; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then lsb_release -a; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:teward/swig3.0; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:beineri/opt-qt551-trusty; fi # default qt5.2 from trusty doesn't support QByteArray::toStdString()
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_TYPE" == "tarball" ]]; then sudo add-apt-repository -y ppa:ostogvin/tjo-develop; fi # gtest+gmock
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_WITH" == "cmake" ]]; then sudo add-apt-repository -y ppa:george-edison55/cmake-3.x; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libperl-dev python3-dev tcl-dev libsasl2-dev libicu-dev swig3.0 doxygen graphviz qt55base python3-yaml libboost-locale-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_TYPE" == "tarball" ]]; then sudo apt-get install -y google-mock libgtest-dev; fi
# Clang 3.5 TSan is broken on Travis Ubuntu 14.04. Clang 3.8 seems to work, but only without -pie (https://github.com/google/sanitizers/issues/503)
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_TYPE" == "tsan" ]]; then sudo apt-get install -y clang-3.8; export CC=clang-3.8 CXX=clang++-3.8; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt55/bin/qt55-env.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_WITH" == "cmake" ]]; then sudo apt-get install -y cmake; fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_TYPE" == "coverage" ]]; then
sudo apt-get install -y lcov
gem install coveralls-lcov
lcov --directory . --zerocounters
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sw_vers; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sysctl -a | grep cpu; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sysctl -a | grep mem; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew config; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install swig python3 icu4c jq openssl qt5 gettext; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$BUILD_WITH" == "cmake" ]]; then brew outdated cmake || brew upgrade cmake; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew info --json=v1 --installed | jq .; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PKG_CONFIG_PATH="$(brew --prefix qt5)/lib/pkgconfig:$PKG_CONFIG_PATH"; fi
- "echo pkg-config path: [$PKG_CONFIG_PATH]"
script:
- if [[ "$BUILD_TYPE" == "tarball" ]]; then ./make-tarball.sh --nightly znc-git-2015-01-16 /tmp/znc-tarball.tar.gz; fi
- if [[ "$BUILD_TYPE" == "tarball" ]]; then cd /tmp; tar xvf znc-tarball.tar.gz; fi
- if [[ "$BUILD_TYPE" == "tarball" ]]; then cd /tmp/znc-git-2015-01-16; fi
- if [[ "$BUILD_TYPE" != "tarball" && "$BUILD_WITH" != "cmake" ]]; then ./bootstrap.sh; fi
- mkdir build
- cd build
- ../configure$CFGSUFFIX --enable-perl --enable-python --enable-tcl --enable-cyrus --enable-charset $CFGFLAGS CXXFLAGS="$CXXFLAGS $MYCXXFLAGS" LDFLAGS="$LDFLAGS $MYLDFLAGS"
- if [[ "$BUILD_WITH" == "cmake" ]]; then cmake --system-information; else cat config.log; fi
- make VERBOSE=1
- make VERBOSE=1 $UNITTEST
- sudo make install
- make VERBOSE=1 $INTTEST
- cd "$TRAVIS_BUILD_DIR"
- /usr/local/bin/znc --version
after_success:
- test -r "$TRAVIS_BUILD_DIR/.travis_after_all.py" && python "$TRAVIS_BUILD_DIR/.travis_after_all.py" || echo No .travis_after_all.py found
- test -r .to_export_back && echo $(cat .to_export_back) || echo No .to_export_back found
- export DUMMY_VAR=dummy-value $(cat .to_export_back)
- |
if [[ "$BUILD_TYPE" == "coverage" ]]; then
bash <(curl -s https://codecov.io/bash)
cd build/
ls -l /usr/bin|grep gcov
lcov --directory . --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-4.8 || exit 1
lcov --remove coverage.info '/usr/*' 'test/*' --output-file coverage.info || exit 1
lcov --list coverage.info || exit 1
coveralls-lcov coverage.info || exit 1
cd ..
else
echo "No coverage for this build"
fi
- |
if [ "$BUILD_LEADER" == "YES" ] && [ "$BUILD_AGGREGATE_STATUS" == "others_succeeded" ] && [ "$TRAVIS_REPO_SLUG" == "znc/znc" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
echo "All builds passed!"
mkdir -p ~/.ssh
chmod 0600 ~/znc-github-key
cp .travis.ssh ~/.ssh/config
git config --global user.email "[email protected]"
git config --global user.name "znc-travis"
./.travis-generate-docs.sh
./.travis-coverity-scan.py
else
echo "Not leader"
fi
notifications:
irc:
channels:
# irc.freenode.net #znc-dev (via ZNC-Linker)
- secure: "h06+4KSb2hM1BJWQqsrurqIU3F6fK55ATCRO7/t3FK6tbSHduywfbfcJmkPUD08lATCWaKm07afbVQPoU3dc6B+0rLvlvGmOoQlB6OxiROq+fc+gXXBwpnBJ1HKwmBrEActqkyZ8GWTVLeIhhR5xYVVZZv7AZ6jzCgpfyiXPink="
on_success: always
on_failure: always
skip_join: true
nick:
secure: "UGh4tbpviOD438ZOi+I3W6eh+R68tbpNIJc0uf5FK6xhHLLo3FRIozkL7CRVA3TxYHuahwerZpBR4TbAyc+gVUn5YRHjdsMIPHPCW/kh8ZkEJKNYXkHerbH0Np6PRLI58l6lmjMQbiWn+lqlgsHdVsyknqxDwoj7JDieE+5X53c="
password:
secure: "B2F1coXddY1H0/v3OkiPnUlbnSN/wapRay1PUbN8tvm7IDYOjpivhsRk+31/4pauKOoF4AZhzP6F9mhGxkGYBQ23Td5Y6+uZeaDnTYnXjs8fbV0QY1Mx+2EkHDSkLQoYlYr06pK9q55X3uLK1zTz5Ye0Po3KzbeydxOyyG+xBGg="