From 62c6840f8a21bb65438f4b4de0b144e8c37851ce Mon Sep 17 00:00:00 2001 From: Youssif Shaaban Alsager Date: Sat, 17 Feb 2018 23:09:57 +0200 Subject: [PATCH] Create .travis.yml --- .travis.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e1c226c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,34 @@ +sudo: required +services: + - docker +before_install: + - docker pull yshalsager/cyanogenmod:latest +before_script: +- cd $HOME && mkdir twrp +- wget -q https://github.com/TwrpBuilder/twrp-sources/releases/download/omni_twrp-5.1.1-20180211/omni_twrp-5.1.1-20180211-norepo.tar.xz + -O $HOME/twrp.tar.xz +- tar -xJf twrp.tar.xz --directory $HOME/twrp/ && rm twrp.tar.xz +script: + - cd $HOME/twrp/ && git clone https://github.com/TwrpBuilder/android_device_UMI_Rome.git device/UMI/Rome + - git clone https://github.com/TwrpBuilder/device_generic_twrpbuilder.git device/generic/twrpbuilder + - rm -rf bootable/recovery && git clone https://github.com/omnirom/android_bootable_recovery.git bootable/recovery + - | + docker run --rm -i -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd):/home/cmbuild/twrp/:rw,z" yshalsager/cyanogenmod bash << EOF + cd /home/cmbuild/twrp/ + source build/envsetup.sh && lunch omni_Rome-userdebug && make -j16 recoveryimage + exit + EOF +after_success: + - export version=$(cat bootable/recovery/variables.h | grep "define TW_MAIN_VERSION_STR" | cut -d '"' -f2) + - cp $HOME/twrp/out/target/product/Rome/recovery.img $HOME/twrp/TWRP-$version-Rome-$(date +"%Y%m%d").img + +deploy: + skip_cleanup: true + provider: releases + api_key: "$GIT_OAUTH_TOKEN_TB" + file_glob: true + file: $HOME/twrp/*.img + on: + tags: false + repo: TwrpBuilder/android_device_UMI_Rome + branch: master