github: Cache the GNU downloads
The downloads from gnu.org have occasionally failed (probably due
to being under load from AI bots).
eea8f577e02a08d90e7a7c1c60251e7760f6a880 helped a bit by doing the
download from a mirror, but despite that, these downloads still
fail occasionally.
To avoid having to fetch the source tarballs for each build (both
for reducing unnecessary load on the upstream servers, and for
improved reliability), store them in github action caches.
Unless we had a cache hit (a fully matching cache key), download
all the tarballs we're interested in (which then gets stored,
implicitly, the end of the job) upfront. This uses the same cache
key, and downloads the same tarballs, for both the initial "gcc" jobs
(that only need binutils and gcc) and the later "gcc-cross" (which
also need gmp, mpfr and mpc), to allow sharing a single cache
for both of them.
Signed-off-by: Martin Storsjö <martin@martin.st>
1 file changed