Skip to content

Commit

Permalink
lmp/bb-build: only use the sstate-cache mirror when it is necessary
Browse files Browse the repository at this point in the history
Our build can be divided into two steps:
1 - build only using the sstate-cache
2 - build everything else missing

On the step [1] we run bitbake for setscene only tasks
and obvious this one is the only one that uses and reads the
sstate-cache mirror.

The step [2] will have 0% hit of cache available because everything
has already been accelerated in the step [1]. In the step [2]
everything will be build from scratch and the local sstate-cache
will be populated with the new artifacts.

This change will improve and significantly reduce the load generated on
the sstate-mirror http server by our CI builds.

Signed-off-by: Jose Quaresma <[email protected]>
  • Loading branch information
quaresmajose committed Oct 29, 2024
1 parent 65a53fe commit 1da0a40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lmp/bb-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ fi
# Setscene (cache), failures not critical
status "Run bitbake (setscene tasks only)"
bitbake -DD --setscene-only --continue ${IMAGE} || true
# we have now everything from the mirror so we don't need that anymore
echo 'SSTATE_MIRRORS = ""' >> conf/local.conf

# add trap to do some pending operations on exit
trap finish TERM INT EXIT
Expand Down

0 comments on commit 1da0a40

Please sign in to comment.