diff options
Diffstat (limited to 'src/scripts/ci')
-rwxr-xr-x | src/scripts/ci/after_success.sh | 14 | ||||
-rwxr-xr-x | src/scripts/ci/build.sh | 20 | ||||
-rwxr-xr-x | src/scripts/ci/install.sh | 11 | ||||
-rwxr-xr-x | src/scripts/ci/setup.sh | 23 |
4 files changed, 37 insertions, 31 deletions
diff --git a/src/scripts/ci/after_success.sh b/src/scripts/ci/after_success.sh index 9ac4a2b51..76e16e05b 100755 --- a/src/scripts/ci/after_success.sh +++ b/src/scripts/ci/after_success.sh @@ -3,11 +3,11 @@ set -ev if [ "$BUILD_MODE" = "coverage" ]; then - lcov --directory . --capture --output-file coverage.info - lcov --remove coverage.info 'tests/*' '/usr/*' --output-file coverage.info - lcov --list coverage.info - # Assume that $COVERALLS_REPO_TOKEN might not be set (e.g. pull requests) - coveralls-lcov --repo-token="$COVERALLS_REPO_TOKEN" coverage.info -fi + GCOV="/usr/bin/gcov-4.8" + /tmp/usr/bin/lcov --gcov-tool "$GCOV" --directory . --capture --output-file coverage.info + /tmp/usr/bin/lcov --gcov-tool "$GCOV" --remove coverage.info 'tests/*' '/usr/*' --output-file coverage.info + /tmp/usr/bin/lcov --gcov-tool "$GCOV" --list coverage.info -sudo make install + # Assume that $COVERALLS_REPO_TOKEN might not be set (e.g. pull requests) + coveralls-lcov --repo-token="$COVERALLS_REPO_TOKEN" coverage.info +fi diff --git a/src/scripts/ci/build.sh b/src/scripts/ci/build.sh index 684cca437..9bb7ce7e6 100755 --- a/src/scripts/ci/build.sh +++ b/src/scripts/ci/build.sh @@ -17,10 +17,28 @@ if [ "$MODULES" = "min" ]; then CFG_FLAGS="$CFG_FLAGS --no-autoload --enable-modules=base" fi +# Workaround for missing update-alternatives +# https://github.com/travis-ci/travis-ci/issues/3668 +if [ "$CXX" = "g++" ]; then + export CXX="/usr/bin/g++-4.8" +fi + +#enable ccache +if [ "$TRAVIS_OS_NAME" = "linux" ]; then + ccache --max-size=30M + ccache --show-stats + + export CXX="ccache $CXX" +fi + $CXX --version -python configure.py $CFG_FLAGS --cc=$CC --cc-bin=$CXX --with-openssl --with-sqlite --with-zlib +./configure.py $CFG_FLAGS --cc="$CC" --cc-bin="$CXX" \ + --with-openssl --with-sqlite --with-zlib \ + --prefix=/tmp/botan-installation make -j 2 if [ "$MODULES" != "min" ]; then ./botan-test fi + +make install diff --git a/src/scripts/ci/install.sh b/src/scripts/ci/install.sh new file mode 100755 index 000000000..dd9b7e371 --- /dev/null +++ b/src/scripts/ci/install.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -ev + +if [ "$BUILD_MODE" = "coverage" ]; then + wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz + tar -xvf lcov_1.11.orig.tar.gz + export PREFIX="/tmp" + make -C lcov-1.11/ install + gem install coveralls-lcov +fi diff --git a/src/scripts/ci/setup.sh b/src/scripts/ci/setup.sh deleted file mode 100755 index 97019fd57..000000000 --- a/src/scripts/ci/setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -ev - -if [ "$TRAVIS_OS_NAME" = "linux" ]; then - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update -qq - - sudo apt-get install -y g++-4.8 - sudo apt-get install -y libssl-dev - sudo apt-get install -y libz-dev - sudo apt-get install -y libsqlite3-dev - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 90 - sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.8 90 -fi - -if [ "$BUILD_MODE" = "coverage" ]; then - wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz - tar -xvf lcov_1.11.orig.tar.gz - sudo make -C lcov-1.11/ install - gem install coveralls-lcov -fi |