Enable osx build on travis

This commit is contained in:
Tatsuhiro Tsujikawa 2019-05-28 21:03:03 +09:00
parent f82fb52187
commit 8d6ecd66cc
1 changed files with 22 additions and 5 deletions

View File

@ -1,12 +1,20 @@
dist: xenial dist: xenial
os:
- linux
compiler:
- clang
- gcc
env: env:
matrix: matrix:
- CI_BUILD=cmake - CI_BUILD=cmake
- CI_BUILD=autotools - CI_BUILD=autotools
matrix:
include:
- os: osx
compiler: clang
osx_image: xcode10.2
env: CI_BUILD=autotools
language: cpp language: cpp
compiler:
- clang
- gcc
sudo: required sudo: required
addons: addons:
apt: apt:
@ -30,6 +38,13 @@ addons:
- libc-ares-dev - libc-ares-dev
- cmake - cmake
- cmake-data - cmake-data
homebrew:
packages:
- libev
- libevent
- c-ares
- cunit
- libressl
before_install: before_install:
- $CC --version - $CC --version
- if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi - if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
@ -37,13 +52,15 @@ before_install:
- go version - go version
- cmake --version - cmake --version
before_script: before_script:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then CPPFLAGS=-fsanitize=address LDFLAGS="-fsanitize=address -fuse-ld=gold"; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then PKG_CONFIG_PATH=/usr/local/opt/libressl/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig; fi
# Now build nghttp2 # Now build nghttp2
- if [ "$CI_BUILD" = "autotools" ]; then autoreconf -i; fi - if [ "$CI_BUILD" = "autotools" ]; then autoreconf -i; fi
- git submodule update --init - git submodule update --init
- if [ "$CI_BUILD" = "autotools" ]; then ./configure --with-mruby; fi - if [ "$CI_BUILD" = "autotools" ]; then ./configure --with-mruby PKG_CONFIG_PATH=$PKG_CONFIG_PATH; fi
- if [ "$CI_BUILD" = "cmake" ]; then cmake -DENABLE_WERROR=1 -DWITH_MRUBY=1 -DWITH_NEVERBLEED=1; fi - if [ "$CI_BUILD" = "cmake" ]; then cmake -DENABLE_WERROR=1 -DWITH_MRUBY=1 -DWITH_NEVERBLEED=1; fi
script: script:
- if [ "$CI_BUILD" = "autotools" ]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-neverbleed --enable-werror CPPFLAGS=-fsanitize=address LDFLAGS=\"-fsanitize=address -fuse-ld=gold\""; fi - if [ "$CI_BUILD" = "autotools" ]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-neverbleed --enable-werror CPPFLAGS=$CPPFLAGS LDFLAGS=\"$LDFLAGS\" PKG_CONFIG_PATH=$PKG_CONFIG_PATH"; fi
- if [ "$CI_BUILD" = "cmake" ]; then make check; fi - if [ "$CI_BUILD" = "cmake" ]; then make check; fi
# As of April, 23, 2016, golang http2 build fails, probably because # As of April, 23, 2016, golang http2 build fails, probably because
# the default go version is too old. # the default go version is too old.