pmbootstrap/pmb/build
Oliver Smith a0cea6255a
pmb.config: mount go caching directories
Always set GOCACHE during build and let it point to pmbootstrap's work
dir. This has a similar effect as using ccache for C/C++.

Set GOMODCACHE conditionally: this is for caching the go modules (git
repositories) that get cloned during a build if they are not bundled
with the source. Usually APKBUILDs should cache them, but when using
pmbootstrap build --src, they would get downloaded over and over again.
Set GOMODCACHE automatically for --src and allow enabling/disabling this
manually with new --go-mod-cache / --no-go-mod-cache.

This speeds up multiple iterations of building the same package
significantly. I'm using it for:

$ pmbootstrap build postmarketos-mkinitfs --src=...

I've verified that using the same GOCACHE dir for multiple architectures
doesn't result in build artifacts for the wrong arch getting used.

Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230223064743.1773-1-ollieparanoid@postmarketos.org%3E
2023-02-26 19:37:30 +01:00
..
__init__.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
_package.py pmb.config: mount go caching directories 2023-02-26 19:37:30 +01:00
autodetect.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
checksum.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
envkernel.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
init.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
menuconfig.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
newapkbuild.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
other.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00