diff options
author | Jack Lloyd <[email protected]> | 2016-08-24 15:37:05 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-08-28 02:45:52 -0400 |
commit | dd72aeece8b59bbf9756c4868da7688b446c73a4 (patch) | |
tree | 989b02911296c155987071e778549638215fe409 /src/scripts/ci/travis/install.sh | |
parent | e6b9f54307f50de5d6ee05a33f772edce8cc2721 (diff) |
Travis CI additions and cleanup
Convert Travis build configuration to a single var instead of 4 tuple.
Makes it much easier to review the builds in the Travis web UI.
Adds sanitizer builds for Clang on both Linux and OS X. Clang is a different
compiler from GCC and its sanitizers may catch things GCC does not.
I have no idea if Apple's Clang has some magic sanitizer sauce stock
LLVM does not, so maybe sanitizer build on OS X can be skipped.
Adds Linux cross compile targets for ARM32, ARM64, PPC64, and MinGW x86
using the cross compiler available in Trusty. All of them build and are
set up to run through qemu/wine. All of the tests currently fail and
so are marked as expected fail in the Travis matrix.
The ARM test runs seem to have thread problems; ARM32 thread creation just fails
with an exception, as if pthreads was disabled. All other tests pass ok for ARM32.
On Aarch64, it looks like there is a hard crash the first time the library tries
creating a thread. Both of these might be due to statically linking the binary?
I have been unable to convince Ubuntu's qemu-ppc64 to execute binaries compiled by
Ubuntu's ppc64 cross compiler. I'm downloading an Ubuntu ISO to try this in a VM.
Running under Wine exposes several issues, both in Wine and Botan. Many functions are
stubs and it appears that entropy collection fails as a result. This triggers a bug
in the FFI tests which causes a crash there.
A pox on time zones; _mkgmtime is a MSVC extension and is not available on MinGW GCC.
Add a last resort call that just uses the localzone variant instead.
Adds valgrind target, remove a bogus poison in pubkey.cpp (it was effectively
asserting that all of RSA was const time which is sadly not true at all).
Moves -Wshadow to maintainer mode for GCC - GCC 4.8 has a noisy variant of -Wshadow
which warns if a parameter masks a function name, but this comes up all the time
in constructors. Later GCCs no longer warn about this (even with -Wshadow), so the
warnings are never fixed, but they cause noise in CI output and hide interesting
warnings like
warning: vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores [-Wdeprecated]
__vector unsigned char perm = vec_lvsl(0, static_cast<u32bit*>(nullptr));
Diffstat (limited to 'src/scripts/ci/travis/install.sh')
-rwxr-xr-x | src/scripts/ci/travis/install.sh | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/scripts/ci/travis/install.sh b/src/scripts/ci/travis/install.sh index a9d38ed80..987438127 100755 --- a/src/scripts/ci/travis/install.sh +++ b/src/scripts/ci/travis/install.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -ev which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available @@ -18,13 +18,38 @@ if [ "$BUILD_MODE" = "sonarqube" ]; then unzip build-wrapper-linux-x86.zip fi +if [ "$TRAVIS_OS_NAME" = "linux" ]; then + if [ "$BUILD_MODE" = "valgrind" ] || [ "${BUILD_MODE:0:5}" = "cross" ]; then + sudo apt-get -qq update + + if [ "$BUILD_MODE" = "valgrind" ]; then + sudo apt-get install valgrind + elif [ "$BUILD_MODE" = "cross-arm32" ]; then + sudo apt-get install g++-4.8-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user + elif [ "$BUILD_MODE" = "cross-arm64" ]; then + sudo apt-get install g++-4.8-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user + elif [ "$BUILD_MODE" = "cross-ppc32" ]; then + sudo apt-get install g++-4.8-powerpc-linux-gnu libc6-dev-powerpc-cross qemu-user + elif [ "$BUILD_MODE" = "cross-ppc64" ]; then + sudo apt-get install g++-4.8-powerpc64le-linux-gnu libc6-dev-ppc64el-cross qemu-user + elif [ "$BUILD_MODE" = "cross-win32" ]; then + sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev + + # See https://github.com/travis-ci/travis-ci/issues/6460 + sudo dpkg --add-architecture i386 + sudo apt-get -qq update # have to update again due to adding i386 above + sudo apt-get install wine + fi + fi +fi + if [ "$TRAVIS_OS_NAME" = "osx" ]; then # Workaround for https://github.com/Homebrew/homebrew/issues/42553 brew update || brew update brew install ccache - if [ "$TARGETOS" = "native" ]; then + if [ "$BUILD_MODE" != "cross-arm32" ] && [ "$BUILD_MODE" != "cross-arm64" ]; then brew install xz brew install python # python2 brew install python3 |