mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-06-24 14:30:40 -04:00
allow to specify thread counts (sync,build)
when DOS_MAX_THREADS_REPO and/or DOS_MAX_THREADS_BUILD are defined in init.sh they will be used. otherwise the max threads are calculated based on the cpu cores count. if that calculation fails (depends on nproc) a default fallback of: - 4 is used for repo sync (which reflects the current state for repo sync) - `<empty>` is used for make - which yields to no limitation (which reflects the current state for mka / make) to avoid issues regarding being rate limited a max value for repo sync processes will overwrite DOS_MAX_THREADS_REPO when set greater than MAX_THREADS_REPO_RATE (8). Signed-off-by: steadfasterX <steadfasterX@gmail.com>
This commit is contained in:
parent
5f783a6618
commit
b3bef085f8
9 changed files with 51 additions and 10 deletions
|
@ -23,7 +23,7 @@ export -f startPatcher;
|
|||
|
||||
resetWorkspace() {
|
||||
umask 0022;
|
||||
repo forall -c 'git add -A && git reset --hard' && rm -rf out DOS_PATCHED_FLAG && repo sync -j8 --force-sync --detach;
|
||||
repo forall -j${DOS_MAX_THREADS_REPO} -c 'git add -A && git reset --hard' && rm -rf out DOS_PATCHED_FLAG && repo sync -j${DOS_MAX_THREADS_REPO} --force-sync --detach;
|
||||
}
|
||||
export -f resetWorkspace;
|
||||
|
||||
|
@ -33,7 +33,7 @@ patchWorkspace() {
|
|||
export -f patchWorkspace;
|
||||
|
||||
verifyAllPlatformTags() {
|
||||
repo forall -v -c 'sh -c "source $DOS_WORKSPACE_ROOT/Scripts/Common/Tag_Verifier.sh && verifyTagIfPlatform $REPO_PROJECT $REPO_PATH"';
|
||||
repo forall -j${DOS_MAX_THREADS_REPO} -v -c 'sh -c "source $DOS_WORKSPACE_ROOT/Scripts/Common/Tag_Verifier.sh && verifyTagIfPlatform $REPO_PROJECT $REPO_PATH"';
|
||||
}
|
||||
export -f verifyAllPlatformTags;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue