diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..9f39b47e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +env: + global: + - ANDROID_NDK_VERSION=r10e + - ANDROID_NDK_HOME=${TRAVIS_BUILD_DIR}/travis/android-ndk-${ANDROID_NDK_VERSION} + - PATH=${PATH}:${ANDROID_NDK_HOME} + +install: + - ./travis/install-dependencies.sh + +script: + - $ANDROID_NDK_HOME/ndk-build + +after_success: + - tar -zcvf minicap.tar.gz -C libs . + +deploy: + provider: releases + file: minicap.tar.gz + skip_cleanup: true + on: + tags: true + diff --git a/README.md b/README.md index 2f56c208..73b50f16 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # minicap +[![Build Status](https://travis-ci.org/quamotion/minicap.svg?branch=features%2Ftravis)](https://travis-ci.org/quamotion/minicap) Minicap provides a socket interface for streaming realtime screen capture data out of Android devices. It is meant to be used as a component in a larger program and is therefore not immensely useful just by itself. For example, it is being used in [STF](https://github.com/openstf/stf) for remote control. diff --git a/travis/.gitignore b/travis/.gitignore new file mode 100644 index 00000000..e97e9c42 --- /dev/null +++ b/travis/.gitignore @@ -0,0 +1 @@ +android-ndk-* diff --git a/travis/install-dependencies.sh b/travis/install-dependencies.sh new file mode 100755 index 00000000..5f0b1246 --- /dev/null +++ b/travis/install-dependencies.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Download and install the NDK +wget http://dl.google.com/android/ndk/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.bin -O travis/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.bin +chmod +x travis/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.bin +./travis/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.bin -otravis/ -y > /dev/null + +# Dump the environment variables +echo "ANDROID_NDK_HOME set to $ANDROID_NDK_HOME" +echo "PATH set to $PATH" +