pmbootstrap/pmb
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
..
aportgen Bump copyright to 2023 2023-01-22 19:18:06 +01:00
build pmb.config: mount go caching directories 2023-02-26 19:37:30 +01:00
chroot Bump copyright to 2023 2023-01-22 19:18:06 +01:00
ci Bump copyright to 2023 2023-01-22 19:18:06 +01:00
config pmb.config: mount go caching directories 2023-02-26 19:37:30 +01:00
data pmb: data: keys: sync with Alpine (MR 2131) 2021-10-19 01:44:35 +02:00
export Bump copyright to 2023 2023-01-22 19:18:06 +01:00
flasher Bump copyright to 2023 2023-01-22 19:18:06 +01:00
helpers check_binfmt_misc: print more helpful error 2023-02-19 16:13:52 +01:00
install Bump copyright to 2023 2023-01-22 19:18:06 +01:00
netboot Bump copyright to 2023 2023-01-22 19:18:06 +01:00
parse pmb.config: mount go caching directories 2023-02-26 19:37:30 +01:00
qemu Bump copyright to 2023 2023-01-22 19:18:06 +01:00
sideload 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