-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (71 loc) · 3.64 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
os: linux
dist: bionic
language: generic
sudo: required
git:
depth: 1
addons:
apt:
update:
- true
services:
- docker
before_install:
- docker pull fr3akyphantom/droid-builder:latest
before_script:
- cd $HOME && mkdir twrp
# download the TWRP Compressed Source Files from PhantomZone54's Release
# Uncomment & Use below line If Building for Lollipop-based Devices
# - TWRP_SOURCE="https://github.com/PhantomZone54/twrp_sources_norepo/releases/download/v3.3.1-20200222/MinimalOmniRecovery-twrp-5.1-norepo-20200222.tar.xz"
# Use below line If Building for Marshmallow-based Devices
#- TWRP_SOURCE="https://github.com/PhantomZone54/twrp_sources_norepo/releases/download/v3.3.1-20200222/MinimalOmniRecovery-twrp-6.0-norepo-20200222.tar.xz"
# Uncomment & Use below line If Building for Nougat-based Devices
#- TWRP_SOURCE="https://github.com/PhantomZone54/twrp_sources_norepo/releases/download/v3.3.1-20200222/MinimalOmniRecovery-twrp-7.1-norepo-20200222.tar.xz"
#- wget -q -O $HOME/twrp.tar.xz
- wget -q https://github.com/PhantomZone54/twrp_sources_norepo/releases/download/v3.3.1-20200222/MinimalOmniRecovery-twrp-9.0-norepo-20200222.tar.xz.aa
- wget -q https://github.com/PhantomZone54/twrp_sources_norepo/releases/download/v3.3.1-20200222/MinimalOmniRecovery-twrp-9.0-norepo-20200222.tar.xz.ab
- wget -q https://github.com/PhantomZone54/twrp_sources_norepo/releases/download/v3.3.1-20200222/MinimalOmniRecovery-twrp-9.0-norepo-20200222.tar.xz.ac
- wget -q https://github.com/PhantomZone54/twrp_sources_norepo/releases/download/v3.3.1-20200222/MinimalOmniRecovery-twrp-9.0-norepo-20200222.tar.xz.ad
- cd $HOME/twrp/ && cat ../*.tar.xz.* | tar -xJf -
- rm -rf $HOME/*.tar.xz.*
#- tar -xJf twrp.tar.xz --directory $HOME/twrp/ && rm twrp.tar.xz
- wget "https://forum.xda-developers.com/attachment.php?attachmentid=3662694&d=1456615111" -O busybox.zip
- unzip busybox.zip -d external/
- rm -rf $HOME/busybox.zip
script:
# Replace your $$USERNAME$$, $$REPO_URL$$, $$BRAND$$, $$DEVICE$$
- cd $HOME/twrp/ && git clone https://github.com/ghsoft/android_device_rk3328_box_rk3328.git device/Android/rk3328_box
- rm -rf bootable/recovery && git clone https://github.com/omnirom/android_bootable_recovery -b android-9.0 --depth 1 bootable/recovery
- |
docker run --rm -i -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd):/home/builder/twrp/:rw,z" -v "${HOME}/.ccache:/srv/ccache:rw,z" fr3akyphantom/droid-builder bash << EOF
cd /home/builder/twrp/
export ALLOW_MISSING_DEPENDENCIES=true
source build/envsetup.sh
# Choose build flavor as "eng" or "userdebug"
lunch omni_rk3328_box-userdebug
make -j$(nproc --all) 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/$$DEVICE$$/recovery.img $HOME/twrp/TWRP-$version-rk3328_box-$(date +"%Y%m%d")-Unofficial.img
- cd $HOME/twrp/
# Optional: You might need to switch from https://transfer.sh to https://file.io
# - curl -s --upload-file TWRP-$version-$$DEVICE$$-$(date +"%Y%m%d")-Unofficial.img https://transfer.sh/ && echo ""
deploy:
skip_cleanup: true
provider: releases
# The secret api_key will be loaded from the environment variables
api_key: $GitOAUTHToken
file_glob: true
file: $HOME/twrp/*.img
on:
tags: false
repo: ghsoft/android_device_rk3328_box_rk3328.git # Optional: If you want to deploy on different repository
branch: master # Optional: Needs to be exact as the config branch
branches:
only:
- master # Set travis builder branch(es) names
except:
- /^(?i:untagged)-.*$/
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/