summaryrefslogtreecommitdiff
path: root/other/travis
diff options
context:
space:
mode:
Diffstat (limited to 'other/travis')
-rwxr-xr-xother/travis/hstox-after_script3
-rwxr-xr-xother/travis/hstox-install23
-rwxr-xr-xother/travis/hstox-script5
-rwxr-xr-xother/travis/toxcore-install28
4 files changed, 44 insertions, 15 deletions
diff --git a/other/travis/hstox-after_script b/other/travis/hstox-after_script
new file mode 100755
index 00000000..0f4ddcd5
--- /dev/null
+++ b/other/travis/hstox-after_script
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3set -e -x
diff --git a/other/travis/hstox-install b/other/travis/hstox-install
new file mode 100755
index 00000000..839dfd04
--- /dev/null
+++ b/other/travis/hstox-install
@@ -0,0 +1,23 @@
1#!/bin/sh
2
3set -e -x
4
5cabal update
6
7# We need to install happy explicitly, otherwise setup-Simple-Cabal will fail to
8# install.
9cabal install happy
10
11# Fetch hstox.
12git clone --recursive --depth=1 https://github.com/TokTok/hstox ../hstox
13
14# Delete all files in the cloned toxcore.
15rm -rf ../hstox/test/toxcore/toxcore/toxcore
16# Move the toxcore source files to the hstox test directory.
17# The reason we move source files instead of the whole git root directory is
18# that the travis scripts (like this one) need to remain in place.
19mv toxcore ../hstox/test/toxcore/toxcore
20
21# In the "install" step, we only run configure, which downloads the required
22# packages. In the "script" step we then build the actual code.
23make -C ../hstox configure
diff --git a/other/travis/hstox-script b/other/travis/hstox-script
new file mode 100755
index 00000000..6e19ee11
--- /dev/null
+++ b/other/travis/hstox-script
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3set -e -x
4
5make -C ../hstox check-toxcore
diff --git a/other/travis/toxcore-install b/other/travis/toxcore-install
index 0cd43bc5..f3b213ac 100755
--- a/other/travis/toxcore-install
+++ b/other/travis/toxcore-install
@@ -2,8 +2,6 @@
2 2
3set -e -x 3set -e -x
4 4
5cd ..
6
7# Set up opam. 5# Set up opam.
8opam init -y 6opam init -y
9eval `opam config env` 7eval `opam config env`
@@ -12,46 +10,46 @@ eval `opam config env`
12opam install -y ocamlfind ppx_deriving menhir 10opam install -y ocamlfind ppx_deriving menhir
13 11
14# Build apidsl. 12# Build apidsl.
15git clone --depth=1 https://github.com/iphydf/apidsl 13git clone --depth=1 https://github.com/iphydf/apidsl ../apidsl
16make -C apidsl 14make -C ../apidsl
17 15
18# Install cpp-coveralls to upload test coverage results. 16# Install cpp-coveralls to upload test coverage results.
19pip install --user cpp-coveralls 17pip install --user cpp-coveralls
20 18
21# Install astyle (version in ubuntu-precise too old). 19# Install astyle (version in ubuntu-precise too old).
22[ -f $ASTYLE ] || { 20[ -f $ASTYLE ] || {
23 wget -O astyle.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/astyle_2.05.1.orig.tar.gz 21 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 22 tar -xf ../astyle.tar.gz -C $CACHE_DIR
25 make -C $CACHE_DIR/astyle/build/gcc 23 make -C $CACHE_DIR/astyle/build/gcc
26} 24}
27 25
28# Install libsodium (not in ubuntu-precise). 26# Install libsodium (not in ubuntu-precise).
29[ -f $CACHE_DIR/lib/libsodium.a ] || { 27[ -f $CACHE_DIR/lib/libsodium.a ] || {
30 git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium 28 git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium ../libsodium
31 cd libsodium 29 cd ../libsodium # pushd
32 ./autogen.sh 30 ./autogen.sh
33 ./configure --prefix=$CACHE_DIR 31 ./configure --prefix=$CACHE_DIR
34 make install -j3 32 make install -j3
35 cd .. 33 cd - # popd
36} 34}
37 35
38# Install libconfig (version in ubuntu-precise too old). 36# Install libconfig (version in ubuntu-precise too old).
39[ -f $CACHE_DIR/lib/libconfig.a ] || { 37[ -f $CACHE_DIR/lib/libconfig.a ] || {
40 git clone --depth=1 --branch=REL1_6_STABLE https://github.com/hyperrealm/libconfig 38 git clone --depth=1 --branch=REL1_6_STABLE https://github.com/hyperrealm/libconfig ../libconfig
41 cd libconfig 39 cd ../libconfig # pushd
42 autoreconf -fi 40 autoreconf -fi
43 ./configure --prefix=$CACHE_DIR 41 ./configure --prefix=$CACHE_DIR
44 touch lib/scanner.l 42 touch lib/scanner.l
45 make install -j3 43 make install -j3
46 cd .. 44 cd - # popd
47} 45}
48 46
49# Install libopus (not in ubuntu-precise). 47# Install libopus (not in ubuntu-precise).
50[ -f $CACHE_DIR/lib/libopus.a ] || { 48[ -f $CACHE_DIR/lib/libopus.a ] || {
51 git clone --depth=1 --branch=1.1.2 https://github.com/xiph/opus 49 git clone --depth=1 --branch=1.1.2 https://github.com/xiph/opus ../opus
52 cd opus 50 cd ../opus # pushd
53 ./autogen.sh 51 ./autogen.sh
54 ./configure --prefix=$CACHE_DIR 52 ./configure --prefix=$CACHE_DIR
55 make install -j3 53 make install -j3
56 cd .. 54 cd - # popd
57} 55}