Skip to content

Instantly share code, notes, and snippets.

@fmr
Last active March 14, 2017 22:02
Show Gist options
  • Save fmr/430c45eb93a000ec1f42 to your computer and use it in GitHub Desktop.
Save fmr/430c45eb93a000ec1f42 to your computer and use it in GitHub Desktop.
CI for Titanium SDK, based on https://github.com/yuchi/ti-cross-ci-experiments
language: objective-c
env:
- TI_SDK=3.5.0.GA PLATFORM=ios
- TI_SDK=3.5.1.GA PLATFORM=ios
- TI_SDK=3.5.0.GA PLATFORM=android
- TI_SDK=3.5.1.GA PLATFORM=android
script:
- ti build $TI_OPTS -p $PLATFORM
before_install:
- ./set_up_android.sh
- export TI_OPTS="--build-only --no-progress-bars --no-prompt --no-banner --log-level info"
- npm install -g titanium
- npm install -g alloy
- npm install
- mkdir -p $HOME/.titanium
- echo '{"loggedIn":true}' > $HOME/.titanium/auth_session.json
- titanium sdk install "$TI_SDK" $TI_OPTS
- sed -i -e "s/\(<sdk-version>\)\(.*\)\(<\/sdk-version>\)/\1${TI_SDK}\3/" tiapp.xml
#!/usr/bin/env bash
[[ "$PLATFORM" != "android" ]] && echo "Platform $PLATFORM is not android, skipping." && exit 0
echo "# Executing https://raw.github.com/embarkmobile/android-sdk-installer"
INSTALL_SCRIPT_URL=https://raw.github.com/embarkmobile/android-sdk-installer/version-2/android-sdk-installer
COMPONENTS=build-tools-19.1.0,android-17,sys-img-armeabi-v7a-android-17
INSTALLER_DIR=$HOME/.android-sdk-installer
if [[ ! -e "$INSTALLER_DIR/env" ]]; then
echo "# Downloading SDK installer"
curl -L $INSTALL_SCRIPT_URL | bash /dev/stdin --install=$COMPONENTS
fi
echo "# Setting environment variables"
source "$INSTALLER_DIR/env"
echo "# Creating AVD"
echo no | android create avd --force -n test -t android-17 --abi armeabi-v7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment