From 35ba54a86eb3dd46b36c230c49a40e2707f6db1d Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 15:36:51 +0700 Subject: [PATCH 01/10] Add .travis.yml. --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..18950d199 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: c + +matrix: + include: + - os: linux + compiler: gcc + env: OS_NAME=Linux + - os: osx + compiler: clang + env: OS_NAME=Darwin + +before_install: + - git submodule update --init --recursive + +script: + - mkdir build && cd build + - cmake .. + - cmake --build . --target marketmaker-mainnet \ No newline at end of file From b3d3ff00afc3b6b32e2180595bd34f20131c775b Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 15:39:59 +0700 Subject: [PATCH 02/10] Require cmake 3.9.2 for travis. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 6e4919d3e67b5dfa45d7ff014db735b6523a4a6d Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 15:48:28 +0700 Subject: [PATCH 03/10] Install libleveldb on linux travis. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 18950d199..5b26bfd3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ matrix: env: OS_NAME=Darwin before_install: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then apt-get update && apt-get install libleveldb-dev; fi - git submodule update --init --recursive script: From e447f5d9f83b5491022a33278cb36e16d356295c Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 15:51:23 +0700 Subject: [PATCH 04/10] Install leveldb on linux travis build. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5b26bfd3b..f7b2d889f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ matrix: env: OS_NAME=Darwin before_install: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then apt-get update && apt-get install libleveldb-dev; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update && sudo apt-get install libleveldb-dev; fi - git submodule update --init --recursive script: From 65ad5572e9f55392b9c4ebe2d95d4561454734ab Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 16:18:16 +0700 Subject: [PATCH 05/10] Use gcc7 for travis linux build. --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f7b2d889f..83c0a17fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,13 @@ matrix: include: - os: linux compiler: gcc - env: OS_NAME=Linux + 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 From 33ed6a6b5034e5535882b623c74be2864ecdb78f Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 16:59:40 +0700 Subject: [PATCH 06/10] Use gcc7 and g++7 for travis linux build. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 83c0a17fb..9da571015 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,5 +21,6 @@ before_install: script: - mkdir build && cd build - - cmake .. + - 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 \ No newline at end of file From 38cbb33d862589fd932ca23e78119e4b25861516 Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 17:23:07 +0700 Subject: [PATCH 07/10] Use xcode9.2 for macos build. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9da571015..36e90d43e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ matrix: - 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 From bb9303fb06860f84fe960ebc8f5873525b0a6883 Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 17:51:49 +0700 Subject: [PATCH 08/10] Travis: Cache .hunter directory. Install leveldb on MacOS. --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 36e90d43e..9ccf7b6f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,15 @@ matrix: 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 \ No newline at end of file + - cmake --build . --target marketmaker-mainnet + +cache: + directories: + - - $HOME/.hunter \ No newline at end of file From 5bdb44e2e843fef013449dd0c0fc2e2104c7e0c3 Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 17:52:19 +0700 Subject: [PATCH 09/10] Fix travis cache entry. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9ccf7b6f9..64d3beb23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,4 +29,4 @@ script: cache: directories: - - - $HOME/.hunter \ No newline at end of file + - $HOME/.hunter \ No newline at end of file From ce2c29ac5ca621cbff5850e8e86206eadfe45ec7 Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 29 Mar 2018 18:26:27 +0700 Subject: [PATCH 10/10] Use static libgcc and libstdc++ only on linux. --- iguana/exchanges/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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