diff options
author | Simon Warta <[email protected]> | 2015-09-02 21:08:09 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-09-02 22:16:05 +0200 |
commit | 02c18eb420f695494395dffd5c13ef6f41617fc4 (patch) | |
tree | de332bdd286868638beb69890782c43c640fe5b3 /src/scripts/ci | |
parent | 67a02c23d4973b870c2ccf9acaa3c83ecff59f88 (diff) |
Update travis configuration for iOS build
Closes #188
Diffstat (limited to 'src/scripts/ci')
-rwxr-xr-x | src/scripts/ci/build.sh | 44 | ||||
-rwxr-xr-x | src/scripts/ci/install.sh | 11 | ||||
-rwxr-xr-x | src/scripts/ci/travis/after_success.sh (renamed from src/scripts/ci/after_success.sh) | 0 | ||||
-rwxr-xr-x | src/scripts/ci/travis/build.sh | 51 | ||||
-rwxr-xr-x | src/scripts/ci/travis/install.sh | 15 | ||||
-rwxr-xr-x | src/scripts/ci/travis/install_osx_packages.sh | 8 |
6 files changed, 74 insertions, 55 deletions
diff --git a/src/scripts/ci/build.sh b/src/scripts/ci/build.sh deleted file mode 100755 index 9bf7b0e84..000000000 --- a/src/scripts/ci/build.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -set -ev -which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available - -if [ "$BUILD_MODE" = "static" ]; then - CFG_FLAGS=(--disable-shared --via-amalgamation) -elif [ "$BUILD_MODE" = "shared" ]; then - CFG_FLAGS=() -elif [ "$BUILD_MODE" = "coverage" ]; then - # lcov gets confused by symlinks - CFG_FLAGS=(--build-mode=coverage --link-method=copy) -elif [ "$BUILD_MODE" = "sanitizer" ]; then - CFG_FLAGS=(--build-mode=sanitizer) -fi - -if [ "$MODULES" = "min" ]; then - 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 -./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 deleted file mode 100755 index 364d447bf..000000000 --- a/src/scripts/ci/install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -ev -which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available - -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/after_success.sh b/src/scripts/ci/travis/after_success.sh index 5cd01b39a..5cd01b39a 100755 --- a/src/scripts/ci/after_success.sh +++ b/src/scripts/ci/travis/after_success.sh diff --git a/src/scripts/ci/travis/build.sh b/src/scripts/ci/travis/build.sh new file mode 100755 index 000000000..8bb8c9380 --- /dev/null +++ b/src/scripts/ci/travis/build.sh @@ -0,0 +1,51 @@ +#!/bin/bash +set -ev +which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available + +if [ "$BUILD_MODE" = "static" ]; then + CFG_FLAGS=(--disable-shared --via-amalgamation) +elif [ "$BUILD_MODE" = "shared" ]; then + CFG_FLAGS=() +elif [ "$BUILD_MODE" = "coverage" ]; then + # lcov gets confused by symlinks + CFG_FLAGS=(--build-mode=coverage --link-method=copy) +elif [ "$BUILD_MODE" = "sanitizer" ]; then + CFG_FLAGS=(--build-mode=sanitizer) +fi + +if [ "$MODULES" = "min" ]; then + 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 + +if [ "$TARGETOS" = "ios" ]; then + ./configure.py "${CFG_FLAGS[@]}" --cpu=armv7 --cc=clang \ + --cc-abi-flags="-arch armv7 -arch armv7s -stdlib=libc++ --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/" \ + --prefix=/tmp/botan-installation +else + $CXX --version + ./configure.py "${CFG_FLAGS[@]}" --cc="$CC" --cc-bin="$CXX" \ + --with-bzip2 --with-lzma --with-openssl --with-sqlite --with-zlib \ + --prefix=/tmp/botan-installation +fi + +make -j 2 + +if [ "$MODULES" != "min" ] && [ "$TARGETOS" != "ios" ]; then + ./botan-test +fi + +make install diff --git a/src/scripts/ci/travis/install.sh b/src/scripts/ci/travis/install.sh new file mode 100755 index 000000000..447049f60 --- /dev/null +++ b/src/scripts/ci/travis/install.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -ev +which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available + +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 + +if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TARGETOS" != "ios" ]; then + ./src/scripts/ci/travis/install_osx_packages.sh +fi diff --git a/src/scripts/ci/travis/install_osx_packages.sh b/src/scripts/ci/travis/install_osx_packages.sh new file mode 100755 index 000000000..1d4a5e001 --- /dev/null +++ b/src/scripts/ci/travis/install_osx_packages.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -ev +which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available + +# Workaround for https://github.com/Homebrew/homebrew/issues/42553 +brew update || brew update + +brew install xz |