Skip to content

Commit 4c2d515

Browse files
authored
Make cache robust to periodic deletions. (#341)
* Add test to check for cached Homebrew dirs - if it hasn't been installed, then do the install from Homebrew.
1 parent 3b226a7 commit 4c2d515

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
- numdiff
2424

2525
before_install:
26-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export DYLD_LIBRARY_PATH=$PWD/cvode/lib:$PWD/openlibm-0.4.1 ; fi
2726
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rm '/usr/local/include/c++' ; fi
27+
# if cached dirs exist, then continue. Otherwise, do the install from Homebrew
28+
- if [[ "$TRAVIS_OS_NAME" == "osx" && ! -d /usr/local/Cellar/gcc@4.9/4.9.4_1/bin ]] ; then brew update ; brew install gcc@4.9 libffi gettext ; fi
29+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export DYLD_LIBRARY_PATH=$PWD/cvode/lib:$PWD/openlibm-0.4.1 ; fi
2830
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./tools/install/install_cvode.sh $PWD /usr/local/Cellar/gcc@4.9/4.9.4_1/bin/gfortran-4.9 ; fi
2931
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./tools/install/install_cvode.sh $PWD /usr/bin/gfortran ; fi
3032
- ./tools/install/install_openlibm.sh $PWD

0 commit comments

Comments
 (0)