forked from tidev/titanium-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
45 lines (43 loc) · 1.98 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
language: objective-c
osx_image: xcode8
jdk:
- oraclejdk7
install:
- ANDROID_SDK_PACKAGE=android-sdk_r24.0.1-macosx.zip
- ANDROID_NDK_PACKAGE=android-ndk-r11c-darwin-x86_64.zip
- export TITANIUM_ANDROID_API="23"
- 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 android-$TITANIUM_ANDROID_API
- echo yes | android -s update sdk --no-ui --all --filter addon-google_apis-google-$TITANIUM_ANDROID_API
- echo yes | android -s update sdk --no-ui --all --filter tools
- echo yes | android -s update sdk --no-ui --all --filter platform-tools
- echo yes | android -s update sdk --no-ui --all --filter build-tools-$TITANIUM_ANDROID_API.0.3
- echo yes | android -s update sdk --no-ui --all --filter extra-android-support
- echo yes | android -s update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-22
- # Install required Android NDK
- if [ ! -d "$SDKS/android-ndk-r11c" ]; then wget http://dl.google.com/android/repository/$ANDROID_NDK_PACKAGE; unzip -q -o $ANDROID_NDK_PACKAGE; fi
- export ANDROID_NDK=${PWD}/android-ndk-r11c
-
- export ANDROID_PLATFORM=$ANDROID_SDK/platforms/android-$TITANIUM_ANDROID_API
- export GOOGLE_APIS=$ANDROID_SDK/add-ons/addon-google_apis-google-$TITANIUM_ANDROID_API
script:
- cd $TRAVIS_BUILD_DIR
- "export VERSION=`sed -n 's/^ *\"version\": *\"//p' package.json | tr -d '\"' | tr -d ','`"
- export TIMESTAMP=`date +'%Y%m%d%H%M%S'`
- export VTAG=$VERSION.v$TIMESTAMP
- cd build
- npm install .
- node scons.js build
- node scons.js package --version-tag $VTAG
- cd ..
- npm install
- ls dist
- npm install grunt-cli
- npm test