diff options
Diffstat (limited to 'other/travis')
-rwxr-xr-x | other/travis/toxcore-after_script | 9 | ||||
-rwxr-xr-x | other/travis/toxcore-install | 57 | ||||
-rwxr-xr-x | other/travis/toxcore-script | 25 |
3 files changed, 91 insertions, 0 deletions
diff --git a/other/travis/toxcore-after_script b/other/travis/toxcore-after_script new file mode 100755 index 00000000..06dec607 --- /dev/null +++ b/other/travis/toxcore-after_script | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e -x | ||
4 | |||
5 | coveralls \ | ||
6 | --exclude auto_tests \ | ||
7 | --exclude other \ | ||
8 | --exclude testing \ | ||
9 | --gcov-options '\-lp' | ||
diff --git a/other/travis/toxcore-install b/other/travis/toxcore-install new file mode 100755 index 00000000..0cd43bc5 --- /dev/null +++ b/other/travis/toxcore-install | |||
@@ -0,0 +1,57 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e -x | ||
4 | |||
5 | cd .. | ||
6 | |||
7 | # Set up opam. | ||
8 | opam init -y | ||
9 | eval `opam config env` | ||
10 | |||
11 | # Install required opam packages. | ||
12 | opam install -y ocamlfind ppx_deriving menhir | ||
13 | |||
14 | # Build apidsl. | ||
15 | git clone --depth=1 https://github.com/iphydf/apidsl | ||
16 | make -C apidsl | ||
17 | |||
18 | # Install cpp-coveralls to upload test coverage results. | ||
19 | pip install --user cpp-coveralls | ||
20 | |||
21 | # Install astyle (version in ubuntu-precise too old). | ||
22 | [ -f $ASTYLE ] || { | ||
23 | wget -O astyle.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/astyle_2.05.1.orig.tar.gz | ||
24 | tar -xf astyle.tar.gz -C $CACHE_DIR | ||
25 | make -C $CACHE_DIR/astyle/build/gcc | ||
26 | } | ||
27 | |||
28 | # Install libsodium (not in ubuntu-precise). | ||
29 | [ -f $CACHE_DIR/lib/libsodium.a ] || { | ||
30 | git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium | ||
31 | cd libsodium | ||
32 | ./autogen.sh | ||
33 | ./configure --prefix=$CACHE_DIR | ||
34 | make install -j3 | ||
35 | cd .. | ||
36 | } | ||
37 | |||
38 | # Install libconfig (version in ubuntu-precise too old). | ||
39 | [ -f $CACHE_DIR/lib/libconfig.a ] || { | ||
40 | git clone --depth=1 --branch=REL1_6_STABLE https://github.com/hyperrealm/libconfig | ||
41 | cd libconfig | ||
42 | autoreconf -fi | ||
43 | ./configure --prefix=$CACHE_DIR | ||
44 | touch lib/scanner.l | ||
45 | make install -j3 | ||
46 | cd .. | ||
47 | } | ||
48 | |||
49 | # Install libopus (not in ubuntu-precise). | ||
50 | [ -f $CACHE_DIR/lib/libopus.a ] || { | ||
51 | git clone --depth=1 --branch=1.1.2 https://github.com/xiph/opus | ||
52 | cd opus | ||
53 | ./autogen.sh | ||
54 | ./configure --prefix=$CACHE_DIR | ||
55 | make install -j3 | ||
56 | cd .. | ||
57 | } | ||
diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script new file mode 100755 index 00000000..b2ee5d02 --- /dev/null +++ b/other/travis/toxcore-script | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e -x | ||
4 | |||
5 | # Check if toxcore.h and toxav.h match apidsl tox.in.h and toxav.in.h. | ||
6 | ../apidsl/_build/apigen.native ./other/apidsl/tox.in.h | $ASTYLE --options=./other/astyle/astylerc > toxcore/tox.h | ||
7 | ../apidsl/_build/apigen.native ./other/apidsl/toxav.in.h | $ASTYLE --options=./other/astyle/astylerc > toxav/toxav.h | ||
8 | git diff --exit-code | ||
9 | |||
10 | # Build toxcore and run tests. | ||
11 | ./autogen.sh | ||
12 | ./configure \ | ||
13 | --with-libsodium-libs=$CACHE_DIR/lib \ | ||
14 | --with-libsodium-headers=$CACHE_DIR/include \ | ||
15 | --enable-daemon \ | ||
16 | --enable-logging \ | ||
17 | --enable-ntox \ | ||
18 | CFLAGS="-O0 -Wall -Wextra -fprofile-arcs -ftest-coverage -DTRAVIS_ENV=1" | ||
19 | |||
20 | make | ||
21 | make check | ||
22 | if [ -f build/test-suite.log ]; then | ||
23 | cat build/test-suite.log | ||
24 | fi | ||
25 | make dist | ||