aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/ci/setup_travis.sh
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-03 22:01:58 -0500
committerJack Lloyd <[email protected]>2018-12-03 22:01:58 -0500
commitef57d0e4a4c53dd736edac2aca37125093d1e345 (patch)
tree751978f2af2dd9cd485ad71842ad953e506ec66a /src/scripts/ci/setup_travis.sh
parentdf1f63f1aa55a782a00714d62708aaa8e27a682f (diff)
Update Travis build to use Xenial
Drops Mingw i686 build as it runs into a problem I could not debug, when unit_tls.cpp is compiled with -O2 it crashes with a useless backtrace. If compiled with -g or with lower optimizations it is ok. Replaced with Mingw x86-64. Add mips64 build.
Diffstat (limited to 'src/scripts/ci/setup_travis.sh')
-rwxr-xr-xsrc/scripts/ci/setup_travis.sh76
1 files changed, 26 insertions, 50 deletions
diff --git a/src/scripts/ci/setup_travis.sh b/src/scripts/ci/setup_travis.sh
index f03947476..95831f7fe 100755
--- a/src/scripts/ci/setup_travis.sh
+++ b/src/scripts/ci/setup_travis.sh
@@ -1,87 +1,63 @@
#!/bin/bash
-set -ev
-which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available
-git clone --depth 1 https://github.com/randombit/botan-ci-tools
+# Travis CI setup script for Botan build
+#
+# (C) 2015,2017 Simon Warta
+# (C) 2016,2017,2018 Jack Lloyd
-if [ "$TRAVIS_OS_NAME" = "linux" ]; then
+command -v shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available
- # ccache in Trusty is too old, use version from Xenial
- sudo dpkg -i botan-ci-tools/ubuntu/ccache_3.2.4-1_amd64.deb
+set -ev
+
+if [ "$TRAVIS_OS_NAME" = "linux" ]; then
if [ "$BUILD_MODE" = "valgrind" ]; then
sudo apt-get -qq update
sudo apt-get install valgrind
- elif [ "$BUILD_MODE" = "cross-win32" ]; then
- # See https://github.com/travis-ci/travis-ci/issues/6460
- sudo dpkg --add-architecture i386
- sudo apt-get -qq update # have to run this after --add-architecture
- sudo apt-get install wine g++-mingw-w64-i686 mingw-w64-i686-dev
+ elif [ "$BUILD_MODE" = "cross-win64" ]; then
+ sudo apt-get -qq update
+ sudo apt-get install wine g++-mingw-w64-x86-64
elif [ "${BUILD_MODE:0:5}" = "cross" ]; then
- # Need updated qemu
- sudo add-apt-repository -y ppa:ubuntu-cloud-archive/kilo-staging
sudo apt-get -qq update
- sudo apt-get install qemu-user
if [ "$BUILD_MODE" = "cross-arm32" ]; then
- sudo apt-get install g++-arm-linux-gnueabihf libc6-dev-armhf-cross
+ sudo apt-get install qemu-user g++-arm-linux-gnueabihf
elif [ "$BUILD_MODE" = "cross-arm64" ]; then
- sudo apt-get install g++-aarch64-linux-gnu libc6-dev-arm64-cross
+ sudo apt-get install qemu-user g++-aarch64-linux-gnu
elif [ "$BUILD_MODE" = "cross-ppc32" ]; then
- sudo apt-get install g++-powerpc-linux-gnu libc6-dev-powerpc-cross
+ sudo apt-get install qemu-user g++-powerpc-linux-gnu
elif [ "$BUILD_MODE" = "cross-ppc64" ]; then
- sudo apt-get install g++-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
+ sudo apt-get install qemu-user g++-powerpc64le-linux-gnu
+ elif [ "$BUILD_MODE" = "cross-mips64" ]; then
+ sudo apt-get install qemu-user g++-mips64-linux-gnuabi64
fi
elif [ "$BUILD_MODE" = "lint" ]; then
- pip install --user pylint==1.9.2
+ sudo apt-get -qq update
+ sudo apt-get install pylint
elif [ "$BUILD_MODE" = "coverage" ]; then
sudo apt-get -qq update
- sudo apt-get install trousers libtspi-dev
+ sudo apt-get install trousers libtspi-dev lcov python-coverage
- # SoftHSMv1 in 14.04 does not work
+ git clone --depth 1 https://github.com/randombit/botan-ci-tools
+
+ # FIXME use distro softhsm2 package instead
+ # need to figure out ownership problem
# Installs prebuilt SoftHSMv2 binaries into /tmp
tar -C / -xvjf botan-ci-tools/softhsm2-trusty-bin.tar.bz2
/tmp/softhsm/bin/softhsm2-util --init-token --free --label test --pin 123456 --so-pin 12345678
- # need updated lcov for gcc 4.8 coverage format
- sudo dpkg -i botan-ci-tools/ubuntu/lcov_1.12-2_all.deb
-
- (cd /home/travis/bin && ln -s gcov-4.8 gcov)
-
- pip install --user coverage
pip install --user codecov==2.0.10
- elif [ "$BUILD_MODE" = "sonar" ]; then
- sudo apt-get -qq update
- sudo apt-get install trousers libtspi-dev
- # installed llvm-3.4 conflicts with clang-3.9 in /usr/local
- # we need a more recent llvm-cov for coverage reports
- sudo apt-get remove llvm
-
- tar -C / -xvjf botan-ci-tools/softhsm2-trusty-bin.tar.bz2
- /tmp/softhsm/bin/softhsm2-util --init-token --free --label test --pin 123456 --so-pin 12345678
-
- wget https://sonarqube.com/static/cpp/build-wrapper-linux-x86.zip
- unzip build-wrapper-linux-x86.zip
-
elif [ "$BUILD_MODE" = "docs" ]; then
sudo apt-get -qq update
sudo apt-get install doxygen python-docutils
- # The version of Sphinx in 14.04 is too old (1.2.2) and does not support
- # all C++ features used in the manual. Install python-requests to avoid
- # problem in Ubuntu packaged version, see
- # http://stackoverflow.com/questions/32779919/no-module-named-for-requests
- #
- # Reinstall roman due to https://github.com/sphinx-doc/sphinx/issues/5022
- #
-
- sudo apt-get remove python-requests python-openssl python-roman
- sudo pip install requests pyopenssl roman sphinx==1.7.9
+ # Version of Sphinx in 16.04 is too old and dies on enum definitions
+ sudo pip install sphinx==1.7.9
fi
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then