diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..64d3beb23 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: c + +matrix: + include: + - os: linux + compiler: gcc + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-7 + env: OS_NAME=Linux MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" + - os: osx + compiler: clang + env: OS_NAME=Darwin + osx_image: xcode9.2 + +before_install: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update && sudo apt-get install libleveldb-dev; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install leveldb; fi + - git submodule update --init --recursive + +script: + - mkdir build && cd build + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-7 ..; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake ..; fi + - cmake --build . --target marketmaker-mainnet + +cache: + directories: + - $HOME/.hunter \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index d75ce3e87..feb0c7acb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9.6) +cmake_minimum_required(VERSION 3.9.2) include("cmake/HunterGate.cmake") HunterGate( URL "https://github.com/ruslo/hunter/archive/v0.19.173.tar.gz" diff --git a/iguana/exchanges/CMakeLists.txt b/iguana/exchanges/CMakeLists.txt index 5ffccdfe6..793aeb5a4 100644 --- a/iguana/exchanges/CMakeLists.txt +++ b/iguana/exchanges/CMakeLists.txt @@ -26,5 +26,9 @@ add_definitions(-DIGUANA_MAXPACKETSIZE=1572864) add_definitions(-D_CRT_SECURE_NO_WARNINGS) include_directories("${CMAKE_SOURCE_DIR}/includes") endif() -target_link_libraries(marketmaker-testnet ${MM_LIBS} etomiclib-testnet -static-libgcc -static-libstdc++) -target_link_libraries(marketmaker-mainnet ${MM_LIBS} etomiclib-mainnet -static-libgcc -static-libstdc++) +target_link_libraries(marketmaker-testnet ${MM_LIBS} etomiclib-testnet) +target_link_libraries(marketmaker-mainnet ${MM_LIBS} etomiclib-mainnet) +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +target_link_libraries(marketmaker-mainnet -static-libgcc -static-libstdc++) +target_link_libraries(marketmaker-testnet -static-libgcc -static-libstdc++) +endif() \ No newline at end of file