Skip to content

Commit

Permalink
travis: add coveralls.io support
Browse files Browse the repository at this point in the history
  • Loading branch information
nemequ committed Oct 8, 2015
1 parent ac71b9e commit 819ce91
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 34 deletions.
85 changes: 51 additions & 34 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,6 @@
# not possible to perform different before_install steps depending on
# the operating system. You should not be using this script.

CC=gcc-4.8
CXX=g++-4.8

case "${COMPILER}" in
"clang")
CC=clang
CXX=clang++
;;
"gcc-5")
CC=gcc-5
CXX=g++-5
;;
"gcc-4.8")
CC=gcc-4.8
CXX=g++-4.8
;;
"gcc-4.6")
CC=gcc-4.6
CXX=g++-4.6
;;
esac

case "${1}" in
"deps")
case "${TRAVIS_OS_NAME}" in
Expand All @@ -35,16 +13,27 @@ case "${1}" in
sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -qq
sudo apt-get install -qq \
git \
cmake \
build-essential \
libglib2.0-dev \
gcc-4.8 \
g++-4.8 \
gcc-5 \
g++-5 \
gdb \
ragel

case "${COMPILER}" in
"gcc-5")
sudo apt-get install -qq gcc-5 g++-5
;;
"gcc-4.8")
sudo apt-get install -qq gcc-4.8 g++-4.8
;;
esac

case "${BUILD_TYPE}" in
"coverage")
sudo apt-get install -qq python-pip lcov
sudo pip install cpp-coveralls
;;
esac
;;
"osx")
brew update
Expand Down Expand Up @@ -79,16 +68,38 @@ case "${1}" in
;;
esac

case "${COMPILER}" in
"clang")
CC=clang
CXX=clang++
;;
"gcc-4.6")
CC=gcc-4.6
CXX=g++-4.6
;;
"gcc-4.8")
CC=gcc-4.8
CXX=g++-4.8
;;
"gcc-5")
CC=gcc-5
CXX=g++-5
;;
*)
CC=gcc-5
CXX=g++-5
;;
esac

git submodule update --init --recursive
mkdir build && cd build
/bin/bash -x ../autogen.sh CC="${CC}" CXX="${CXX}" ${CONFIGURE_FLAGS} CFLAGS="${COMMON_COMPILER_FLAGS}" CXXFLAGS="${COMMON_COMPILER_FLAGS}"
/bin/bash -x ../autogen.sh \
CC="${CC}" \
CXX="${CXX}" \
${CONFIGURE_FLAGS} \
CFLAGS="${COMMON_COMPILER_FLAGS}" \
CXXFLAGS="${COMMON_COMPILER_FLAGS}"
make VERBOSE=1

case "${BUILD_TYPE}" in
"coverage")
make coverage
;;
esac
;;
"test")
cd build
Expand All @@ -105,6 +116,12 @@ case "${1}" in
CTEST_OUTPUT_ON_FAILURE=TRUE make test
;;
esac

case "${BUILD_TYPE}" in
"coverage")
coveralls --exclude tests --exclude squash/tinycthread
;;
esac
;;
*)
echo "Unknown step."
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ env:
- COMPILER=gcc-5 BUILD_TYPE=asan
# - COMPILER=gcc-5 BUILD_TYPE=ubsan
# - COMPILER=gcc-5 BUILD_TYPE=tsan
- COMPILER=gcc-5 BUILD_TYPE=coverage
- COMPILER=clang BUILD_TYPE=regular
- COMPILER=gcc-4.8 BUILD_TYPE=regular
global:
- secure: "QDuBYD70tDc+2v4WdNEbmv4BE/jVHrDp9QZ+a7ZYPgnUe5hRnKfKSOhsuzGDRkMBnrJFbaeFITrGY7WQKcwLcMxKq11/Lk6Of9ai+TxN4VY+p1yt3Poz/7pDg7bVTPepnEgVUjjLQC8UoGXo7jaLscqJuU3vAl/LVQ9igC8TwKQ="
before_install:
- ./.travis.sh deps
script: ./.travis.sh build && ./.travis.sh test
Expand Down

0 comments on commit 819ce91

Please sign in to comment.