Skip to content
Snippets Groups Projects

CI: Attempt to throttle load caused by builds better

Merged Esben Haabendal requested to merge ci-tuning into kirkstone
+ 9
6
@@ -76,7 +76,7 @@ stages:
# The repo tool seems to insist on having a branch checked out or
# something like that... Without this we get errors like
# fatal: couldn't find remote ref refs/heads/master
- git checkout -b master
- git checkout -b master && git fetch --unshallow
# Create/maintain a mirror of all manifest repositories in runner
# persistent storage, and use that as reference when initializing the
# build repo, effectively reducing the time spent fetching git repos to
@@ -145,10 +145,11 @@ stages:
echo "SSTATE_MIRRORS = \"file://.* file://$SSTATE_MIRROR_PATH/PATH\""
>> conf/auto.conf ;
fi
- if [ -n "$CI_ONIRO_NUM_CPUS" ] ; then
echo "BB_NUMBER_THREADS = \"$CI_ONIRO_NUM_CPUS\"" ;
echo "BB_NUMBER_PARSE_THREADS = \"$CI_ONIRO_NUM_CPUS\"" ;
fi >> conf/auto.conf
- NUM_CPUS="${CI_ONIRO_NUM_CPUS:-$(nproc)}"
- echo "BB_NUMBER_PARSE_THREADS = \"$NUM_CPUS\"" >> conf/auto.conf
- echo "BB_NUMBER_THREADS = \"$((NUM_CPUS/2))\"" >> conf/auto.conf
- echo "PARALLEL_MAKE = \"-j$NUM_CPUS -l$NUM_CPUS\"" >> conf/auto.conf
- echo "NINJA_ARGS:append = \" -j$NUM_CPUS -l$NUM_CPUS\"" >> conf/auto.conf
- echo "RM_WORK_EXCLUDE += \"${RECIPE}\"" >> conf/auto.conf
- echo "OPENHARMONY_VERSION = \"${OPENHARMONY_VERSION}\"" >> conf/auto.conf
script:
@@ -426,7 +427,9 @@ ohos:
- cd $(basename $TARBALL_FILE .tar.gz)/OpenHarmony
- ../../build/tmp-*/deploy/sdk/${PREBUILT_IMAGE}-${OPENHARMONY_VERSION}-*.sh -y -d oniro
- ./oniro/setup.sh
- ./build.sh --product-name Hi3516DV300
- NUM_CPUS="${CI_ONIRO_NUM_CPUS:-$(nproc)}"
- NINJA_ARGS="--ninja-args -j$NUM_CPUS --ninja-args -l$NUM_CPUS"
- ./build.sh --product-name Hi3516DV300 $NINJA_ARGS
# Job for triggering a prune of the sstate-cache mirror in runner persistent
# storage. This should be done periodically, but as I believe it removes a
Loading