Commit 5fe1c8e324205ced2570017b90ddbbd3f8c04b12
Committed by
GitHub
Merge pull request #47 from hmartiro/feature/travis-ci
Feature/travis ci
Showing
6 changed files
with
51 additions
and
3 deletions
.travis.yml
0 → 100644
CMakeLists.txt
| @@ -108,7 +108,7 @@ if (tests) | @@ -108,7 +108,7 @@ if (tests) | ||
| 108 | add_executable(test_redox test/test.cpp) | 108 | add_executable(test_redox test/test.cpp) |
| 109 | 109 | ||
| 110 | target_include_directories(test_redox PUBLIC ${GTEST_INCLUDE_DIRS}) | 110 | target_include_directories(test_redox PUBLIC ${GTEST_INCLUDE_DIRS}) |
| 111 | - target_link_libraries(test_redox redox gtest) | 111 | + target_link_libraries(test_redox redox ${GTEST_BOTH_LIBRARIES}) |
| 112 | 112 | ||
| 113 | # So that we can run 'make test' | 113 | # So that we can run 'make test' |
| 114 | add_test(test_redox test_redox) | 114 | add_test(test_redox test_redox) |
| @@ -149,7 +149,7 @@ if (examples) | @@ -149,7 +149,7 @@ if (examples) | ||
| 149 | 149 | ||
| 150 | add_executable(binary_data_publish examples/binary_data_publish.cpp) | 150 | add_executable(binary_data_publish examples/binary_data_publish.cpp) |
| 151 | target_link_libraries(binary_data_publish redox) | 151 | target_link_libraries(binary_data_publish redox) |
| 152 | - | 152 | + |
| 153 | add_executable(pub_sub examples/pub_sub.cpp) | 153 | add_executable(pub_sub examples/pub_sub.cpp) |
| 154 | target_link_libraries(pub_sub redox) | 154 | target_link_libraries(pub_sub redox) |
| 155 | 155 |
README.md
| @@ -2,6 +2,8 @@ redox | @@ -2,6 +2,8 @@ redox | ||
| 2 | ====== | 2 | ====== |
| 3 | 3 | ||
| 4 | Modern, asynchronous, and wicked fast C++11 client for Redis | 4 | Modern, asynchronous, and wicked fast C++11 client for Redis |
| 5 | +[] | ||
| 6 | +(https://travis-ci.org/hmartiro/redox) | ||
| 5 | 7 | ||
| 6 | Redox is a C++ interface to the | 8 | Redox is a C++ interface to the |
| 7 | [Redis](http://redis.io/) key-value store that makes it easy to write applications | 9 | [Redis](http://redis.io/) key-value store that makes it easy to write applications |
make-ci.sh
0 → 100755
| 1 | +#!/usr/bin/env bash | ||
| 2 | +# Build script for continuous integration | ||
| 3 | +set -ev | ||
| 4 | +env | sort | ||
| 5 | + | ||
| 6 | +# Install packages | ||
| 7 | +sudo apt-get update | ||
| 8 | +sudo apt-get install -y libhiredis-dev libev-dev libgtest-dev redis-server | ||
| 9 | + | ||
| 10 | +# Clean | ||
| 11 | +rm -rf build | ||
| 12 | +mkdir build | ||
| 13 | +cd build | ||
| 14 | + | ||
| 15 | +# Make gtest | ||
| 16 | +git clone https://github.com/google/googletest | ||
| 17 | +cd googletest | ||
| 18 | +mkdir build | ||
| 19 | +cd build | ||
| 20 | +cmake -DBUILD_GMOCK=OFF -DBUILD_GTEST=ON -DBUILD_SHARED_LIBS=ON .. | ||
| 21 | +time make | ||
| 22 | +cd ../.. | ||
| 23 | +sudo cp googletest/build/googletest/libg* /usr/local/lib/ | ||
| 24 | +sudo cp -r googletest/googletest/include/gtest /usr/local/include | ||
| 25 | + | ||
| 26 | +# Make redox | ||
| 27 | +cmake -Dexamples=ON -Dlib=ON -Dstatic_lib=ON -Dtests=ON .. | ||
| 28 | +time make VERBOSE=1 | ||
| 29 | + | ||
| 30 | +# Test redox | ||
| 31 | +sudo service redis-server restart | ||
| 32 | +./test_redox | ||
| 33 | +cd .. |
make.sh