fix test
[m6w6/libmemcached] / .travis.yml
index 1b5035cbd1c3cd75813b3e8460736425190eecf7..f7cc6b1aa9c6c7f12e67ab830002f20ed13b258b 100644 (file)
@@ -1,52 +1,63 @@
-services:
- - memcached
+os: linux
+dist: focal
+arch:
+  - arm64
+  - ppc64le
+  - s390x
+language: cpp
+
+branches:
+  only:
+    - v1.x
+    - travis
 
 addons:
- apt:
-  packages:
-   - python-sphinx
-   - valgrind
-   - libevent-dev
-   - libsasl2-dev
-
-dist: bionic
-language: cpp
-compiler:
- - gcc
- - clang
+  apt:
+    packages:
+      - libevent-dev
+      - libsasl2-dev
+      - libtbb-dev
 
 env:
- - BUILD=Release SASL=false
- - BUILD=Debug SASL=true PREFIX=/opt PORT=11212
+  - CMAKE_BUILD_TYPE=Debug BUILD_TESTING=true ENABLE_SASL=true ENABLE_HASH_HSIEH=true CFLAGS="-O0 --coverage" CXXFLAGS="-O0 --coverage"
 
-#before_install:
 install:
- - |
-   if ${SASL};
-   then
-     git clone -b 1.5.9 https://github.com/memcached/memcached &&
-     cd memcached && ./autogen.sh &&
-     CFLAGS="-O2 -pipe" ./configure --prefix=${PREFIX} --disable-dependency-tracking --enable-sasl --enable-sasl-pwdb --disable-coverage --disable-docs &&
-     make -j2 && make install;
-     ${PREFIX}/bin/memcached -l 127.0.0.1 -p ${PORT} -U ${PORT} -m 128 &
-   fi;
-
+  - |
+    git clone --depth 1 -b 1.6.7 https://github.com/memcached/memcached
+    cd memcached
+    ./autogen.sh
+    CFLAGS="-O2 -pipe" ./configure \
+     --prefix=/opt \
+     --disable-coverage \
+     --disable-docs \
+     --disable-dependency-tracking \
+     --enable-sasl \
+     --enable-sasl-pwdb \
+     ;
+    make -j2
+    make install
+    cd ..
 
 before_script:
- - echo stats settings | nc -q 0 localhost ${PORT:-11211} | column -t
- - mkdir build
+  - mkdir build
 
 script:
- - cd build
- - cmake -DCMAKE_BUILD_TYPE=${BUILD} -DENABLE_SASL=${SASL} -DMEMCACHED_BINARY=${PREFIX:-/usr}/bin/memcached ..
- - make -j2
- - make test
- - make install DESTDIR=.
-
-#before_cache:
-#after_success:
+  - cd build
+  - cmake -DMEMCACHED_BINARY=/opt/bin/memcached ..
+  - make -j2 VERBOSE=1
+  - make test VERBOSE=1
+  - make install DESTDIR=/tmp
 
 after_failure:
- - cat Testing/Temporary/LastTest.log
-
-#after_script:
+  - cat Testing/Temporary/LastTest.log || true
+
+after_success:
+  - bash <(curl -s https://codecov.io/bash)
+
+notifications:
+  webhooks:
+    urls:
+      - https://webhooks.gitter.im/e/796c8423962228333c54
+    on_success: always
+    on_failure: change
+    on_start: never