From 8bb39b2e86c8d32ed57ddb59678e92ec3bb4e199 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Tue, 1 Jun 2021 12:28:27 +1000 Subject: [PATCH 01/17] Update build --- build | 66 +++++++++++++++++++---------------------------------------- 1 file changed, 21 insertions(+), 45 deletions(-) diff --git a/build b/build index 8f3d9644..12690986 100755 --- a/build +++ b/build @@ -1,55 +1,31 @@ #!/bin/bash -cd /tmp/rom # Depends on where source got synced +cd /tmp/rom + +source build/envsetup.sh + +lunch descendant_RMX1941-descendant + +mka descendant + -# Normal build steps -. build/envsetup.sh -lunch aosp_mido-user export CCACHE_DIR=/tmp/ccache export CCACHE_EXEC=$(which ccache) export USE_CCACHE=1 -ccache -M 20G # It took only 6.4GB for mido -ccache -o compression=true # Will save times and data to download and upload ccache, also negligible performance issue -ccache -z # Clear old stats, so monitor script will provide real ccache statistics - -# Next 8 lines should be run first to collect ccache and then upload, after doning it 1 or 2 times, our ccache will help to build without these 8 lines -#make api-stubs-docs || echo no problem -#make hiddenapi-lists-docs || echo no problem -#make system-api-stubs-docs || echo no problem -#make test-api-stubs-docs || echo no problem -#make aex -j10 & # I used aex build command -#sleep 85m # Lets give some space for uploading ccache -#kill %1 # better way to kill it! -#ccache -s -#and dont use below codes for first 1 or 2 times, to get ccache uploaded, -#as instructed, i got enough cccahe more than 4.5gb, tough source is not buildable, still i wanna go to final steps, my intention to collect ccache is done. Let's start final build, and get shell when bulid fails too! If source is buildable we will get a final zip file, and if not buildable, we will get a shell access to fix it. 1 minute silence for source :-( -#So, i am adding back things which i removed previously! also with my bot and tg id - -# upload function for uploading rom zip file! I don't want unwanted builds in my google drive haha! -up(){ - curl --upload-file $1 https://transfer.sh/$(basename $1); echo - # 14 days, 10 GB limit -} -tg(){ - bot_api=1692865707:AAHvKZogI5sUGtqjd2sZvNl8tib0Q_xcYkY # Your tg bot api, dont use my one haha - your_telegram_id=$1 # No need to touch - msg=$2 # No need to touch - curl -s "https://api.telegram.org/bot${bot_api}/sendmessage" --data "text=$msg&chat_id=${your_telegram_id}" -} +ccache -M 10G +ccache -o compression=true +ccache -z -id=571213272 # Your telegram id +make init +make sepolicy -# Build command! j10 for 10 cpu, j8 for 8 cpu, otherwise memeroy will end up even its 24G -# Upload rom zip file if succeed to build! Send notification to tg! And send shell to tg if build fails! +make nad & +sleep 75m +kill %1 +ccache -s -# Let's compile by parts! Coz of ram issue! -make api-stubs-docs || echo no problem -make hiddenapi-lists-docs || echo no problem -make system-api-stubs-docs || echo no problem -make test-api-stubs-docs || echo no problem +up(){ + time rclone copy $1 aosp:ccache/ccache-ci2 -P +} -make aex -j10 \ - && send_zip=$(up out/target/product/mido/*zip) && tg $id "Build Succeed! -$send_zip" \ - || tmate -S /tmp/tmate.sock new-session -d && tmate -S /tmp/tmate.sock wait tmate-ready && send_shell=$(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}') && tg $id "Build Failed" && tg $id "$send_shell" && ccache -s && sleep 2h -ccache -s # Let's print ccache statistics finally +ccache -s From 159d8070dbc05f6a26ed7e9ee4cfda07fb786bf4 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Tue, 1 Jun 2021 12:28:54 +1000 Subject: [PATCH 02/17] Update download_ccache --- download_ccache | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/download_ccache b/download_ccache index 9889ba09..fd2876cf 100755 --- a/download_ccache +++ b/download_ccache @@ -1,13 +1,16 @@ #!/bin/bash # Lets see machine specifications and environments + +set -evx + df -h free -h nproc cat /etc/os* env -# So, we get upto 59% build complete, and also got ccache uploaded, inspite of previous commit error (because i shared rclone_config content), ccache still got uploaded, and can be accessed from anywhere by this:- https://roms.apon77.workers.dev/ccache/ci3/ccache.tar.gz my drive index helped here! So, now lets use it to download ccache for 2nd build, and also collect ccache 2nd time too, becasue 59% is not enough to collect enough cccahe. -url=https://roms.apon77.workers.dev/ccache/ci3/ccache.tar.gz # Where cccahe is located, use your ones, from where you want to download ccache! +# So, we get upto 100% build complete, and also got ccache uploaded, inspite of previous commit error (because i shared rclone_config content), ccache still got uploaded, and can be accessed from anywhere by this:- https://roms.apon77.workers.dev/ccache/ci3/ccache.tar.gz my drive index helped here! So, now lets use it to download ccache for 2nd build, and also collect ccache 2nd time too, becasue 59% is not enough to collect enough cccahe. +url=https://yellow-butterfly-09f4.sundramsayss.workers.dev/cirrus/ # Where cccahe is located, use your ones, from where you want to download ccache! cd /tmp # Where to download cccahe time aria2c $url -x16 -s50 # Using aria2c for speed haha, ccache will be at /tmp/ccache.tar.gz since my file name is ccache.tar.gz From 6de4296fcb695ba776da81553cbe98bf376a7427 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Tue, 1 Jun 2021 12:29:28 +1000 Subject: [PATCH 03/17] Update sync --- sync | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sync b/sync index a3ff45f7..a3041f32 100755 --- a/sync +++ b/sync @@ -1,15 +1,20 @@ #!/bin/bash +set -evx + +ROM_MANIFEST=repo init -u https://github.com/descendant-xi/manifests.git +BRANCH=eleven-staging +LOCAL_MANIFEST=https://github.com/Yasundram/local_manifest +MANIFEST_BRANCH=main + mkdir -p /tmp/rom # Where to sync source cd /tmp/rom # Repo init command, that -device,-mips,-darwin,-notdefault part will save you more time and storage to sync, add more according to your rom and choice. Optimization is welcomed! Let's make it quit, and with depth=1 so that no unnecessary things. -# I want to sync aex source! -repo init -q --no-repo-verify --depth=1 -u git://github.com/AospExtended/manifest.git -b 11.x -g default,-device,-mips,-darwin,-notdefault +repo init -q --no-repo-verify --depth=1 "$ROM_MANIFEST" -b "$BRANCH" -g default,-device,-mips,-darwin,-notdefault # Clone local manifest! So that no need to manually git clone repos or change hals, you can use normal git clone or rm and re clone, they will cost little more time, and you may get timeout! Let's make it quit and depth=1 too. -# My local manifest can do all clone, and removing or changing repository i need, so lets use it! I am lazy to manually git clone! -git clone https://github.com/Apon77Lab/android_.repo_local_manifests.git --depth 1 -b aex .repo/local_manifests +git clone "$LOCAL_MANIFEST" --depth 1 -b "$MANIFEST_BRANCH" .repo/local_manifests # Sync source with -q, no need unnecessary messages, you can remove -q if want! try with -j30 first, if fails, it will try again with -j8 -repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j 30 || repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j 8 +repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j 30 || repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8 From f82b50fe85cc6c5ade5880f2f1a7c14f4b0704d1 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Tue, 1 Jun 2021 12:30:03 +1000 Subject: [PATCH 04/17] Update upload_ccache --- upload_ccache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload_ccache b/upload_ccache index 3cdcb7a7..309b7f3e 100755 --- a/upload_ccache +++ b/upload_ccache @@ -12,4 +12,4 @@ time com ccache 1 # Compression level 1, its enough mkdir -p ~/.config/rclone echo "$rclone_config" > ~/.config/rclone/rclone.conf # Write rclone config found from env variable, so that cloud storage can be used to upload ccache -time rclone copy ccache.tar.gz apon:ccache/ci3 -P # apon is my rclone config name (first line without [] of ~/.config/rclone/rclone.conf file from rclone setupped pc), ccache/ci2 is where ccache will be saved in my cloud, use yours one +time rclone copy ccache.tar.gz root:cirrus -P # apon is my rclone config name (first line without [] of ~/.config/rclone/rclone.conf file from rclone setupped pc), ccache/ci2 is where ccache will be saved in my cloud, use yours one From 9c008108dc5fc7f01df9752be9b524d5cb39fc36 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Tue, 1 Jun 2021 12:30:34 +1000 Subject: [PATCH 05/17] Update .cirrus.yml --- .cirrus.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 944df707..c6ef81bf 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,18 +1,17 @@ -env: # Environt variable to pass to all tasks - CIRRUS_CLONE_DEPTH: 1 # No need to clone with whole history - CIRRUS_WORKING_DIR: "/tmp/ci" # Where to clone repo +env: # Environment variables to pass to all tasks + CIRRUS_CLONE_DEPTH: 1 # No need to clone with the whole history + CIRRUS_WORKING_DIR: "/tmp/ci" # Where to clone the aosp-builder repo # For rclone with google drive or any cloud! After first commit pushing, login to https://cirrus-ci.com , click top left corner 3 dot menu, click repository(yourname/aosp-builder) > Repository Settings > Secured Variables > enter content of ~/.config/rclone/rclone.conf (from pc where you setup rclone) > ENCRYPT, copy that ENCRYPTED hash - # ENCRYPTED variables is unique for every repository, so you cant use my one, create you rclone config https://rclone.org/drive/#making-your-own-client-id - rclone_config: "ENCRYPTED[c1d6eeb6ba70128cbdc15e4d0317de3d347e2c94e141710c1c21345aeedd0a3c4ab10d028e4913d2602c663096dacacb]" + rclone_config: "ENCRYPTED[58fe878a01da727d9d753c2c36a81abb2c8fc23e7d85017625b11adeeeeb862e26081f6594e4e7e1964633e63be3a4c0]" task: - name: aosp # Project name + name: RMX1941-descendant # Project name timeout_in: 120m # Otherwise it will timeout at 60m automatically, 120m highest in free account container: - image: apon77/aosp:latest # It has built in setup environment + repo, aria2, rclone, pigz, username ci, and email ci@ci.ci [You can use your own docker image if you want, or you can use this one too!] - cpu: 10 #8 cpu for dummy build, 10 or more cpu for final build, sometimes more than 8 cpu will cause a timelock, so you wont be able to run ci again within few hours, in build script use -j8 or -j10 depending what you used here, otherwise low memory issue will happen, 16cpu highest - memory: 24G # So that we can have ram when needed, 24G highest + image: apon77/aosp:latest # It has built-in setup environment + repo, aria2, rclone, pigz, username ci, and email ci@ci.ci [You can use your own docker image if you want, or you can use this one too!] + cpu: 6 #8 or less cpu for dummy build, 8 cpu for the final build, 8cpu highest for free accounts. Don't try to use more than 8cpu as free user, you may get blocked by ci. + memory: 12G # So that we can have ram when needed, 32G highest download_ccache_background_script: # To download ccache in background - ./download_ccache # Ccache download script sync_script: # To sync source @@ -20,6 +19,6 @@ task: monitor_background_script: # To monitor ccache and machine status every minute, runs in background - ./monitor # Monitor script build_script: # Actual build script foreground - - ./build # Build script to run + - ./build # Build script to run build upload_ccache_script: # Upload ccache to cloud foreground - ./upload_ccache # Ccache uploading script From 9a9706365636d7a06836514416c394ffa24aeee2 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Tue, 1 Jun 2021 13:26:29 +1000 Subject: [PATCH 06/17] Update .cirrus.yml --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c6ef81bf..094f9fe7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,8 +10,8 @@ task: timeout_in: 120m # Otherwise it will timeout at 60m automatically, 120m highest in free account container: image: apon77/aosp:latest # It has built-in setup environment + repo, aria2, rclone, pigz, username ci, and email ci@ci.ci [You can use your own docker image if you want, or you can use this one too!] - cpu: 6 #8 or less cpu for dummy build, 8 cpu for the final build, 8cpu highest for free accounts. Don't try to use more than 8cpu as free user, you may get blocked by ci. - memory: 12G # So that we can have ram when needed, 32G highest + cpu: 4 #8 or less cpu for dummy build, 8 cpu for the final build, 8cpu highest for free accounts. Don't try to use more than 8cpu as free user, you may get blocked by ci. + memory: 8G # So that we can have ram when needed, 32G highest download_ccache_background_script: # To download ccache in background - ./download_ccache # Ccache download script sync_script: # To sync source From 152598740058111961997dbaef01daafc55b4167 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 07:46:23 -0700 Subject: [PATCH 07/17] Update .cirrus.yml --- .cirrus.yml | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 094f9fe7..02bfc29b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,24 +1,36 @@ env: # Environment variables to pass to all tasks - CIRRUS_CLONE_DEPTH: 1 # No need to clone with the whole history - CIRRUS_WORKING_DIR: "/tmp/ci" # Where to clone the aosp-builder repo + CIRRUS_CLONE_DEPTH: 1 + CIRRUS_WORKING_DIR: "/tmp/ci" - # For rclone with google drive or any cloud! After first commit pushing, login to https://cirrus-ci.com , click top left corner 3 dot menu, click repository(yourname/aosp-builder) > Repository Settings > Secured Variables > enter content of ~/.config/rclone/rclone.conf (from pc where you setup rclone) > ENCRYPT, copy that ENCRYPTED hash rclone_config: "ENCRYPTED[58fe878a01da727d9d753c2c36a81abb2c8fc23e7d85017625b11adeeeeb862e26081f6594e4e7e1964633e63be3a4c0]" task: - name: RMX1941-descendant # Project name - timeout_in: 120m # Otherwise it will timeout at 60m automatically, 120m highest in free account + name: descendant + timeout_in: 120m container: - image: apon77/aosp:latest # It has built-in setup environment + repo, aria2, rclone, pigz, username ci, and email ci@ci.ci [You can use your own docker image if you want, or you can use this one too!] - cpu: 4 #8 or less cpu for dummy build, 8 cpu for the final build, 8cpu highest for free accounts. Don't try to use more than 8cpu as free user, you may get blocked by ci. - memory: 8G # So that we can have ram when needed, 32G highest - download_ccache_background_script: # To download ccache in background - - ./download_ccache # Ccache download script - sync_script: # To sync source - - ./sync # Source sync script - monitor_background_script: # To monitor ccache and machine status every minute, runs in background - - ./monitor # Monitor script - build_script: # Actual build script foreground - - ./build # Build script to run build - upload_ccache_script: # Upload ccache to cloud foreground - - ./upload_ccache # Ccache uploading script + image: apon77/aosp:latest + cpu: 4 + memory: 16G + download_ccache_background_script: + - set -evx + - command=$(head /tmp/ci/ccache.sh -n $(expr $(grep upload /tmp/ci/ccache.sh -n | cut -f1 -d:) - 1)) + - bash -c "$command" + sync_script: + - set -evx + - command=$(head /tmp/ci/build.sh -n $(expr $(grep "# build" /tmp/ci/build.sh -n | cut -f1 -d:) - 1)) + - bash -c "$command" + monitor_background_script: + - ./monitor + build_script: + - set -evx + - command=$(tail /tmp/ci/build.sh -n +$(expr $(grep "# build" /tmp/ci/build.sh -n | cut -f1 -d:) + 2) | head -n -16) + - bash -c "$command" + upload_rom_script: + - set -evx + - command=$(tail /tmp/ci/build.sh -n +$(expr $(grep "# upload" /tmp/ci/build.sh -n | cut -f1 -d:) + 2)) + - bash -c "$command" + upload_ccache_script: + - set -evx + - command=$(tail /tmp/ci/ccache.sh -n +$(expr $(grep "# upload" /tmp/ci/ccache.sh -n | cut -f1 -d:) + 2)) + - bash -c "$command" + From c1f341bd6679c1ebb571bd1941cb15f5e7c1ea1e Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 07:54:01 -0700 Subject: [PATCH 08/17] Update build --- build | 1 - 1 file changed, 1 deletion(-) diff --git a/build b/build index 12690986..ab3602ba 100755 --- a/build +++ b/build @@ -5,7 +5,6 @@ source build/envsetup.sh lunch descendant_RMX1941-descendant -mka descendant export CCACHE_DIR=/tmp/ccache From 5d90bb96f71bdf48a7204241d7abd7615ab8ff4c Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 07:54:31 -0700 Subject: [PATCH 09/17] Update download_ccache --- download_ccache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download_ccache b/download_ccache index fd2876cf..a482e0ad 100755 --- a/download_ccache +++ b/download_ccache @@ -10,7 +10,7 @@ cat /etc/os* env # So, we get upto 100% build complete, and also got ccache uploaded, inspite of previous commit error (because i shared rclone_config content), ccache still got uploaded, and can be accessed from anywhere by this:- https://roms.apon77.workers.dev/ccache/ci3/ccache.tar.gz my drive index helped here! So, now lets use it to download ccache for 2nd build, and also collect ccache 2nd time too, becasue 59% is not enough to collect enough cccahe. -url=https://yellow-butterfly-09f4.sundramsayss.workers.dev/cirrus/ # Where cccahe is located, use your ones, from where you want to download ccache! +url=https://yellow-butterfly-09f4.sundramsayss.workers.dev/ccache/ # Where cccahe is located, use your ones, from where you want to download ccache! cd /tmp # Where to download cccahe time aria2c $url -x16 -s50 # Using aria2c for speed haha, ccache will be at /tmp/ccache.tar.gz since my file name is ccache.tar.gz From 0179c31596f63f00b2429c2299423eea025a5cc9 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 07:55:53 -0700 Subject: [PATCH 10/17] Update build --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index ab3602ba..fb1eb4f0 100755 --- a/build +++ b/build @@ -3,7 +3,7 @@ cd /tmp/rom source build/envsetup.sh -lunch descendant_RMX1941-descendant +lunch descendant_RMX1941-userdebug From 4cb22249ae96ff462a8c231053ddc56781505555 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 07:56:59 -0700 Subject: [PATCH 11/17] Update download_ccache --- download_ccache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download_ccache b/download_ccache index a482e0ad..fd2876cf 100755 --- a/download_ccache +++ b/download_ccache @@ -10,7 +10,7 @@ cat /etc/os* env # So, we get upto 100% build complete, and also got ccache uploaded, inspite of previous commit error (because i shared rclone_config content), ccache still got uploaded, and can be accessed from anywhere by this:- https://roms.apon77.workers.dev/ccache/ci3/ccache.tar.gz my drive index helped here! So, now lets use it to download ccache for 2nd build, and also collect ccache 2nd time too, becasue 59% is not enough to collect enough cccahe. -url=https://yellow-butterfly-09f4.sundramsayss.workers.dev/ccache/ # Where cccahe is located, use your ones, from where you want to download ccache! +url=https://yellow-butterfly-09f4.sundramsayss.workers.dev/cirrus/ # Where cccahe is located, use your ones, from where you want to download ccache! cd /tmp # Where to download cccahe time aria2c $url -x16 -s50 # Using aria2c for speed haha, ccache will be at /tmp/ccache.tar.gz since my file name is ccache.tar.gz From 8e47fd933fc8b6e7bf22a2c4af3bdbaabc48782f Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 07:58:04 -0700 Subject: [PATCH 12/17] Update download_ccache From 015ff678b127a201e64c06d5d07277d871e950e6 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 07:59:29 -0700 Subject: [PATCH 13/17] Update sync --- sync | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sync b/sync index a3041f32..ef806c5e 100755 --- a/sync +++ b/sync @@ -1,20 +1,15 @@ #!/bin/bash -set -evx - -ROM_MANIFEST=repo init -u https://github.com/descendant-xi/manifests.git -BRANCH=eleven-staging -LOCAL_MANIFEST=https://github.com/Yasundram/local_manifest -MANIFEST_BRANCH=main - mkdir -p /tmp/rom # Where to sync source cd /tmp/rom # Repo init command, that -device,-mips,-darwin,-notdefault part will save you more time and storage to sync, add more according to your rom and choice. Optimization is welcomed! Let's make it quit, and with depth=1 so that no unnecessary things. -repo init -q --no-repo-verify --depth=1 "$ROM_MANIFEST" -b "$BRANCH" -g default,-device,-mips,-darwin,-notdefault +# I want to sync aex source! +repo init -q --no-repo-verify --depth=1 https://github.com/descendant-xi/manifests.git -b eleven-staging -g default,-device,-mips,-darwin,-notdefault # Clone local manifest! So that no need to manually git clone repos or change hals, you can use normal git clone or rm and re clone, they will cost little more time, and you may get timeout! Let's make it quit and depth=1 too. -git clone "$LOCAL_MANIFEST" --depth 1 -b "$MANIFEST_BRANCH" .repo/local_manifests +# My local manifest can do all clone, and removing or changing repository i need, so lets use it! I am lazy to manually git clone! +git clone https://github.com/Yasundram/local_manifest --depth 1 -b main .repo/local_manifests # Sync source with -q, no need unnecessary messages, you can remove -q if want! try with -j30 first, if fails, it will try again with -j8 repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j 30 || repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8 From f782f6edabedaa5b81f998086d4bc43225201086 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 08:00:34 -0700 Subject: [PATCH 14/17] Update .cirrus.yml --- .cirrus.yml | 48 ++++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 02bfc29b..ae2a3dd2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,36 +1,24 @@ env: # Environment variables to pass to all tasks - CIRRUS_CLONE_DEPTH: 1 - CIRRUS_WORKING_DIR: "/tmp/ci" + CIRRUS_CLONE_DEPTH: 1 # No need to clone with the whole history + CIRRUS_WORKING_DIR: "/tmp/ci" # Where to clone the aosp-builder repo + # For rclone with google drive or any cloud! After first commit pushing, login to https://cirrus-ci.com , click top left corner 3 dot menu, click repository(yourname/aosp-builder) > Repository Settings > Secured Variables > enter content of ~/.config/rclone/rclone.conf (from pc where you setup rclone) > ENCRYPT, copy that ENCRYPTED hash rclone_config: "ENCRYPTED[58fe878a01da727d9d753c2c36a81abb2c8fc23e7d85017625b11adeeeeb862e26081f6594e4e7e1964633e63be3a4c0]" task: - name: descendant - timeout_in: 120m + name: RMX1941-descendant # Project name + timeout_in: 120m # Otherwise it will timeout at 60m automatically, 120m highest in free account container: - image: apon77/aosp:latest - cpu: 4 - memory: 16G - download_ccache_background_script: - - set -evx - - command=$(head /tmp/ci/ccache.sh -n $(expr $(grep upload /tmp/ci/ccache.sh -n | cut -f1 -d:) - 1)) - - bash -c "$command" - sync_script: - - set -evx - - command=$(head /tmp/ci/build.sh -n $(expr $(grep "# build" /tmp/ci/build.sh -n | cut -f1 -d:) - 1)) - - bash -c "$command" - monitor_background_script: - - ./monitor - build_script: - - set -evx - - command=$(tail /tmp/ci/build.sh -n +$(expr $(grep "# build" /tmp/ci/build.sh -n | cut -f1 -d:) + 2) | head -n -16) - - bash -c "$command" - upload_rom_script: - - set -evx - - command=$(tail /tmp/ci/build.sh -n +$(expr $(grep "# upload" /tmp/ci/build.sh -n | cut -f1 -d:) + 2)) - - bash -c "$command" - upload_ccache_script: - - set -evx - - command=$(tail /tmp/ci/ccache.sh -n +$(expr $(grep "# upload" /tmp/ci/ccache.sh -n | cut -f1 -d:) + 2)) - - bash -c "$command" - + image: apon77/aosp:latest # It has built-in setup environment + repo, aria2, rclone, pigz, username ci, and email ci@ci.ci [You can use your own docker image if you want, or you can use this one too!] + cpu: 4 #8 or less cpu for dummy build, 8 cpu for the final build, 8cpu highest for free accounts. Don't try to use more than 8cpu as free user, you may get blocked by ci. + memory: 16G # So that we can have ram when needed, 32G highest + download_ccache_background_script: # To download ccache in background + - ./download_ccache # Ccache download script + sync_script: # To sync source + - ./sync # Source sync script + monitor_background_script: # To monitor ccache and machine status every minute, runs in background + - ./monitor # Monitor script + build_script: # Actual build script foreground + - ./build # Build script to run build + upload_ccache_script: # Upload ccache to cloud foreground + - ./upload_ccache # Ccache uploading script From ca6c18ba9ffd7da882e2573dfb7a762e97f0a214 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 09:47:41 -0700 Subject: [PATCH 15/17] Update .cirrus.yml --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index ae2a3dd2..7c90bc65 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,7 +3,7 @@ env: # Environment variables to pass to all tasks CIRRUS_WORKING_DIR: "/tmp/ci" # Where to clone the aosp-builder repo # For rclone with google drive or any cloud! After first commit pushing, login to https://cirrus-ci.com , click top left corner 3 dot menu, click repository(yourname/aosp-builder) > Repository Settings > Secured Variables > enter content of ~/.config/rclone/rclone.conf (from pc where you setup rclone) > ENCRYPT, copy that ENCRYPTED hash - rclone_config: "ENCRYPTED[58fe878a01da727d9d753c2c36a81abb2c8fc23e7d85017625b11adeeeeb862e26081f6594e4e7e1964633e63be3a4c0]" + rclone_config: "ENCRYPTED[1858e77194cc42ac131949fbc43892123449dd5efd5f2799f2dabf5d38a67a96300b0ddd137e53f1728e6ec910e97d1c]" task: name: RMX1941-descendant # Project name From 2ce2019cc9e78a707b4f72832ef50c8b3cbbf673 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Wed, 2 Jun 2021 10:00:41 -0700 Subject: [PATCH 16/17] Update build --- build | 1 + 1 file changed, 1 insertion(+) diff --git a/build b/build index fb1eb4f0..3940e52b 100755 --- a/build +++ b/build @@ -28,3 +28,4 @@ up(){ } ccache -s + From ed97f1e66d51b081641054d9c9408e50fc019002 Mon Sep 17 00:00:00 2001 From: Sundram <63789329+Yasundram@users.noreply.github.com> Date: Thu, 17 Jun 2021 09:17:07 +0530 Subject: [PATCH 17/17] Update sync --- sync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync b/sync index ef806c5e..aa549314 100755 --- a/sync +++ b/sync @@ -9,7 +9,7 @@ repo init -q --no-repo-verify --depth=1 https://github.com/descendant-xi/manifes # Clone local manifest! So that no need to manually git clone repos or change hals, you can use normal git clone or rm and re clone, they will cost little more time, and you may get timeout! Let's make it quit and depth=1 too. # My local manifest can do all clone, and removing or changing repository i need, so lets use it! I am lazy to manually git clone! -git clone https://github.com/Yasundram/local_manifest --depth 1 -b main .repo/local_manifests +git clone https://github.com/Yasundram/local_manifest --depth 1 -b desc .repo/local_manifests # Sync source with -q, no need unnecessary messages, you can remove -q if want! try with -j30 first, if fails, it will try again with -j8 repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j 30 || repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8