From 43d1915a4d596f5a8edbd8924d1e050b0ab92323 Mon Sep 17 00:00:00 2001 From: Peter Wu <peter@lekensteyn.nl> Date: Sun, 22 Oct 2017 20:07:41 +0100 Subject: [PATCH] .travis.yml: add cmake support Simplify PKG_CONFIG_PATH and LDFLAGS while at it using the new --enable-asan option which automatically adds the required flags if available. LDFLAGS is ignored by cmake, but apparently cmake builds packages with the correct rpath without any further options. Additionally, build examples by default (without -Werror) and remove "cat config.log" which would result in configure succeeding while it should not. --- .travis.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f31a4c3f..81f29a12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,8 @@ dist: trusty +env: + matrix: + - CI_BUILD=cmake + - CI_BUILD=autotools language: cpp os: # - osx @@ -35,9 +39,11 @@ before_script: - ./ci/build_openssl.sh - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libev; fi # configure ngtcp2 - - autoreconf -i - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./configure --enable-werror PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig CPPFLAGS=-fsanitize=address LDFLAGS="$EXTRA_LDFLAGS -fsanitize=address -Wl,-rpath,$PWD/openssl/build/lib" || cat config.log; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./configure --enable-werror PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig LDFLAGS="-Wl,-rpath,$PWD/openssl/build/lib"; fi + - if [ "$CI_BUILD" == "autotools" ]; then autoreconf -i; fi + - export PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig LDFLAGS="$EXTRA_LDFLAGS -Wl,-rpath,$PWD/openssl/build/lib" + - if [ "$CI_BUILD" == "autotools" ]; then ./configure --enable-werror --enable-asan; fi + - if [ "$CI_BUILD" == "cmake" ]; then cmake -DENABLE_ASAN=1; fi script: - # Now build ngtcp2 + # Now build ngtcp2 examples and test + - make - make check -- GitLab