Files
yoga/.travis.yml
Robert Spencer 6928957096 Set ANDROID_SDK and ANDROID_HOME for Travis build
Summary: Travis builds are failing due to ANDROID_SDK not being set.  So we set both it and ANDROID_HOME to where homebrew should have created a link to the installation.

Reviewed By: emilsjolander

Differential Revision: D4571703

fbshipit-source-id: a6dc4eb07006dc8baefb6ca938111ff256c6f018
2017-02-16 02:58:45 -08:00

104 lines
2.2 KiB
YAML

# Copyright (c) 2014-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
os: osx
osx_image: xcode8.2
language: cpp
compiler: clang
env:
- TARGET=c
- TARGET=java
- TARGET=net
- TARGET=ios
- TARGET=js
- TARGET=android
before_install:
- brew update
- brew tap facebook/fb
- brew install buck
# Java
- |
if [[ $TARGET = "java" ]]; then
brew cask install java;
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8);
export PATH=$JAVA_HOME/bin:$PATH;
fi
# .NET
- |
if [[ $TARGET = "net" ]]; then
brew install mono;
fi
# iOS
- |
if [[ $TARGET = "ios" ]]; then
brew outdated xctool || brew upgrade xctool;
fi
# JavaScript
- |
if [[ $TARGET = "js" ]]; then
cd javascript;
npm install;
fi
# Android
- |
if [[ $TARGET = "android" ]]; then
brew cask install java;
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8);
export PATH=$JAVA_HOME/bin:$PATH;
brew install android-sdk;
export ANDROID_SDK=/usr/local/opt/android-sdk
export ANDROID_HOME=/usr/local/opt/android-sdk
fi
script:
# C
- |
if [[ $TARGET = "c" ]]; then
buck test --verbose 0 //:yoga &&
buck run --verbose 0 //benchmark:benchmark &&
git checkout HEAD^ &&
buck run --verbose 0 //benchmark:benchmark;
fi
# Java
- |
if [[ $TARGET = "java" ]]; then
buck test --verbose 0 //java:java;
fi
# .NET
- |
if [[ $TARGET = "net" ]]; then
sh csharp/tests/Facebook.Yoga/test_macos.sh;
fi
# iOS
- |
if [[ $TARGET = "ios" ]]; then
buck test --verbose 0 //YogaKit:YogaKitTests --config cxx.default_platform=iphonesimulator-x86_64;
fi
# JavaScript
- |
if [[ $TARGET = "js" ]]; then
npm run test:all &&
npm run bench;
fi
# Android
- |
if [[ $TARGET = "android" ]]; then
buck build --verbose 0 //android/sample:sample
fi