-
Notifications
You must be signed in to change notification settings - Fork 3
141 lines (119 loc) · 5.58 KB
/
build.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: TWRP
on:
push:
branches:
- 'twrp-12.1'
paths:
- 'version.mk'
jobs:
build:
name: Build TWRP by ${{ github.actor }}
runs-on: ubuntu-20.04
if: github.event.repository.owner.id == github.event.sender.id
permissions:
contents: write
steps:
- name: Check Out
uses: actions/checkout@v3
- name: Cleanup
uses: rokibhasansagar/slimhub_actions@main
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 12
- name: Prepare the environment
run: |
sudo apt update
sudo apt -y upgrade
sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev libtinfo5 libgflags-dev
sudo add-apt-repository universe
sudo apt -y install libncurses5
- name: Install OpenJDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- name: Install Git-Repo
run: |
mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
sudo ln -sf ~/bin/repo /usr/bin/repo
- name: Initialize Repo
run: |
mkdir twrp
cd twrp
git config --global user.name "Carlo Dee"
git config --global user.email "[email protected]"
repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-12.1
repo sync -j$(nproc --all) --force-sync
- name: Clone Device Tree
run: |
cd twrp
git clone https://github.com/cd-Crypton/custom_recovery_tree_nokia_cap_sprout.git -b twrp-12.1 ./device/nokia/cap_sprout
cd device/nokia/cap_sprout
echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "VERSION=$(cat version.mk | grep '^TW_DEVICE_VERSION' | awk '{print $3}')" >> $GITHUB_ENV
- name: Building Image
run: |
cd twrp
source build/envsetup.sh
export ALLOW_MISSING_DEPENDENCIES=true
lunch twrp_cap_sprout-eng && make clean && make recoveryimage -j$(nproc --all)
cd out/target/product/cap_sprout
mv recovery.img twrp-3.7.0_12-cap_sprout-${{ env.VERSION }}.img
echo "Done building your twrp-3.7.0_12-cap_sprout-${{ env.VERSION }}.img"
- name: Set Properties
run: |
echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
echo -e \
"
## Unofficial Build for Nokia 5.3 (CAP_sprout)
_Note: Flash at your own risk. This build were still in the process of testing._
### Resources
* [TWRP Manifest](https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp/tree/twrp-12.1)
* [Device Tree](https://github.com/cd-Crypton/custom_recovery_tree_nokia_cap_sprout/tree/twrp-12.1)
Build Device: CAP_sprout
Build Date: 12/25/2023
Build Release: Unofficial Beta
Build Branch: 12.1 (v3.7.0)
Compatibility: Android 12+
Custom Version: ${{ env.VERSION }}
### Features
* [What's working?](https://github.com/cd-Crypton/custom_recovery_tree_nokia_cap_sprout/tree/twrp-12.1?tab=readme-ov-file#features)
### Issues and Bugs
* Flashing OTA firmware file, it was not tested.
* FastbootD mode weren't fully tested.
* Flashing ZIPs weren't fully tested.
* Tell me more...
### How to flash?
Despite having A/B Partition Scheme, it has dedicated recovery ramdisk. You can install without using the usual A/B installation process.
Now, assuming you already have unlocked bootloader, your PC has adb/fastboot installed, and platform tools. Let's begin.
Note: Flash at your own risk.
1. Download the .img file from the release page.
2. Place the image file inside platform tools folder in your PC.
3. Now, open CMD inside platform tools folder.
4. Boot your device in bootloader/fastboot mode.
5. Type in CMD: `fastboot flash recovery name-of-twrp.img`. It'll flash in current active slot.
6. After flashing is done, type: `fastboot reboot recovery`.
7. Enjoy your new custom recovery—TWRP.
### Credits
* Team Win (for Manifest/Source)
* SebaUbuntu (for base device tree)
### What's new?
* Initial build.
* Sync with latest changes in source/manifest.
### Trigger Event
_This build were compiled by triggering branch twrp-12.1 of current tree, triggered by a push event in [version makefile](https://github.com/cd-Crypton/custom_recovery_tree_nokia_cap_sprout/blob/twrp-12.1/version.mk)._
* [Last Commit](https://github.com/cd-Crypton/custom_recovery_tree_nokia_cap_sprout/commit/${{ env.COMMIT_ID }})
" > changelog.txt
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
twrp/out/target/product/cap_sprout/twrp-3.7.0_12-cap_sprout-${{ env.VERSION }}.img
name: TWRP Release Build for Nokia 5.3 (CAP_sprout) // ${{ env.BUILD_DATE }}
tag_name: ${{ github.run_id }}
body_path: changelog.txt
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
repository: cd-Crypton/custom-recovery-releases