forked from ngtcp2/ngtcp2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (59 loc) · 1.75 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
dist: trusty
language: cpp
os:
- osx
- linux
compiler:
- clang
- gcc
sudo: required
env:
- CI_BUILD=cmake
- CI_BUILD=autotools
matrix:
exclude:
# Exclude gcc build (Need some work) with osx
- os: osx
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- g++-7
- clang-5.0
- autoconf
- automake
- autotools-dev
- libtool
- pkg-config
- libcunit1-dev
- libssl-dev
- libev-dev
- libcunit1-dev
- cmake
- cmake-data
before_install:
- $CC --version
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then CMAKE_OPTS=" -DENABLE_ASAN=1" AUTOTOOLS_OPTS=" --enable-asan"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7" EXTRA_LDFLAGS="-fuse-ld=gold"; else export CXX="clang++-5.0" CC="clang-5.0"; fi; fi
- $CC --version
- cmake --version
before_script:
# First build external lib
- ./ci/build_openssl.sh
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libev cunit; fi
# configure ngtcp2
- 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 $AUTOTOOLS_OPTS; fi
# Set CMAKE_LIBRARY_ARCHITECTURE to workaround failure to parse implicit link information from GCC 5
- if [ "$CI_BUILD" == "cmake" ]; then cmake $CMAKE_OPTS -DCMAKE_LIBRARY_ARCHITECTURE=x86_64-linux-gnu; fi
script:
# Now build ngtcp2 examples and test
- make
- make check
- ./ci/gen-certificate.sh
- ./examples/server localhost 4433 cert/server.key cert/server.crt &
- ./examples/client localhost 4433