Travis CI: add configuration for testing on Mac OS X.
authorLei Zhang <antiagainst@google.com>
Wed, 16 Mar 2016 18:05:37 +0000 (14:05 -0400)
committerLei Zhang <antiagainst@google.com>
Thu, 17 Mar 2016 15:41:30 +0000 (11:41 -0400)
.travis.yml

index 02b66a8..3b7113e 100644 (file)
@@ -4,22 +4,28 @@ language: cpp
 
 os:
   - linux
+  - osx
 
 # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
 sudo: required
 dist: trusty
 
 env:
-  matrix:
-    # Each line is a set of environment variables set before a build.
-    # Thus each line represents a different build configuration.
-    - BUILD_TYPE=Release
-    - BUILD_TYPE=Debug
+  # Each line is a set of environment variables set before a build.
+  # Thus each line represents a different build configuration.
+  - BUILD_TYPE=Release
+  - BUILD_TYPE=Debug
 
 compiler:
   - clang
   - gcc
 
+matrix:
+  exclude:
+    # Skip GCC builds on Mac OS X.
+    - os: osx
+      compiler: gcc
+
 cache:
   apt: true
 
@@ -32,6 +38,10 @@ addons:
     packages:
       - ninja-build
 
+before_install:
+  # Install ninja on Mac OS X.
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi
+
 before_script:
   - git clone https://github.com/google/googletest.git external/googletest