forked from opensim-org/opensim-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[travis] First pass at caching again.
[skip appveyor]
- Loading branch information
1 parent
85ab51a
commit 57bad01
Showing
5 changed files
with
22 additions
and
254 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,9 +36,12 @@ env: | |
- OPENSIM_DEPENDENCIES_INSTALL_DIR=~/opensim_dependencies-install | ||
- SWIG_VER=3.0.8 | ||
- PATH="$PATH:$TRAVIS_BUILD_DIR/.github" | ||
- USE_CACHE=false | ||
- USE_CCACHE=1 | ||
- CCACHE_COMPRESS=1 | ||
# For Clang to work with ccache. | ||
- CCACHE_CPP2=1 | ||
|
||
cache: false | ||
cache: ccache | ||
|
||
addons: | ||
# Dependencies on linux. | ||
|
@@ -89,13 +92,13 @@ before_install: | |
# `/Users/travis/build.sh: line 109: shell_session_update: command not found` | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then rvm get head; fi | ||
|
||
########################################################################################################### | ||
############################################################################# | ||
# Temporary fix until llvm.org/apt is back up. Manually download clang binaries and use them. | ||
- if [[ "$TRAVIS_OS_NAME" = "linux" && $CC = *clang* ]]; then cd && wget http://llvm.org/releases/3.5.0/clang+llvm-3.5.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz; fi | ||
- if [[ "$TRAVIS_OS_NAME" = "linux" && $CC = *clang* ]]; then tar -xJf clang+llvm-3.5.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz; fi | ||
- if [[ "$TRAVIS_OS_NAME" = "linux" && $CC = *clang* ]]; then export CC="$HOME/clang+llvm-3.5.0-x86_64-linux-gnu/bin/clang"; fi | ||
- if [[ "$TRAVIS_OS_NAME" = "linux" && $CXX = *clang* ]]; then export CXX="$HOME/clang+llvm-3.5.0-x86_64-linux-gnu/bin/clang++"; fi | ||
########################################################################################################### | ||
############################################################################# | ||
|
||
## Ensure that there are no tabs in source code. | ||
# GREP returns 0 (true) if there are any matches, and | ||
|
@@ -112,6 +115,9 @@ before_install: | |
# to use the new gcc. | ||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi | ||
|
||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install ccache; fi | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then PATH=/usr/local/opt/ccache/libexec:$PATH; fi | ||
|
||
# Temporary fix until llvm.org/apt is up again. See above. | ||
# - if [[ "$TRAVIS_OS_NAME" = "linux" && "$CXX" = "clang++" ]]; then export CXX="clang++-3.5" CC="clang-3.5"; fi | ||
|
||
|
@@ -164,57 +170,29 @@ before_install: | |
- mkdir $OPENSIM_DEPENDENCIES_BUILD_DIR | ||
- cd $OPENSIM_DEPENDENCIES_BUILD_DIR | ||
- cmake $TRAVIS_BUILD_DIR/dependencies -DCMAKE_INSTALL_PREFIX=$OPENSIM_DEPENDENCIES_INSTALL_DIR -DCMAKE_BUILD_TYPE=$BTYPE -DSUPERBUILD_simbody=OFF | ||
####################################################################################################################### | ||
# Download the cached build directory, if one exists. | ||
####################################################################################################################### | ||
- BTK_SOURCE_DIR="${TRAVIS_BUILD_DIR}/dependencies/BTK" | ||
- BTK_BUILD_DIR="${OPENSIM_DEPENDENCIES_BUILD_DIR}/BTK" | ||
- source DownloadDepBuildFromCache.sh BTKCore $BTK_SOURCE_DIR $BTK_BUILD_DIR | ||
|
||
- make -j8 | ||
|
||
####################################################################################################################### | ||
# Cache BTK build directory. | ||
####################################################################################################################### | ||
- source UploadBuildToCache.sh BTKCore $BTK_SOURCE_DIR $BTK_BUILD_DIR | ||
|
||
# Force some cleanup of homebrew cache so we do not exceed availabe disk space | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew cleanup; rm -rf "`brew cache`"; fi | ||
|
||
|
||
install: | ||
####################################################################################################################### | ||
# Download the cached build directory, if one exists. | ||
####################################################################################################################### | ||
- source DownloadBuildFromCache.sh opensim-core $TRAVIS_BUILD_DIR ~/opensim-core-build | ||
|
||
####################################################################################################################### | ||
############################################################################# | ||
# Configure OpenSim. | ||
####################################################################################################################### | ||
############################################################################# | ||
- cd ~/opensim-core-build | ||
- cmake $TRAVIS_BUILD_DIR -DBUILD_JAVA_WRAPPING=$WRAP -DBUILD_PYTHON_WRAPPING=$WRAP -DSWIG_EXECUTABLE=$HOME/swig/bin/swig -DSIMBODY_HOME=~/simbody -DOPENSIM_DEPENDENCIES_DIR=$OPENSIM_DEPENDENCIES_INSTALL_DIR -DCMAKE_INSTALL_PREFIX=$OPENSIM_HOME -DCMAKE_BUILD_TYPE=$BTYPE -DCMAKE_CXX_FLAGS="$CXX_FLAGS" -DDOXYGEN_EXECUTABLE=$HOME/doxygen/doxygen-1.8.10/bin/doxygen -DOPENSIM_DOXYGEN_USE_MATHJAX=off -DOPENSIM_SIMBODY_DOXYGEN_LOCATION="https://simtk.org/api_docs/simbody/latest/" -DWITH_BTK:BOOL=ON | ||
|
||
####################################################################################################################### | ||
############################################################################# | ||
# Build OpenSim. | ||
####################################################################################################################### | ||
- BUILD_START_TIMESTAMP=$(date +%s) | ||
############################################################################# | ||
# Build java and python C++ wrapper separately to avoid going over the memory limit. | ||
- if [[ "$WRAP" = "on" ]]; then make -j$NPROC osimTools osimJavaJNI PythonBindings; fi | ||
# Build whatever remains (at least _opensim, tests and examples). | ||
- make -j$NPROC; | ||
|
||
####################################################################################################################### | ||
# Cache OpenSim build directory if current branch is master. | ||
####################################################################################################################### | ||
- source UploadBuildToCache.sh opensim-core $TRAVIS_BUILD_DIR ~/opensim-core-build | ||
- cd ~/opensim-core-build | ||
|
||
script: | ||
####################################################################################################################### | ||
# Find tests to exclude. Add them to TESTS_TO_EXCLUDE. | ||
####################################################################################################################### | ||
- source FindTestsToExclude.sh | ||
|
||
# Test OpenSim. | ||
# TODO On Debug, we need to tell travis not to timeout if it doesn't get | ||
# any output for more than 10 minutes. We do this using "travis_wait". | ||
|
@@ -270,6 +248,14 @@ script: | |
# We delete folders older than 30 days (`-mtime +30`). | ||
# The "shutdown" command shuts down the ssh environment. | ||
- if [ $CLEAN_UP_MYOSIN = "0" ]; then ssh opensim-bot,[email protected] 'cd /home/project-web/myosin/htdocs && find . -mindepth 1 -maxdepth 1 -type d -mtime +30 | xargs rm -rf && shutdown'; fi | ||
|
||
# Set the maximum size of the cache. | ||
# TODO 100 MB is not big enough. Using default limit of 1 GB for now. | ||
#- ccache --max-size 100M | ||
|
||
before_cache: | ||
# Show cache statistics. | ||
- ccache --show-stats | ||
|
||
before_deploy: | ||
# Zip up the installation using a file name that identifies where | ||
|