testing: limit random port range to probably unused ports
[awesomized/libmemcached] / .travis.yml
1 services:
2 - memcached
3
4 addons:
5 apt:
6 packages:
7 - python-sphinx
8 - valgrind
9 - libevent-dev
10 - libsasl2-dev
11
12 dist: bionic
13 language: cpp
14 compiler:
15 - gcc
16 - clang
17
18 env:
19 - BUILD=Release SASL=false
20 - BUILD=Debug SASL=true PREFIX=/opt PORT=11212 MC_VERSION=1.5.22
21 - BUILD=Debug SASL=false PREFIX=/opt PORT=11212 MC_VERSION=1.6.6
22 - BUILD=Debug SASL=true PREFIX=/opt PORT=11212 SANITIZERS=address;undefined
23
24 #before_install:
25 install:
26 - |
27 if ${SASL} || test -n "$MC_VERSION";
28 then
29 git clone -b ${MC_VERSION:-1.5.22} https://github.com/memcached/memcached &&
30 cd memcached && ./autogen.sh &&
31 CFLAGS="-O2 -pipe" ./configure --prefix=${PREFIX} --disable-dependency-tracking --enable-sasl --enable-sasl-pwdb --disable-coverage --disable-docs &&
32 make -j2 && make install && cd ..;
33 ${PREFIX}/bin/memcached -l 127.0.0.1 -p ${PORT} -U ${PORT} -m 128 &
34 fi;
35
36
37 before_script:
38 - echo stats settings | nc -q 0 localhost ${PORT:-11211} | column -t
39 - sudo systemctl stop memcached
40 - killall memcached || true
41 - mkdir build
42
43 script:
44 - cd build
45 - cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${BUILD} -DENABLE_SASL=${SASL} -DENABLE_SANITIZERS=${SANITIZERS} -DMEMCACHED_BINARY=${PREFIX:-/usr}/bin/memcached ..
46 - make -j2
47 - make test VERBOSE=1
48 - make install DESTDIR=.
49
50 #before_cache:
51 #after_success:
52
53 after_failure:
54 - cat Testing/Temporary/LastTest.log
55
56 #after_script: