travis: add MacOS Scons build
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 30 Jul 2019 15:18:10 +0000 (16:18 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Sun, 4 Aug 2019 10:11:32 +0000 (11:11 +0100)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
.travis.yml

index f7d372e0b2e206a067e2c0ffa477efdeed4095fc..770ba8dbc2dcaa3d6087fa10b8c6712a95458d1a 100644 (file)
@@ -9,8 +9,22 @@ env:
   global:
     - PKG_CONFIG_PATH=""
 
+matrix:
+  include:
+    - env:
+      - BUILD=meson
+    - env:
+      - BUILD=scons
+
 before_install:
-  - HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
+  - HOMEBREW_NO_AUTO_UPDATE=1 brew install expat gettext
+  - if test "x$BUILD" = xmeson; then
+      HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja;
+    fi
+  - if test "x$BUILD" = xscons; then
+      HOMEBREW_NO_AUTO_UPDATE=1 brew install python2 scons;
+    fi
+
   # Set PATH for homebrew pip3 installs
   - PATH="$HOME/Library/Python/3.6/bin:${PATH}"
   # Set PKG_CONFIG_PATH for keg-only expat
@@ -28,10 +42,21 @@ before_install:
   - PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
 
 install:
-  - pip3 install --user meson
-  - pip3 install --user mako
+  - if test "x$BUILD" = xmeson; then
+      pip3 install --user meson;
+      pip3 install --user mako;
+    fi
+  - if test "x$BUILD" = xscons; then
+      pip2 install --user mako;
+    fi
 
 script:
-  - meson _build -Dbuild-tests=true
-  - ninja -C _build
-  - ninja -C _build test
+  - if test "x$BUILD" = xmeson; then
+      meson _build -Dbuild-tests=true;
+      ninja -C _build;
+      ninja -C _build test;
+    fi
+  - if test "x$BUILD" = xscons; then
+      scons;
+      scons check;
+    fi