aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-09-02 22:40:10 +0200
committerSimon Warta <[email protected]>2015-09-02 22:40:10 +0200
commitf11335d8e07a8c895a13399daae2f054eccc2e21 (patch)
treede332bdd286868638beb69890782c43c640fe5b3
parent67a02c23d4973b870c2ccf9acaa3c83ecff59f88 (diff)
parent02c18eb420f695494395dffd5c13ef6f41617fc4 (diff)
Merge pull request #271 from webmaster128/travis-ios
Update travis configuration for iOS build
-rw-r--r--.travis.yml37
-rwxr-xr-xsrc/scripts/ci/build.sh44
-rwxr-xr-xsrc/scripts/ci/install.sh11
-rwxr-xr-xsrc/scripts/ci/travis/after_success.sh (renamed from src/scripts/ci/after_success.sh)0
-rwxr-xr-xsrc/scripts/ci/travis/build.sh51
-rwxr-xr-xsrc/scripts/ci/travis/install.sh15
-rwxr-xr-xsrc/scripts/ci/travis/install_osx_packages.sh8
7 files changed, 98 insertions, 68 deletions
diff --git a/.travis.yml b/.travis.yml
index 3044c8dfd..2f268564c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,32 +18,41 @@ os:
- linux
- osx
+osx_image: xcode6.4
+
compiler:
- clang
- gcc
env:
matrix:
- - MODULES="all" BUILD_MODE="shared"
- - MODULES="all" BUILD_MODE="static"
- - MODULES="all" BUILD_MODE="coverage"
- - MODULES="all" BUILD_MODE="sanitizer"
+ - TARGETOS="desktop" MODULES="all" BUILD_MODE="shared"
+ - TARGETOS="desktop" MODULES="all" BUILD_MODE="static"
+ - TARGETOS="desktop" MODULES="all" BUILD_MODE="coverage"
+ - TARGETOS="desktop" MODULES="all" BUILD_MODE="sanitizer"
+
+ - TARGETOS="desktop" MODULES="min" BUILD_MODE="shared"
+ - TARGETOS="desktop" MODULES="min" BUILD_MODE="static"
- - MODULES="min" BUILD_MODE="shared"
- - MODULES="min" BUILD_MODE="static"
+ - TARGETOS="ios" MODULES="all" BUILD_MODE="shared"
+ - TARGETOS="ios" MODULES="all" BUILD_MODE="static"
matrix:
exclude:
- os: osx
compiler: gcc
- compiler: clang
- env: MODULES="all" BUILD_MODE="coverage"
+ env: TARGETOS="desktop" MODULES="all" BUILD_MODE="coverage"
- compiler: clang
- env: MODULES="all" BUILD_MODE="sanitizer"
+ env: TARGETOS="desktop" MODULES="all" BUILD_MODE="sanitizer"
- compiler: clang
- env: MODULES="min" BUILD_MODE="shared"
+ env: TARGETOS="desktop" MODULES="min" BUILD_MODE="shared"
- compiler: clang
- env: MODULES="min" BUILD_MODE="static"
+ env: TARGETOS="desktop" MODULES="min" BUILD_MODE="static"
+ - os: linux
+ env: TARGETOS="ios" MODULES="all" BUILD_MODE="shared"
+ - os: linux
+ env: TARGETOS="ios" MODULES="all" BUILD_MODE="static"
# END BUILD MATRIX
cache:
@@ -51,13 +60,13 @@ cache:
- $HOME/.ccache
install:
- - ./src/scripts/ci/install.sh
+ - ./src/scripts/ci/travis/install.sh
script:
- - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./src/scripts/ci/build.sh ; fi
+ - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./src/scripts/ci/travis/build.sh ; fi
after_success:
- - ./src/scripts/ci/after_success.sh
+ - ./src/scripts/ci/travis/after_success.sh
notifications:
@@ -72,6 +81,8 @@ addons:
- libssl-dev
- libsqlite3-dev
- zlib1g-dev
+ - libbz2-dev
+ - liblzma-dev
coverity_scan:
project:
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