ci: stop the LLVM caches from being evicted

The Actions cache of the repository was at 10.24 GB against a quota of
10 GB, so GitHub removed entries by least recent use. The LLVM entries
were among the first to go, and CI then built LLVM again although the
LLVM version did not change.

The Docker buildx layer blobs held 6.0 GB of the quota. All LLVM caches
together held 1.97 GB. Move the Docker layer cache to a registry cache in
GHCR, which does not use the Actions quota. Both jobs have the necessary
permission and login already.

Pin the LLVM commit in llvm-version.txt and fetch that commit, in place
of a clone of the branch tip tinygo_22.x. Add a hash of that file to each
LLVM cache key, so a change of the LLVM version invalidates the caches
and no other change does.

Also rename the LLVM image tags from llvm-20 to llvm-22.
This commit is contained in:
deadprogram
2026-08-29 10:58:49 +02:00
committed by Ron Evans
parent b420a8be17
commit 421d98b248
13 changed files with 34 additions and 21 deletions
+4
View File
@@ -53,6 +53,10 @@ the git repository). Then, inside the directory, download the LLVM source:
make llvm-source
The LLVM commit to use is pinned in `llvm-version.txt`. A change to that file
makes CI build LLVM again, because the file is part of the LLVM cache key. All
other changes reuse the cached LLVM build.
You can also store LLVM outside of the TinyGo root directory by setting the
`LLVM_BUILDDIR`, `CLANG_SRC` and `LLD_SRC` make variables, but that is not
covered by this guide.