mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
72 lines
2.5 KiB
YAML
72 lines
2.5 KiB
YAML
env:
|
|
global:
|
|
- DATE=$(date +%Y-%m-%d)
|
|
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
|
|
- PACKAGE_NAME=tns-core-modules
|
|
- NODE_VERSION=5.10.1
|
|
- EMULATOR_API_VER=21
|
|
# HACK: revert to `next` runtime as soon as the console.log issue is fixed
|
|
- RUNTIMEVERSION=2.5.0
|
|
- AVD_NAME=Arm$EMULATOR_API_VER
|
|
addons:
|
|
artifacts:
|
|
paths:
|
|
- "$HOME/test-run-results$PACKAGE_VERSION.xml"
|
|
sudo: false
|
|
language: android
|
|
node_js:
|
|
- 4.2.3
|
|
jdk:
|
|
- oraclejdk8
|
|
android:
|
|
components:
|
|
- platform-tools
|
|
- tools
|
|
- build-tools-23.0.3
|
|
- android-$EMULATOR_API_VER
|
|
- android-23
|
|
- extra-android-support
|
|
- extra-android-m2repository
|
|
- sys-img-armeabi-v7a-android-$EMULATOR_API_VER
|
|
before_script:
|
|
- nvm install $NODE_VERSION
|
|
- npm install -g grunt-cli
|
|
- npm install
|
|
- echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi
|
|
default/armeabi-v7a -c 12M
|
|
- emulator -avd $AVD_NAME -no-audio -no-window &
|
|
- android-wait-for-emulator
|
|
- adb shell input keyevent 82 &
|
|
script:
|
|
- jdk_switcher use oraclejdk8
|
|
- grunt default --verbose
|
|
- FULL_PACKAGE_VERSION=$(node build/version.js)
|
|
- (cd tns-platform-declarations && npm pack)
|
|
- wget -O ./nativescript.tgz "https://s3.amazonaws.com/nativescript-ci/build_result/nativescript.tgz"
|
|
- echo no | npm install -g nativescript.tgz --ignore-scripts
|
|
- tns usage-reporting disable && tns error-reporting disable
|
|
- grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
|
|
- grunt runOnlyTestsApp --verbose --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
|
|
- node ./build/travis-scripts/check-testrun-broken.js
|
|
- adb pull /storage/sdcard/Documents/test-results.xml
|
|
- mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml
|
|
before_deploy:
|
|
- mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage
|
|
- mv build ../
|
|
- cd ..
|
|
- rm -rf NativeScript
|
|
- tar -zxvf .deploymentpackage
|
|
- mv package $PACKAGE_NAME
|
|
- cd $PACKAGE_NAME
|
|
- rm ../.deploymentpackage
|
|
- mv ../build ./
|
|
- node ./build/travis-scripts/add-publishConfig.js internal-preview
|
|
deploy:
|
|
provider: npm
|
|
email: nativescript@telerik.com
|
|
on:
|
|
branch: master
|
|
skip_cleanup: true
|
|
api_key:
|
|
secure: VJksODKcxXltNTU1Unv4V3qZMI5rrAupuxnCUpIBxks6azi6/FvcW6ctMOj5wPQ9cQKPa8SgaKF/ksyueTmcUt+RznBWbGJ3lxe+6MF0Uk7OI3M3Ga8Ke/21KcZ1oIysgZ0JGCmyR9iAIoSHK1KarIYfiYo9dGWOSuDkqJzLTjk=
|