Add MacOS to Travis CI; simplify .travis.yml

This commit is contained in:
Dmitri Tikhonov 2019-01-29 01:55:01 -05:00 committed by LiteSpeed Tech
parent 6259599e6e
commit 12693a011b
2 changed files with 41 additions and 44 deletions

View file

@ -1,41 +1,36 @@
language: cpp
compiler:
- clang
- gcc
language: c
matrix:
include:
- name: Linux (gcc)
os: linux
compiler: gcc
addons:
apt:
packages:
- libevent-dev
- name: Linux (clang)
os: linux
compiler: clang
addons:
apt:
packages:
- libevent-dev
- name: macOS
os: osx
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- george-edison55-precise-backports
packages:
- g++-5
- clang-3.8
- libevent-dev
- libssl-dev
- cmake
- cmake-data
before_install:
- $CC --version
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; else export CXX="clang++-3.8" CC="clang-3.8"; fi
- $CC --version
- cmake --version
before_script:
- git clone https://boringssl.googlesource.com/boringssl
- cd boringssl
- git checkout chromium-stable
- cmake .
- make -j$(nproc)
- BORINGSSL_SOURCE=$PWD
- mkdir -p $HOME/boringssl-libs
- cd $HOME/boringssl-libs
- ln -s $BORINGSSL_SOURCE/ssl/libssl.a
- ln -s $BORINGSSL_SOURCE/crypto/libcrypto.a
- cd $TRAVIS_BUILD_DIR
- echo $BORINGSSL_SOURCE
- cmake -DBORINGSSL_INCLUDE=$BORINGSSL_SOURCE/include -DBORINGSSL_LIB=$HOME/boringssl-libs .
- git clone https://boringssl.googlesource.com/boringssl
- cd boringssl
# This is so that both GQUIC and IETF branches build. Just picking
# a known good revision:
- git checkout 32e59d2d3264e4e104b355ef73663b8b79ac4093
- cmake .
- make
- ln -s ssl/libssl.a
- ln -s crypto/libcrypto.a
- cd -
- cmake -DBORINGSSL_INCLUDE=$PWD/boringssl/include -DBORINGSSL_LIB=$PWD/boringssl .
script:
# Now build lsquic-client
- make
- make test
# Now build lsquic-client
- make
- make test

View file

@ -17,12 +17,14 @@ ENDIF()
ENDIF()
# If using older glibc, need to link with -lrt. See clock_getres(2).
EXECUTE_PROCESS(
COMMAND ${PROJECT_SOURCE_DIR}/print-glibc-version.sh ${CMAKE_C_COMPILER}
OUTPUT_VARIABLE GLIBC_VERSION)
IF(NOT GLIBC_VERSION EQUAL "" AND GLIBC_VERSION VERSION_LESS 2.17)
SET(LIBS ${LIBS} rt)
IF (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# If using older glibc, need to link with -lrt. See clock_getres(2).
EXECUTE_PROCESS(
COMMAND ${PROJECT_SOURCE_DIR}/print-glibc-version.sh ${CMAKE_C_COMPILER}
OUTPUT_VARIABLE GLIBC_VERSION)
IF(NOT GLIBC_VERSION EQUAL "" AND GLIBC_VERSION VERSION_LESS 2.17)
SET(LIBS ${LIBS} rt)
ENDIF()
ENDIF()
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")