travis: build on macos as well
MODIFY
.travis.yml
.travis.yml
language: cpp
-os: linux
-dist: xenial
-sudo: required
cache:
directories:
@@ -23,6 +20,7 @@ env:
before_script:
- |
+ if [ $TRAVIS_OS_NAME = linux ]; then
if [ ! -d /tmp/z3cache/z3-$Z3_VERSION-x64-ubuntu-14.04 ] ; then
rm -fr /tmp/z3cache
mkdir /tmp/z3cache
@@ -32,9 +30,8 @@ before_script:
mv z3-* z3cache
popd
fi
- - sudo cp /tmp/z3cache/z3-$Z3_VERSION*/bin/libz3.so /usr/lib
- - sudo cp /tmp/z3cache/z3-$Z3_VERSION*/include/* /usr/include
- - |
+ sudo cp /tmp/z3cache/z3-$Z3_VERSION*/bin/libz3.so /usr/lib
+ sudo cp /tmp/z3cache/z3-$Z3_VERSION*/include/* /usr/include
if [ ! -f /tmp/re2ccache/$RE2C_VERSION/re2c ] ; then
rm -fr /tmp/re2ccache
mkdir -p /tmp/re2ccache/$RE2C_VERSION
@@ -47,7 +44,8 @@ before_script:
popd
popd
fi
- - sudo cp /tmp/re2ccache/$RE2C_VERSION/re2c /usr/bin
+ sudo cp /tmp/re2ccache/$RE2C_VERSION/re2c /usr/bin
+ fi
script:
- mkdir build
@@ -63,6 +61,8 @@ script:
matrix:
include:
- env: CMAKE_CXX_COMPILER=g++-7 CMAKE_BUILD_TYPE=Debug
+ os: linux
+ dist: xenial
addons: &gcc7
apt:
sources: *default_sources
@@ -71,9 +71,13 @@ matrix:
- g++-7
- env: CMAKE_CXX_COMPILER=g++-7 CMAKE_BUILD_TYPE=Release
+ os: linux
+ dist: xenial
addons: *gcc7
- env: CMAKE_CXX_COMPILER=g++-8 CMAKE_BUILD_TYPE=Debug
+ os: linux
+ dist: xenial
addons: &gcc8
apt:
sources: *default_sources
@@ -82,9 +86,13 @@ matrix:
- g++-8
- env: CMAKE_CXX_COMPILER=g++-8 CMAKE_BUILD_TYPE=Release
+ os: linux
+ dist: xenial
addons: *gcc8
- env: CMAKE_CXX_COMPILER=clang++-7 CMAKE_BUILD_TYPE=Debug CMAKE_CXX_FLAGS=-fsanitize=address,undefined
+ os: linux
+ dist: xenial
addons: &clang7
apt:
sources:
@@ -96,9 +104,13 @@ matrix:
- g++-8
- env: CMAKE_CXX_COMPILER=clang++-7 CMAKE_BUILD_TYPE=Release
+ os: linux
+ dist: xenial
addons: *clang7
- env: CMAKE_CXX_COMPILER=clang++-8 CMAKE_BUILD_TYPE=Debug CMAKE_CXX_FLAGS=-fsanitize=address,undefined
+ os: linux
+ dist: xenial
addons: &clang8
apt:
sources:
@@ -110,4 +122,21 @@ matrix:
- g++-8
- env: CMAKE_CXX_COMPILER=clang++-8 CMAKE_BUILD_TYPE=Release
+ os: linux
+ dist: xenial
addons: *clang8
+
+ - env: CMAKE_BUILD_TYPE=Debug CMAKE_CXX_FLAGS=-fsanitize=address,undefined
+ os: osx
+ osx_image: xcode10.1
+ addons: &mac
+ homebrew:
+ packages:
+ - ninja
+ - re2c
+ - z3
+
+ - env: CMAKE_BUILD_TYPE=Release
+ os: osx
+ osx_image: xcode10.1
+ addons: *mac

travis: build on macos as well