Added travis-ci support.

This commit is contained in:
Takatoshi Kondo 2014-09-19 23:42:07 +09:00
parent 847a7852e5
commit 6896cc602f
4 changed files with 131 additions and 1 deletions

25
.travis.yml Normal file
View File

@ -0,0 +1,25 @@
language: cpp
cache:
- apt
compiler:
- clang
- gcc
before_install:
# We need this line to have g++4.8 available in apt
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get update
- sudo apt-get install valgrind
- sudo apt-get install libgtest-dev
- "cd /usr/src/gtest && sudo cmake . && sudo cmake --build . && sudo mv libg* /usr/local/lib/ ; cd -"
install:
- sudo apt-get install -qq gcc-4.8 g++-4.8
# We want to compile with g++ 4.8 when rather than the default g++
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
env:
- ACTION="ci/build_autotools.sh" PARAM="cpp03"
- ACTION="ci/build_cmake.sh" PARAM="cpp03"
script:
- git clean -xdf && ${ACTION} ${PARAM}

View File

@ -19,6 +19,8 @@ The source for msgpack-c is held at [msgpack-c](https://github.com/msgpack/msgpa
To report an issue, use the [msgpack-c issue tracker](https://github.com/msgpack/msgpack-c/issues) at github.com.
## Version
0.5.9 [![Build Status](https://travis-ci.org/msgpack/msgpack-c.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-c)
## Using Msgpack
@ -96,7 +98,7 @@ Clone msgpack-c git repository.
$ git clone https://github.com/msgpack/msgpack-c.git
```
or using GUI git client.
or using GUI git client.
e.g.) tortoise git https://code.google.com/p/tortoisegit/

47
ci/build_autotools.sh Executable file
View File

@ -0,0 +1,47 @@
#!/bin/sh
./bootstrap
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
if [ $1 = "cpp11" ]
then
./configure CXXFLAGS="-std=c++11"
else
./configure
fi
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
make
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
make check
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
make install DESTDIR=`pwd`/install
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
exit 0

56
ci/build_cmake.sh Executable file
View File

@ -0,0 +1,56 @@
#!/bin/sh
mkdir build
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
cd build
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
if [ $1 = "cpp11" ]
then
cmake -DMSGPACK_CXX11=ON ..
else
cmake ..
fi
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
make
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
make test
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
make install DESTDIR=`pwd`/install
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
exit 0