diff options
| author | thecharlesblake | 2017-10-12 22:51:32 +0100 |
|---|---|---|
| committer | thecharlesblake | 2017-10-13 18:46:14 +0100 |
| commit | b288d43d7eb229ac68fbbe10bba1e58d359ee4e7 (patch) | |
| tree | 7cbca974fe21c567ed945a8960df9183aac089b5 /.travis.yml | |
| parent | Add project tools document (diff) | |
| download | metasol-b288d43d7eb229ac68fbbe10bba1e58d359ee4e7.tar.gz metasol-b288d43d7eb229ac68fbbe10bba1e58d359ee4e7.zip | |
Add basic travis file
Diffstat (limited to '.travis.yml')
| -rw-r--r-- | .travis.yml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0a05d99 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,31 @@ +language: c++ + +install: +# Upgrade GCC +- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y +- sudo apt-get update -qq +- sudo apt-get install -qq g++-6 +- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 + +# Boost +- echo "Installing Boost Libraries" +- sudo wget -O boost_1_63_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz/download > /dev/null 2>&1 +- sudo tar xzvf boost_1_63_0.tar.gz > /dev/null 2>&1 +- cd boost_1_63_0/ +- sudo ./bootstrap.sh --with-libraries=log > /dev/null 2>&1 +- sudo ./b2 link=shared threading=multi toolset=gcc optimization=space > /dev/null 2>&1 +- sudo ./b2 install > /dev/null 2>&1 +- cd .. + +script: +# Generate build +- cmake -G "CodeBlocks - Unix Makefiles" -D CMAKE_CXX_COMPILER=g++-6 -DCMAKE_BUILD_TYPE=DEBUG --target solvitaire -Bcmake-build-debug -H. +- cmake -G "CodeBlocks - Unix Makefiles" -D CMAKE_CXX_COMPILER=g++-6 -DCMAKE_BUILD_TYPE=RELEASE --target solvitaire -Bcmake-build-release -H. + +# Build +- cmake --build cmake-build-debug +- cmake --build cmake-build-release + +# Run unit tests +- ./cmake-build-debug/bin/unit_tests +- ./cmake-build-release/bin/unit_tests |
