Solved how to proper buildworld in 2024?

I have a script that I run once a day (more or less) that builds current, stable/14 and stable/13. I build current for arm64 as well. Another script lets me review git log since last commit these three branches were built locally, to keep an eye on what is changing. Anyway here is a brief log:
# mkw curr 14 13 -A aarch64 curr &
### when it is done:
# grep 'built in' ~/a*64/*/err
/root/aarch64/current/err:>>> World built in 119 seconds, ncpu: 16, make -j18
/root/aarch64/current/err:>>> Kernel(s) GENERIC-NODEBUG built in 244 seconds, ncpu: 16, make -j18
/root/amd64/current/err:>>> World built in 129 seconds, ncpu: 16, make -j18
/root/amd64/current/err:>>> Kernel(s) GENERIC built in 300 seconds, ncpu: 16, make -j18
/root/amd64/stable/err:>>> World built in 89 seconds, ncpu: 16, make -j18
/root/amd64/stable/err:>>> Kernel(s) GENERIC built in 114 seconds, ncpu: 16, make -j18
/root/amd64/stable13/err:>>> World built in 135 seconds, ncpu: 16, make -j18
/root/amd64/stable13/err:>>> Kernel(s) GENERIC built in 48 seconds, ncpu: 16, make -j18

This build machine is a 5 year old Ryzen machine, with WD "Gold" disks.

For every successful build I install kernel, world on at least the VMs & pi4 but may also do so x86-64 machines (all except the build machine, which gets updated about monthly).
Have you considered only building if changes are present? Though often there are multiple commits per day, some days don't get any. If there is no changes then you can reduce build + install time and reduce flash memory wear if, for example, using a memory card for the rasperry pi. You could monitor git log for changes; most recent commit is supposed to be first but the dates labeled on the commit do not always also stay chronological. Maybe `git show` could be more efficient workflow?
 
I was asking about all of them though I think I mainly used to use it with /usr/src and wondered what happened. Today I found out but that makes the partial support of make update seem inconsistent. As running git manually works to update src, doc, and ports I would have to recommend that over `make update` so only 1 thing is learned and used everywhere, unless support comes back.
 
If you are using zfs, you could use beinstall.sh script, which will install the new kernel and world in a new boot environment. This is what I do:

1. cd /usr/src
2. make buildworld
3. make buildkernel
4. tools/build/beinstall.sh

This will install kernel, world, merge config files and update packages in a new boot environment. If it fails, it will delete the boot environment, leaving your current environment untouched.
5. shutdown -r now
6. make -DBATCH_DELETE_OLD_FILES delete-old
7. make -DBATCH_DELETE_OLD_FILES delete-old-libs
 
Back
Top