summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml134
1 files changed, 90 insertions, 44 deletions
diff --git a/.travis.yml b/.travis.yml
index 1fda1449..93e59131 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,58 +1,104 @@
1sudo: required
2dist: trusty
3language: c 1language: c
4compiler: 2compiler:
5 - gcc 3 - gcc
6 - clang 4 - clang
7 5
6addons:
7 apt:
8 sources:
9 - avsm
10 packages:
11 - check
12 - libvpx-dev
13 - opam
14
15cache:
16 directories:
17 - $HOME/cache
18
8before_script: 19before_script:
9 - sudo add-apt-repository ppa:avsm/ocaml42+opam12 -y 20 - pushd ..
10 - sudo apt-get update -qq 21 - CACHE_DIR=$HOME/cache
11 - sudo apt-get install ocaml opam astyle -qq 22 - export OPAMROOT=$CACHE_DIR/.opam
12 - sudo apt-get install libconfig-dev libvpx-dev libopus-dev check -qq 23 - export PKG_CONFIG_PATH=$CACHE_DIR/lib/pkgconfig
13 # build apidsl 24 # Set up opam.
14 - git clone https://github.com/iphydf/apidsl 25 - opam init -y
15 - cd apidsl
16 - export OPAMYES=1
17 - opam init
18 - opam install ocamlfind ppx_deriving menhir
19 - eval `opam config env` 26 - eval `opam config env`
20 - make -j3 27 # Install required opam packages.
21 - cd .. 28 - opam install -y ocamlfind ppx_deriving menhir
22 # install sodium, as it's not in Ubuntu Trusty 29 # Build apidsl.
23 - git clone git://github.com/jedisct1/libsodium.git 30 - git clone --depth=1 https://github.com/iphydf/apidsl
24 - cd libsodium 31 - make -C apidsl
25 - git checkout tags/1.0.8 32 # Install cpp-coveralls to upload test coverage results.
26 - ./autogen.sh 33 - pip install --user cpp-coveralls
27 - ./configure 34 # Install astyle (version in ubuntu-precise too old).
28 - make -j3 35 - ASTYLE=$CACHE_DIR/astyle/build/gcc/bin/astyle
29 - sudo make install 36 - >
30 - cd .. 37 [ -f $ASTYLE ] || {
31 - sudo ldconfig 38 wget -O astyle.tar.gz http://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz/download
39 tar -xf astyle.tar.gz -C $CACHE_DIR
40 make -C $CACHE_DIR/astyle/build/gcc
41 }
42 # Install libsodium (not in ubuntu-precise).
43 - >
44 [ -f $CACHE_DIR/lib/libsodium.a ] || {
45 git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium
46 cd libsodium
47 ./autogen.sh
48 ./configure --prefix=$CACHE_DIR
49 make install -j3
50 cd ..
51 }
52 # Install libconfig (version in ubuntu-precise too old).
53 - >
54 [ -f $CACHE_DIR/lib/libconfig.a ] || {
55 git clone --depth=1 --branch=REL1_6_STABLE https://github.com/hyperrealm/libconfig
56 cd libconfig
57 autoreconf -fi
58 ./configure --prefix=$CACHE_DIR
59 touch lib/scanner.l
60 make install -j3
61 cd ..
62 }
63 # Install libopus (not in ubuntu-precise).
64 - >
65 [ -f $CACHE_DIR/lib/libopus.a ] || {
66 git clone --depth=1 --branch=1.1.2 https://github.com/xiph/opus
67 cd opus
68 ./autogen.sh
69 ./configure --prefix=$CACHE_DIR
70 make install -j3
71 cd ..
72 }
73 - popd
32 74
33script: 75script:
34 # check if toxcore.h and toxav.h match apidsl tox.in.h and toxav.in.h 76 # Check if toxcore.h and toxav.h match apidsl tox.in.h and toxav.in.h.
35 # tox.h 77 - ../apidsl/_build/apigen.native ./other/apidsl/tox.in.h | $ASTYLE --options=./other/astyle/astylerc > toxcore/tox.h
36 - ./apidsl/_build/apigen.native ./other/apidsl/tox.in.h > tox.h 78 - ../apidsl/_build/apigen.native ./other/apidsl/toxav.in.h | $ASTYLE --options=./other/astyle/astylerc > toxav/toxav.h
37 - astyle --options=./other/astyle/astylerc tox.h 79 - git diff --exit-code
38 - diff -u tox.h ./toxcore/tox.h 80 # Build toxcore and run tests.
39 # toxav.h
40 - ./apidsl/_build/apigen.native ./other/apidsl/toxav.in.h > toxav.h
41 - astyle --options=./other/astyle/astylerc toxav.h
42 - diff -u toxav.h ./toxav/toxav.h
43 # build toxcore and run tests
44 - ./autogen.sh 81 - ./autogen.sh
45 - CFLAGS="-Ofast -Wall -Wextra" ./configure --enable-daemon --enable-ntox 82 - >
83 ./configure \
84 --with-libsodium-libs=$CACHE_DIR/lib \
85 --with-libsodium-headers=$CACHE_DIR/include \
86 --enable-daemon \
87 --enable-ntox \
88 CFLAGS="-O0 -Wall -Wextra -fprofile-arcs -ftest-coverage"
46 - make 89 - make
47 - make check 90 - make check || true
48 - cat build/test-suite.log 91 - if [ -f build/test-suite.log ]; then cat build/test-suite.log; fi
49 - make dist 92 - make dist
50 93
51notifications: 94after_script:
52 email: false 95 - coveralls --exclude auto_tests --exclude other --exclude testing --gcov-options '\-lp'
53 96
54 irc: 97#notifications:
55 channels: 98# email: false
56 - "chat.freenode.net#tox-dev" 99#
57 on_success: always 100# irc:
58 on_failure: always 101# channels:
102# - "chat.freenode.net#tox-dev"
103# on_success: always
104# on_failure: always