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

View file

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