From b41f1c0e4dcd521ac3bb365ce7b10d09a0fed5c1 Mon Sep 17 00:00:00 2001 From: Tilman Kamp Date: Thu, 2 Jun 2016 15:00:44 +0200 Subject: [PATCH] Enabling OSX build Signed-off-by: Tilman Kamp --- .gitignore | 2 ++ .travis.yml | 27 +++++++++++++++++++-------- build-java-bindings.sh | 2 +- travis-build.sh | 7 +++++++ travis-prepare.sh | 9 +++++++++ 5 files changed, 38 insertions(+), 9 deletions(-) create mode 100755 travis-build.sh create mode 100755 travis-prepare.sh diff --git a/.gitignore b/.gitignore index 7b2744d..9d4804a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /target/* /sphinxbase/* /src/main/* +/src/programs/.libs/* /swig/java/edu/* /swig/java/pocketsphinx*.zip /swig/java/*.jar @@ -25,6 +26,7 @@ /depcomp /ltmain.sh /missing +/model/languagemodel* # Generated Makefiles Makefile diff --git a/.travis.yml b/.travis.yml index f6ea8b1..59d55fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,26 @@ -language: c -jdk: openjdk8 +language: java sudo: required + +os: +- linux +- osx + +env: +- CROSS=true +- CROSS=false + +matrix: + exclude: + - os: osx + env: CROSS=true + dist: trusty -script: -- ./build-java-bindings.sh +before_install: +- ./travis-prepare.sh -addons: - apt: - packages: - - swig +script: +- ./travis-build.sh deploy: provider: releases diff --git a/build-java-bindings.sh b/build-java-bindings.sh index f4800a0..84bb2b1 100755 --- a/build-java-bindings.sh +++ b/build-java-bindings.sh @@ -36,5 +36,5 @@ cd model for d in */; do name="${d%/}" echo "Model: $name..." - zip languagemodel-$name.zip $name + zip -r languagemodel-$name.zip $name done diff --git a/travis-build.sh b/travis-build.sh new file mode 100755 index 0000000..c33c589 --- /dev/null +++ b/travis-build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [[ `uname` == 'Darwin' ]]; then + export JAVA_HOME=`/usr/libexec/java_home` +fi + +./build-java-bindings.sh diff --git a/travis-prepare.sh b/travis-prepare.sh new file mode 100755 index 0000000..47d3b3a --- /dev/null +++ b/travis-prepare.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "##### Installing swig..." +if [[ `uname` == 'Darwin' ]]; then + brew update + brew install swig +else + sudo apt-get install -y swig +fi