This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
travis.yaml: fixes for osx
authorNicolas R <atoomic@cpan.org>
Mon, 13 Nov 2017 21:04:38 +0000 (15:04 -0600)
committerNicolas R <atoomic@cpan.org>
Mon, 13 Nov 2017 22:50:18 +0000 (16:50 -0600)
run brew update before installing ccache
use TRAVIS_OS_NAME macro to check os

.travis.yml

index 961a402..cd235e7 100644 (file)
@@ -12,8 +12,8 @@ compiler:
 install:
   - git fetch --unshallow --tags # t/porting/cmp_version.t
   # install & enable ccache on osx
-  - if [ -d /Applications ]; then brew install ccache; fi
-  - if [ -d /Applications ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ccache; fi
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
 
 env:
     global: