Browse code

test/travis: migrate to docker environment

- using https://hub.docker.com/r/linuxmaniac/pkg-kamailio-docker
- update list of supported modules
- dynamic clang version
- show CC version

Victor Seva authored on 23/11/2015 23:42:47
Showing 2 changed files
... ...
@@ -1,12 +1,13 @@
1
+sudo: required
1 2
 language: c
2 3
 compiler:
3 4
   - gcc
4 5
   - clang
6
+services:
7
+  - docker
5 8
 before_install:
6
-  - sudo apt-get update -qq
7
-  - sudo apt-get install -y gdebi-core
8
-  - sudo test/travis/build_deps.sh precise $TRAVIS_BUILD_DIR
9
-script: ./test/travis/build_travis.sh
9
+  - docker pull linuxmaniac/pkg-kamailio-docker:stretch
10
+script: docker run -v $TRAVIS_BUILD_DIR:/code:rw linuxmaniac/pkg-kamailio-docker:stretch /bin/bash -c "export CC=$CC; cd /code; ./test/travis/build_travis.sh"
10 11
 branches:
11 12
   only:
12 13
     - 'master'
... ...
@@ -1,19 +1,22 @@
1 1
 #!/bin/bash
2 2
 #
3 3
 # build script for travis CI
4
-# environment based on Ubuntu 12.04 LTS (precise)
4
+# environment based on Debian Stretch
5 5
 #
6 6
 
7 7
 set -e
8 8
 
9
+# choose freeradius
10
+export FREERADIUS=1
11
+
9 12
 export JAVA_HOME="/usr/lib/jvm/java-gcj"
10 13
 EXCLUDED_MODULES=""
11
-EXTRA_EXCLUDED_MODULES="bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec kazoo cnxcc"
14
+EXTRA_EXCLUDED_MODULES="bdb dbtext oracle pa iptrtpproxy mi_xmlrpc"
12 15
 PACKAGE_GROUPS="mysql postgres berkeley unixodbc radius presence ldap xml perl utils lua memcached \
13 16
 	snmpstats carrierroute xmpp cpl redis python geoip\
14 17
 	sqlite json mono ims sctp java \
15
-	purple tls outbound websocket autheph"
16
-export TESTS_EXCLUDE="3 12 17 19 20 23 25 26 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 50"
18
+	purple tls outbound websocket autheph \
19
+	dnssec kazoo cnxcc erlang"
17 20
 
18 21
 function build {
19 22
 	echo "make distclean"
... ...
@@ -30,6 +33,15 @@ function build {
30 30
 	done
31 31
 }
32 32
 
33
+if [[ "$CC" =~ clang ]] ; then
34
+	CLANG=$(find /usr/bin -type l -name 'clang-[0-9]*' | sort -r | head -1)
35
+	echo "setting clang to ${CLANG}"
36
+	update-alternatives --install /usr/bin/clang clang $CLANG 1
37
+fi
38
+
39
+echo "CC=$CC"
40
+echo "$($CC --version)"
41
+
33 42
 # build flags
34 43
 export MEMDBG=0
35 44
 echo "build with MEMDBG=0"
... ...
@@ -39,8 +51,6 @@ export MEMDBG=1
39 39
 echo "build with MEMDBG=1"
40 40
 build
41 41
 
42
-#echo "unit tests"
43
-#make -C test/unit
44 42
 if [[ "$CC" =~ gcc ]] ; then
45 43
 	echo "make install"
46 44
 	sudo make install