# Copyright 2010-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
sudo: false
os:
- linux
- osx
language: cpp
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- ant
- clang-3.4
- libc6:i386
- libglib2.0-dev
- libgtk2.0-dev
- libibus-1.0-dev
- libjsr305-java
- libncurses5:i386
- libqt4-dev
- libstdc++-4.8-dev
- libstdc++6:i386
- libxcb-xfixes0-dev
- openjdk-7-jdk
- openjdk-7-jre-headless
- pkg-config
- zip
- zlib1g:i386
env:
- TARGET_PLATFORM=Android
- TARGET_PLATFORM=Linux
- TARGET_PLATFORM=NaCl
- TARGET_PLATFORM=Mac
install:
- if [ $TRAVIS_OS_NAME == linux ]; then git -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git; fi
- if [ $TRAVIS_OS_NAME == linux ]; then export PATH="$PATH":`pwd`/src/third_party/depot_tools; fi
- if [ $TRAVIS_OS_NAME == linux ]; then unset CC; fi
- if [ $TRAVIS_OS_NAME == linux ]; then unset CXX; fi
- if [ $TARGET_PLATFORM == Mac ]; then git -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git; fi
- if [ $TARGET_PLATFORM == Mac ]; then export PATH="$PATH":`pwd`/src/third_party/depot_tools; fi
- if [ $TARGET_PLATFORM == NaCl ]; then cd src/third_party && curl -LO http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip && unzip nacl_sdk.zip && rm nacl_sdk.zip && cd nacl_sdk && ./naclsdk install pepper_45 && cd ../../../; fi
- if [ $TARGET_PLATFORM == Android ]; then cd src/third_party && curl -L http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin -O && chmod u+x android-ndk-r10e-linux-x86_64.bin && ./android-ndk-r10e-linux-x86_64.bin > /dev/null && rm android-ndk-r10e-linux-x86_64.bin && curl -L http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -zx && cd ../../; fi
- if [ $TARGET_PLATFORM == Android ]; then export ANDROID_NDK_HOME=`pwd`/src/third_party/android-ndk-r10e ; fi
- if [ $TARGET_PLATFORM == Android ]; then export ANDROID_HOME=`pwd`/src/third_party/android-sdk-linux ; fi
- if [ $TARGET_PLATFORM == Android ]; then export PATH="$PATH":${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}; fi
- if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter android-22; fi
- if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter build-tools-22.0.0; fi
- if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter extra-android-support; fi
- if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter platform-tool; fi
script:
- cd ./src
- if [ $TARGET_PLATFORM == Android ]; then python build_mozc.py gyp --target_platform=Android; fi
- if [ $TARGET_PLATFORM == Android ]; then python build_mozc.py build -c Release package; fi
- if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py gyp --target_platform=Linux; fi
- if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py build -c Release package; fi
- if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py runtests -c Release; fi
- if [ $TARGET_PLATFORM == NaCl ]; then python build_mozc.py gyp --target_platform=NaCl --nacl_sdk_root=`pwd`/third_party/nacl_sdk/pepper_45; fi
- if [ $TARGET_PLATFORM == NaCl ]; then python build_mozc.py build -c Release package; fi
- if [ $TARGET_PLATFORM == Mac ]; then GYP_DEFINES="mac_sdk=10.9 mac_deployment_target=10.8" python build_mozc.py gyp --noqt; fi
- if [ $TARGET_PLATFORM == Mac ]; then python build_mozc.py build -c Release mac/mac.gyp:GoogleJapaneseInput mac/mac.gyp:gen_launchd_confs; fi
- if [ $TARGET_PLATFORM == Mac ]; then python build_mozc.py runtests -c Release; fi
matrix:
exclude:
- os: linux
env: TARGET_PLATFORM=Mac
- os: osx
env: TARGET_PLATFORM=Android
- os: osx
env: TARGET_PLATFORM=Linux
- os: osx
env: TARGET_PLATFORM=NaCl