aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/ci
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-08-23 14:18:53 -0400
committerJack Lloyd <[email protected]>2016-08-24 10:33:41 -0400
commit7d37534d81819f5328336b489bee1d68cb4a129b (patch)
tree80a1d617912940377c248b72a9e58134189f3bf3 /src/scripts/ci
parent91474f60d72937ad3c21d8aa53c14f7a0cceb9ca (diff)
Use ccache for OS X Travis build
Notable speedup in OS X CI build times (from 12-18 minutes to 5-8 minutes) Increase ccache size to 100 megs. Print ccache stats at end of build. Doesn't work for the coverage build because the version of ccache in Trusty doesn't support the flag.
Diffstat (limited to 'src/scripts/ci')
-rwxr-xr-xsrc/scripts/ci/travis/build.sh26
-rwxr-xr-xsrc/scripts/ci/travis/install.sh17
2 files changed, 25 insertions, 18 deletions
diff --git a/src/scripts/ci/travis/build.sh b/src/scripts/ci/travis/build.sh
index 78fd75c52..8cdb6ccc9 100755
--- a/src/scripts/ci/travis/build.sh
+++ b/src/scripts/ci/travis/build.sh
@@ -20,30 +20,27 @@ if [ "$BOOST" = "y" ]; then
CFG_FLAGS+=(--with-boost)
fi
+CFG_FLAGS+=(--with-pkcs11 --prefix=/tmp/botan-installation)
+
# enable ccache
-if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$BUILD_MODE" != "sonarqube" ]; then
- ccache --max-size=30M
+if [ "$BUILD_MODE" != "sonarqube" ]; then
+ ccache --max-size=100M
ccache --show-stats
-
export CXX="ccache $CXX"
fi
# configure
if [ "$TARGETOS" = "ios32" ]; then
- ./configure.py "${CFG_FLAGS[@]}" --cpu=armv7 --cc=clang \
- --cc-abi-flags="-arch armv7 -arch armv7s -stdlib=libc++" \
- --with-pkcs11 --prefix=/tmp/botan-installation
+ ./configure.py "${CFG_FLAGS[@]}" --cpu=armv7 --cc=clang --cc-bin="$CXX" \
+ --cc-abi-flags="-arch armv7 -arch armv7s -stdlib=libc++"
elif [ "$TARGETOS" = "ios64" ]; then
- ./configure.py "${CFG_FLAGS[@]}" --cpu=armv8-a --cc=clang \
- --cc-abi-flags="-arch arm64 -stdlib=libc++" \
- --with-pkcs11 --prefix=/tmp/botan-installation
+ ./configure.py "${CFG_FLAGS[@]}" --cpu=armv8-a --cc=clang --cc-bin="$CXX" \
+ --cc-abi-flags="-arch arm64 -stdlib=libc++"
else
- $CXX --version
./configure.py "${CFG_FLAGS[@]}" --cc="$CC" --cc-bin="$CXX" \
- --with-bzip2 --with-lzma --with-openssl --with-sqlite --with-zlib \
- --with-pkcs11 --prefix=/tmp/botan-installation
+ --with-bzip2 --with-lzma --with-openssl --with-sqlite --with-zlib
fi
# build
@@ -55,6 +52,11 @@ else
make -j 2
fi
+# Show post-build ccache stats
+if [ "$BUILD_MODE" != "sonarqube" ]; then
+ ccache --show-stats
+fi
+
# Run SonarQube analysis
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$BUILD_MODE" = "sonarqube" ]; then
# => This will run a full analysis of the project and push results to the SonarQube server.
diff --git a/src/scripts/ci/travis/install.sh b/src/scripts/ci/travis/install.sh
index 387ccef6c..a9d38ed80 100755
--- a/src/scripts/ci/travis/install.sh
+++ b/src/scripts/ci/travis/install.sh
@@ -18,14 +18,19 @@ if [ "$BUILD_MODE" = "sonarqube" ]; then
unzip build-wrapper-linux-x86.zip
fi
-if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TARGETOS" != "ios" ]; then
+if [ "$TRAVIS_OS_NAME" = "osx" ]; then
# Workaround for https://github.com/Homebrew/homebrew/issues/42553
brew update || brew update
- brew install xz
- brew install python # python2
- brew install python3
+ brew install ccache
+
+ if [ "$TARGETOS" = "native" ]; then
+ brew install xz
+ brew install python # python2
+ brew install python3
+
+ # Boost 1.58 is installed on Travis OS X images
+ # brew install boost
+ fi
- # Boost 1.58 is installed on Travis OS X images
- # brew install boost
fi