forked from tidev/titanium-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (58 loc) · 2.32 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
language: objective-c
jdk:
- oraclejdk7
install:
- ANDROID_SDK_PACKAGE=android-sdk_r24.0.1-macosx.zip
- ANDROID_NDK_PACKAGE=android-ndk-r8c-darwin-x86.tar.bz2
- export TITANIUM_ANDROID_API="23"
- # Need to install jq to process the JSON
- brew update
- brew install jq # process JSON
- brew install scons # for building SDK
-
- sudo npm install -g titanium
-
- export TITANIUM_ROOT=`ti sdk list -o json | jq -r '.defaultInstallLocation'`
- export TITANIUM_SDK=`ti sdk list -o json | jq -r '.installed[.activeSDK]'`
- mkdir -p "$TITANIUM_ROOT/sdks/"
-
- export SDKS="$TRAVIS_BUILD_DIR/sdks"
- echo $SDKS
- mkdir -p "$SDKS"
- if [ ! -d "$SDKS/android-sdk-macosx" ]; then cd "$SDKS"; wget http://dl.google.com/android/$ANDROID_SDK_PACKAGE; unzip -o $ANDROID_SDK_PACKAGE; fi
- export ANDROID_SDK=${PWD}/android-sdk-macosx
- export PATH=${PATH}:${ANDROID_SDK}/tools:${ANDROID_SDK}/platform-tools
-
- # Install required Android components.
- echo yes | android -s update sdk --no-ui --all --filter tools,platform-tools,build-tools-$TITANIUM_ANDROID_API.0.0,extra-android-support,android-22,android-$TITANIUM_ANDROID_API,addon-google_apis-google-$TITANIUM_ANDROID_API,sys-img-armeabi-v7a-android-22
- # Install required Android NDK
- if [ ! -d "$SDKS/android-ndk-r8c" ]; then wget http://dl.google.com/android/ndk/$ANDROID_NDK_PACKAGE; tar xzf $ANDROID_NDK_PACKAGE; fi
- export ANDROID_NDK=${PWD}/android-ndk-r8c
-
- # Install required Titanium build
- git clone https://github.com/ingo/titanium_build.git "$SDKS/titanium_build"
- ls "$SDKS/titanium_build"
-
- sudo easy_install pyyaml
- sudo easy_install Pygments
-
- export ANDROID_PLATFORM=$ANDROID_SDK/platforms/android-$TITANIUM_ANDROID_API
- export GOOGLE_APIS=$ANDROID_SDK/add-ons/addon-google_apis-google-$TITANIUM_ANDROID_API
before_script:
- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
- echo yes | emulator -avd test -no-skin -no-audio -no-window &
script:
- df -h
- export TITANIUM_BUILD="$SDKS/titanium_build"
- echo $TITANIUM_BUILD
- cd $TRAVIS_BUILD_DIR
- source $TITANIUM_BUILD/mobile/driver_travis.sh $TRAVIS_BRANCH
- npm install
- df -h
- ls dist
- cd dist
- ti sdk install *osx.zip
- cd ..
- npm test -- run-on-travis
after_success:
- #upload test results somewhere