Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
ea669b3
Block user for abusing words
Apon77 Aug 30, 2022
bec4fbf
Block user for abusing words [skip ci]
Apon77 Aug 30, 2022
afac7b3
yaml: Remove retrofit-ota zip [skip ci] (#13000)
P-Salik Sep 3, 2022
ba1699c
Add ArrowOS 13 support[skip ci] (#13048)
sajidshahriar72543 Sep 5, 2022
2180630
add support for Evolution X tiramisu [skip ci] (#13123)
NRanjan-17 Sep 6, 2022
c87df02
Don't block abhishekhembrom08 [skip ci]
Apon77 Sep 8, 2022
5dc7709
Add xdroidOSS thirteen branch support[skip ci] (#13326)
NerdZ3ns Sep 11, 2022
c7b3943
PixelExperience A13 support [skip ci]
Apon77 Sep 14, 2022
47d7c73
CherishOS-tiramisu [skip ci]
Apon77 Sep 15, 2022
0c1c285
Lineage 14.1 & 20.0 support [skip ci]
Apon77 Sep 25, 2022
8ffaa01
add spark and project blaze a13 [skip ci]
Apon77 Sep 26, 2022
98eb442
p-404 a13 [skip ci]
Apon77 Oct 1, 2022
39d403b
Add support for PixelOS-Pixelish thirteen [skip ci] (#13992)
Alone0316 Oct 1, 2022
5931314
add support for CipherOS thirteen [skip ci] (#14033)
MJashwant Oct 2, 2022
f5f04ce
Add support for AOSPA topaz (#14035) [skip ci]
Azure-Helper Oct 2, 2022
df1d5ca
Add support for Project-Awaken triton [skip ci] (#14156)
matheucomth Oct 6, 2022
fe967df
Add support for RiceDroid thirteen [skip ci] (#14164)
anandhan07 Oct 6, 2022
115ea2f
Add Bootleggers-BrokenLab-tirimbino [skip ci]
Apon77 Oct 14, 2022
d7857b7
Add support for crdroidandroid-13.0 (#14467) [skip ci]
Sensei-Developer Oct 15, 2022
ca69b33
Add support for SuperiorOS thirteen [skip ci] (#14515)
GhostMaster69-dev Oct 17, 2022
d7a59f9
Add support for StagOS-t13 (#14534) [skip ci]
Sensei-Developer Oct 23, 2022
dfcf6b3
Fix clang error [skip ci]
Apon77 Oct 23, 2022
25da7dd
Add PixelExtended-trece [skip ci]
Apon77 Oct 23, 2022
bbc2454
Try fixing clang 2 [skip ci]
Apon77 Oct 23, 2022
e40d7a7
Revert "Fix clang error [skip ci]"
Apon77 Oct 23, 2022
2354386
Revert clang 2 [skip ci]
Apon77 Oct 28, 2022
f50560b
Block bad user [skip ci]
Apon77 Oct 28, 2022
14bd5c3
Add support for syberia-project-13.0 [skip ci] (#14954)
Krtonia Nov 1, 2022
8658227
Change TG Bot API [skip ci]
Apon77 Nov 1, 2022
4b1348a
Add support for VoltageOS-13 [skip ci] (#15021)
Shreedhan003 Nov 8, 2022
e97d7cd
Add support for PixelExperience 13 Plus Edition [skip ci] (#15178)
NRanjan-17 Nov 9, 2022
a5efa67
Add support for BlissRoms-typhoon [skip ci] (#15293)
acastillorobles77 Nov 16, 2022
f8f5560
Add Corvus-AOSP-13 support [skip ci] (#15353)
Nov 18, 2022
5ac9e8e
Add PixysOS thirteen support[skip ci] (#15500)
susandahal Nov 25, 2022
f647fe9
Add Project-Xtended-xt [skip ci]
Apon77 Nov 27, 2022
e51a440
Update branch names for Pixel OS (#15699) [skip ci]
sanjeevstunner Dec 9, 2022
ece2f39
Let's try sourceforge [skip ci]
Apon77 Dec 21, 2022
5d3059e
Faster Upload [skip ci]
Apon77 Dec 21, 2022
8ed472a
Add DerpFest-13 [skip ci] (#16361)
Prashant-1695 Dec 26, 2022
7fa1283
Add ricedroidOSS & Drop all RiceDroid old [skip ci] (#16907)
donboruza Jan 15, 2023
d677dfc
add bananadroid a13 & shapeshiftos a13 [skip ci]
Apon77 Jan 16, 2023
b4afb6f
sync only with j8 [skip ci]
Apon77 Jan 17, 2023
590a76c
try fixing sync [skip ci]
Apon77 Jan 26, 2023
9536d79
Revert try fixing sync [skip ci]
Apon77 Jan 27, 2023
98f306a
Fix sync [skip ci] (#17621)
P-Salik Jan 30, 2023
14750cc
Bootleggers back to main org [skip ci] (#17676)
romgharti Feb 1, 2023
779abe2
Block bad user [skip ci]
Apon77 Feb 4, 2023
2a7d4d6
Block bad users [skip ci]
Apon77 Feb 13, 2023
1e3d8b3
Try new user block [skip ci]
Apon77 Feb 19, 2023
2670d45
Better method to block bad people [skip ci]
Apon77 Feb 21, 2023
ca557e7
Block bad user [skip ci]
Apon77 Feb 21, 2023
9a8f2fd
Update string [skip ci]
Apon77 Feb 23, 2023
c273bed
add octavi a13 [skip ci]
Apon77 Mar 24, 2023
66ca3d2
Refactoring [skip ci]
Apon77 Apr 1, 2023
0363f87
More cleaner [skip ci]
Apon77 Apr 1, 2023
a179f34
Modularize codes [skip ci]
Apon77 Apr 9, 2023
95ab85d
Moved to Modularize [skip ci]
Apon77 Apr 10, 2023
361a02a
remove obsolete roms/branches & add few a13 roms [skip ci]
Apon77 Apr 12, 2023
d72c78f
dont allow rm [skip ci]
Apon77 Apr 25, 2023
d8a9044
replace init with repo init [skip ci]
Apon77 Apr 26, 2023
5d01329
try fixing dirty [skip ci]
Apon77 Apr 27, 2023
9a16fbe
try fixing dirty 2 [skip ci]
Apon77 Apr 28, 2023
c60fe04
trying fixing dirty 3 [skip ci]
Apon77 Apr 28, 2023
57cda63
aospa clean check [skip ci]
Apon77 May 1, 2023
cfaa5c9
[skip ci] Add new default branch of bliss (#20763)
DESTROYER3264 May 13, 2023
6d3d9eb
force to fix spelling [skip ci]
Apon77 May 21, 2023
835245c
Add alphadroid-project a13 [skip ci]
Apon77 Jun 7, 2023
1d0f60b
check file upload speed [skip ci]
Apon77 Jun 19, 2023
bf44c87
Sleep before fixing sync [skip ci]
Apon77 Jul 4, 2023
a200de5
Try cm-14.1 build fix [skip ci]
Apon77 Jul 6, 2023
fb629d4
Remove lock files before sync fix [skip ci]
Apon77 Jul 8, 2023
db28f41
Less log in tsync [skip ci]
Apon77 Jul 8, 2023
a61b2f5
los 15.1 and los 16.0 build fix [skip ci]
Apon77 Jul 8, 2023
0dd54f8
show which dirs are removing [skip ci]
Apon77 Jul 10, 2023
d075065
Less logs in ci [skip ci]
Apon77 Jul 13, 2023
a4fbc3f
Blissrom branch changed [skip ci]
Apon77 Jul 16, 2023
c2eb297
no need test in post build [skip ci]
Apon77 Jul 23, 2023
5276d39
no need -L flag in curl [skip ci]
Apon77 Jul 23, 2023
b2fe205
test script is needed to show device/rom name [skip ci]
Apon77 Jul 23, 2023
dd5a7a1
block bad user
Apon77 Aug 1, 2023
0462812
update pixelextended thunder & add risingtechos [skip ci]
Apon77 Aug 5, 2023
f766b70
Add AICP 13.0 [skip ci] (#23248)
Aug 5, 2023
69bacc3
block cmka [skip ci]
Apon77 Aug 16, 2023
fa48e93
initialize db [skip ci]
Apon77 Aug 16, 2023
2168251
fix commit message [skip ci]
Apon77 Aug 17, 2023
3bc6476
test commit message 2 [skip ci]
Apon77 Aug 17, 2023
0f18c74
log device rom branch [skip ci]
Apon77 Aug 17, 2023
1a672f1
add succeed date [skip ci]
Apon77 Aug 17, 2023
d56b535
add support for SCW_sprout [skip ci]
Apon77 Aug 17, 2023
a08dad9
update environment [skip ci]
Apon77 Aug 18, 2023
72fd6d4
update environment [skip ci]
Apon77 Aug 19, 2023
710a73b
update environment [skip ci]
Apon77 Aug 26, 2023
09912db
update environment [skip ci]
Apon77 Aug 27, 2023
944b21e
Add Havoc-OS thirteen branch [skip-ci] (#23758)
Koushikdey2003 Aug 30, 2023
331176a
try removing unnecessary trees [skip ci]
Apon77 Aug 30, 2023
9914b3d
Add oneplus and move to up [skip ci]
Apon77 Aug 31, 2023
f0c9919
reduce spam [skip ci]
Apon77 Aug 31, 2023
fa55b52
Reduce spam in log [skip ci]
Apon77 Aug 31, 2023
e47b055
Revert "Reduce spam in log [skip ci]"
Apon77 Aug 31, 2023
4da24fc
Add new Spark-Rom-pyro-next (#23848) [skip ci]
OmegaBeam69 Aug 31, 2023
1e4b8d0
use -j4 for sync [skip ci]
Apon77 Sep 8, 2023
f633953
Revise supported roms [skip ci] (#25119) [skip ci]
dogpoopy Oct 26, 2023
f93901f
Add CRDroid 14.0 [skip ci] (#25503)
rushiranpise Nov 15, 2023
6af7342
add arrow a14 [skip ci]
Apon77 Nov 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 21 additions & 198 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
env:
CIRRUS_CLONE_DEPTH: 1
BUILD_HOSTNAME: "cirrus-ci.org"
bot_api: "ENCRYPTED[b16032643ad0994cda4822c9d477956f434278d0f786f8e131b585aa4f8510a11f3cd9f6a66a63568d2cba1c4dde25b4]"
bot_api: "ENCRYPTED[d5f8289d835b201789b2b31e728d0cd82a100f1b47ddec69dd6ba49a3712fcfa2719b220fc6a8894865df517a78332ca]"
one: "ENCRYPTED[267097e8096e1e12efc9c6e71626703ddc8ae1c6730511b6207586a045e2dd3bd59dd0b9d632642fc58d89913cc539a8]"
two: "ENCRYPTED[7aa062112fa8a4acebe3b71432937334ed3fa05f2d8eaa044d7976e01cbf3fdff7f01f8c91a9e723304aa8b45816c459]"
three: "ENCRYPTED[799a19ef34b1bd39bd174dbc5b2044e1fd4124b0bf9436ed68a3a197e68be303e15a59b4b448a4f58c44b0faa3c3892b]"
four: "ENCRYPTED[9e0496c7d952b248073be75b1c017479eaf1e341786b6210025800b5d2f4d40b82452928bd6cc43ed1bc1065ee915363]"

task:
name: Test
Expand All @@ -16,37 +20,16 @@ task:
image: apon77/aosp:cirrus
cpu: 2
memory: 4G

env_script:
- env
show_script:
- cat $CIRRUS_WORKING_DIR/build_rom.sh
notify_script:
- rom_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d / -f 4)
- branch_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh | awk -F "-b " '{print $2}' | awk '{print $1}')
- rom_name=$rom_name-$branch_name
- device=$(grep unch $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d ' ' -f 2 | cut -d _ -f 2 | cut -d - -f 1)
- grep _jasmine_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=jasmine_sprout
- grep _laurel_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=laurel_sprout
- grep _GM8_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=GM8_sprout
- grep _maple_dsds $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=maple_dsds
- your_telegram_id=@ROM_builders_junk
- show=$(cat $CIRRUS_WORKING_DIR/build_rom.sh)
- curl -s "https://api.telegram.org/bot${bot_api}/sendmessage" -d "text=<code>$device-$rom_name</code> Started

https://cirrus-ci.com/build/$CIRRUS_BUILD_ID

$show" -d "chat_id=${your_telegram_id}" -d "parse_mode=HTML"
test_script:
- set -e
- curl -Ls https://raw.githubusercontent.com/ROM-builders/temporary/main/test.sh | bash
env_script: env
show_script: cat $CIRRUS_WORKING_DIR/build_rom.sh
notify_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/notify.sh | bash
test_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/test.sh | bash

task:
name: Build
skip: $CIRRUS_BRANCH == 'main'
only_if: $CIRRUS_REPO_OWNER == 'ROM-builders'
depends_on:
- Test
depends_on: Test
timeout_in: 4h
persistent_worker:
labels:
Expand All @@ -60,168 +43,21 @@ task:
- /home/cirrus/roms:/home/cirrus/roms
- /home/cirrus/ccache:/home/cirrus/ccache
- /home/cirrus/.config:/home/cirrus/.config

show_script:
- cat $CIRRUS_WORKING_DIR/build_rom.sh
test_script:
- set -e
- curl -Ls https://raw.githubusercontent.com/ROM-builders/temporary/main/test.sh | bash
sync_script:
- set -e
- rom_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d / -f 4)
- branch_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh | awk -F "-b " '{print $2}' | awk '{print $1}')
- rom_name=$rom_name-$branch_name
- mkdir -p ~/roms/$rom_name
- cd ~/roms/$rom_name
- rm -rf .repo/local_manifests
- command=$(head $CIRRUS_WORKING_DIR/build_rom.sh -n $(expr $(grep 'build/envsetup.sh' $CIRRUS_WORKING_DIR/build_rom.sh -n | cut -f1 -d:) - 1))
- only_sync=$(grep 'repo sync' $CIRRUS_WORKING_DIR/build_rom.sh)
- bash -c "$command" || true

- set -exv
- curl -sO https://api.cirrus-ci.com/v1/task/$CIRRUS_TASK_ID/logs/sync.log
- a=$(grep 'Cannot remove project' sync.log -m1|| true)
- b=$(grep "^fatal: remove-project element specifies non-existent project" sync.log -m1 || true)
- c=$(grep 'repo sync has finished' sync.log -m1 || true)
- d=$(grep 'Failing repos:' sync.log -n -m1 || true)
- e=$(grep 'fatal: Unable' sync.log || true)
- f=$(grep 'error.GitError' sync.log || true)
- g=$(grep 'error: Cannot checkout' sync.log || true)
- if [[ $a == *'Cannot remove project'* ]]
- then
- a=$(echo $a | cut -d ':' -f2 | tr -d ' ')
- rm -rf $a
- fi
- if [[ $b == *'remove-project element specifies non-existent'* ]]
- then exit 1
- fi
- if [[ $d == *'Failing repos:'* ]]
- then
- d=$(expr $(grep 'Failing repos:' sync.log -n -m 1| cut -d ':' -f1) + 1)
- d2=$(expr $(grep 'Try re-running' sync.log -n -m1 | cut -d ':' -f1) - 1 )
- fail_paths=$(head -n $d2 sync.log | tail -n +$d)
- for path in $fail_paths
- do
- rm -rf $path
- aa=$(echo $path|awk -F '/' '{print $NF}')
- rm -rf .repo/project-objects/*$aa.git
- rm -rf .repo/projects/$path.git
- done
- fi
- if [[ $e == *'fatal: Unable'* ]]
- then
- fail_paths=$(grep 'fatal: Unable' sync.log | cut -d ':' -f2 | cut -d "'" -f2)
- for path in $fail_paths
- do
- rm -rf $path
- aa=$(echo $path|awk -F '/' '{print $NF}')
- rm -rf .repo/project-objects/*$aa.git
- rm -rf .repo/project-objects/$path.git
- rm -rf .repo/projects/$path.git
- done
- fi
- if [[ $f == *'error.GitError'* ]]
- then
- rm -rf $(grep 'error.GitError' sync.log | cut -d ' ' -f2)
- fi
- if [[ $g == *'error: Cannot checkout'* ]]
- then
- coerr=$(grep 'error: Cannot checkout' sync.log | cut -d ' ' -f 4| tr -d ':')
- for i in $coerr
- do
- rm -rf .repo/project-objects/$i.git
- done
- fi
#- (repo forall -c 'git checkout .' && bash -c "$only_sync") || (find -name shallow.lock -delete && find -name index.lock -delete && bash -c "$only_sync")

- if [[ $c == *'repo sync has finished'* ]]
- then true
- else
- repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j$(nproc --all)
- fi

- rm -rf sync.log

build_script:
- set -e
- rom_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d / -f 4)
- branch_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh | awk -F "-b " '{print $2}' | awk '{print $1}')
- rom_name=$rom_name-$branch_name
- device=$(grep unch $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d ' ' -f 2 | cut -d _ -f 2 | cut -d - -f 1)
- grep _jasmine_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=jasmine_sprout
- grep _laurel_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=laurel_sprout
- grep _GM8_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=GM8_sprout
- grep _maple_dsds $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=maple_dsds
- cd ~/roms/$rom_name
- export CCACHE_DIR=~/ccache/$rom_name/$device
- export CCACHE_EXEC=$(which ccache)
- export USE_CCACHE=1
- ccache -M 8G
- ccache -z
- ls device/*/*/vendorsetup.sh | grep -v generic && echo "Please remove vendorsetup.sh file from device tree, use local manifest for cloning and removing repositories." && exit 1 || true
- command=$(tail $CIRRUS_WORKING_DIR/build_rom.sh -n +$(expr $(grep 'build/envsetup.sh' $CIRRUS_WORKING_DIR/build_rom.sh -n | cut -f1 -d:) - 1)| head -n -1 | grep -v 'rclone copy')
- bash -c "$command"

ccache_stats_script:
- set -e
- rom_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d / -f 4)
- branch_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh | awk -F "-b " '{print $2}' | awk '{print $1}')
- rom_name=$rom_name-$branch_name
- device=$(grep unch $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d ' ' -f 2 | cut -d _ -f 2 | cut -d - -f 1)
- grep _jasmine_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=jasmine_sprout
- grep _laurel_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=laurel_sprout
- grep _GM8_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=GM8_sprout
- grep _maple_dsds $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=maple_dsds
- export CCACHE_DIR=~/ccache/$rom_name/$device
- ccache -s

upload_script:
- set -e
- rom_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d / -f 4)
- branch_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh | awk -F "-b " '{print $2}' | awk '{print $1}')
- rom_name=$rom_name-$branch_name
- device=$(grep unch $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d ' ' -f 2 | cut -d _ -f 2 | cut -d - -f 1)
- grep _jasmine_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=jasmine_sprout
- grep _laurel_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=laurel_sprout
- grep _GM8_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=GM8_sprout
- grep _maple_dsds $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=maple_dsds
- cd ~/roms/$rom_name
- engzip=$(ls out/target/product/$device/*-eng*.zip | grep -v "retrofit" || true)
- otazip=$(ls out/target/product/$device/*-ota-*.zip | grep -v "hentai" | grep -v "evolution" | grep -v "retrofit" || true)
- awaken=$(ls out/target/product/$device/Project-Awaken*.zip || true)
- octavi=$(ls out/target/product/$device/OctaviOS-R*.zip || true)
- p404=$(ls out/target/product/$device/?.*zip || true)
- cipher=$(ls out/target/product/$device/CipherOS-*-OTA-*.zip || true)
- rm -rf $engzip $otazip $awaken $octavi $p404 $cipher
- dlink=$(basename out/target/product/$device/*.zip)
- command=$(grep 'rclone copy' $CIRRUS_WORKING_DIR/build_rom.sh)
- if [[ $device == jasmine_sprout ]]; then command="rclone copy out/target/product/jasmine_sprout/*zip cirrus:jasmine_sprout -P"; fi
- if [[ $device == laurel_sprout ]]; then command="rclone copy out/target/product/laurel_sprout/*zip cirrus:laurel_sprout -P"; fi
- if [[ $device == GM8_sprout ]]; then command="rclone copy out/target/product/GM8_sprout/*zip cirrus:GM8_sprout -P"; fi
- if [[ $device == maple_dsds ]]; then command="rclone copy out/target/product/maple_dsds/*zip cirrus:maple_dsds -P"; fi
- bash -c "$command"
- echo "Download link https://roms.cirrus-ci.workers.dev/0:/$device/$dlink"

remove_script:
- set -e
- rom_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d / -f 4)
- branch_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh | awk -F "-b " '{print $2}' | awk '{print $1}')
- rom_name=$rom_name-$branch_name
- device=$(grep unch $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d ' ' -f 2 | cut -d _ -f 2 | cut -d - -f 1)
- grep _jasmine_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=jasmine_sprout
- grep _laurel_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=laurel_sprout
- grep _GM8_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=GM8_sprout
- grep _maple_dsds $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=maple_dsds
- cd ~/roms/$rom_name
- rm -rf out/target/product/$device
show_script: cat $CIRRUS_WORKING_DIR/build_rom.sh
test_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/test.sh | bash
sync_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/sync.sh | bash
tsync_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/tsync.sh | bash
build_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/build.sh | bash
ccache_stats_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/ccache_stats.sh | bash
upload_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/upload.sh | bash
remove_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/remove.sh | bash

task:
name: Post Build
skip: $CIRRUS_BRANCH == 'main'
only_if: $CIRRUS_REPO_OWNER == 'ROM-builders'
skip_notifications: true
depends_on:
- Build
depends_on: Build
timeout_in: 2m
persistent_worker:
labels:
Expand All @@ -231,18 +67,5 @@ task:
image: apon77/aosp:cirrus
cpu: 2
memory: 4G

post_build_script:
- set -e
- rom_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d / -f 4)
- branch_name=$(grep init $CIRRUS_WORKING_DIR/build_rom.sh | awk -F "-b " '{print $2}' | awk '{print $1}')
- rom_name=$rom_name-$branch_name
- device=$(grep unch $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d ' ' -f 2 | cut -d _ -f 2 | cut -d - -f 1)
- grep _jasmine_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=jasmine_sprout
- grep _laurel_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=laurel_sprout
- grep _GM8_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=GM8_sprout
- grep _maple_dsds $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=maple_dsds
- your_telegram_id=@ROM_builders_channel
- curl -s "https://api.telegram.org/bot${bot_api}/sendmessage" -d "text=<code>$device-$rom_name</code> Succeed

https://cirrus-ci.com/build/$CIRRUS_BUILD_ID" -d "chat_id=${your_telegram_id}" -d "parse_mode=HTML"
test_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/test.sh | bash
post_build_script: curl -s https://raw.githubusercontent.com/ROM-builders/temporary/main/ci/post_build.sh | bash
16 changes: 16 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -e
cd ~/roms/$rom_name
export CCACHE_DIR=~/ccache/$rom_name/$device
export CCACHE_EXEC=$(which ccache)
export USE_CCACHE=1
ccache -M 8G
ccache -z
ls device/*/*/vendorsetup.sh | grep -v generic && echo "Please remove vendorsetup.sh file from device tree, use local manifest for cloning and removing repositories." && exit 1 || true
if [[ " LineageOS-cm-14.1 LineageOS-lineage-15.1 LineageOS-lineage-16.0 " == *"$rom_name"* ]]; then sudo mkdir -p /usr/share/man/man1; sudo apt update; sudo apt install openjdk-8-jdk --no-install-recommends -y; sudo curl -L -o /etc/java-8-openjdk/security/java.security https://raw.githubusercontent.com/Apon77Lab/repo_update/java/java.security; sudo ln -sf /usr/bin/python2 /usr/bin/python; fi
command=$(tail $CIRRUS_WORKING_DIR/build_rom.sh -n +$(expr $(grep 'build/envsetup.sh' $CIRRUS_WORKING_DIR/build_rom.sh -n | cut -f1 -d:) - 1)| head -n -1 | grep -v 'rclone copy')
bash -c "$command"

succeed_date=$(date +%s)
curl -X PATCH "$two?cirrus_build_id=eq.https://cirrus-ci.com/build/$CIRRUS_BUILD_ID" -H "apikey: $three" -H "Authorization: Bearer $four" -H "Content-Type: application/json" -H "Prefer: return=minimal" -d "{ \"succeed_date\": \"$succeed_date\" }"
5 changes: 5 additions & 0 deletions ci/ccache_stats.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e
export CCACHE_DIR=~/ccache/$rom_name/$device
ccache -s
22 changes: 22 additions & 0 deletions ci/notify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

rom_name=$(grep 'repo init' $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d / -f 4)
branch_name=$(grep 'repo init' $CIRRUS_WORKING_DIR/build_rom.sh | awk -F "-b " '{print $2}' | awk '{print $1}')
only_rom=$rom_name
rom_name=$rom_name-$branch_name
device=$(grep unch $CIRRUS_WORKING_DIR/build_rom.sh -m 1 | cut -d ' ' -f 2 | cut -d _ -f 2 | cut -d - -f 1)
grep _jasmine_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=jasmine_sprout
grep _laurel_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=laurel_sprout
grep _GM8_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=GM8_sprout
grep _SCW_sprout $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=SCW_sprout
grep _maple_dsds $CIRRUS_WORKING_DIR/build_rom.sh > /dev/null && device=maple_dsds
your_telegram_id=@ROM_builders_junk
show=$(cat $CIRRUS_WORKING_DIR/build_rom.sh)
curl -s "https://api.telegram.org/bot${bot_api}/sendmessage" -d "text=<code>$device-$rom_name</code> Started
https://cirrus-ci.com/build/$CIRRUS_BUILD_ID $show" -d "chat_id=${your_telegram_id}" -d "parse_mode=HTML"

github_userid=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/ROM-builders/temporary/commits/$CIRRUS_CHANGE_IN_REPO -q '.author.id')
github_username=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/ROM-builders/temporary/commits/$CIRRUS_CHANGE_IN_REPO -q '.author.login')
triggered_date=$(date +%s)
if [[ $BRANCH == *pull/* ]]; then CIRRUS_COMMIT_MESSAGE="" ; fi
curl -X POST "$two" -H "apikey: $three" -H "Authorization: Bearer $four" -H "Content-Type: application/json" -H "Prefer: return=minimal" -d "{ \"github_userid\": \"$github_userid\", \"github_username\": \"$github_username\", \"triggered_date\": \"$triggered_date\", \"branch\": \"$BRANCH\", \"cirrus_build_id\": \"https://cirrus-ci.com/build/$CIRRUS_BUILD_ID\", \"cirrus_task_id\": \"https://cirrus-ci.com/task/$CIRRUS_TASK_ID\", \"cirrus_last_green_build_id\": \"https://cirrus-ci.com/build/$CIRRUS_LAST_GREEN_BUILD_ID\", \"cirrus_commit_message\": \"$CIRRUS_COMMIT_MESSAGE\", \"rom_name\": \"$only_rom\", \"rom_branch\": \"$branch_name\", \"device\": \"$device\" }"
6 changes: 6 additions & 0 deletions ci/post_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e
your_telegram_id=@ROM_builders_channel
curl -s "https://api.telegram.org/bot${bot_api}/sendmessage" -d "text=<code>$device-$rom_name</code> Succeed
https://cirrus-ci.com/build/$CIRRUS_BUILD_ID" -d "chat_id=${your_telegram_id}" -d "parse_mode=HTML"
3 changes: 3 additions & 0 deletions ci/remove.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -e
rm -rf ~/roms/$rom_name/out/target/product/$device
9 changes: 9 additions & 0 deletions ci/sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -e
mkdir -p ~/roms/$rom_name
cd ~/roms/$rom_name
rm -rf .repo/local_manifests
command=$(head $CIRRUS_WORKING_DIR/build_rom.sh -n $(expr $(grep 'build/envsetup.sh' $CIRRUS_WORKING_DIR/build_rom.sh -n | cut -f1 -d:) - 1))
only_sync=$(grep 'repo sync' $CIRRUS_WORKING_DIR/build_rom.sh)
bash -c "$command" || true
Loading