Skip to content

Automatic release of main @ 020e4f4

Compare
Choose a tag to compare
@github-actions github-actions released this 09 Jun 21:10
· 10 commits to main since this release
improve Zig mirror cache warming

* When a file like `zig-0.13.0-dev.351+64ef45eb0.tar.xz` is fetched, now it _also_ goes and
  fetches all other OS/arch/source/bootstrap/minisig files for that same Zig version - to
  hopefully prevent any cases where you don't have a file for an obscure os/arch, or don't
  have minisig files.
* In the background, the system now polls for the latest index.json from both ziglang.org and
  machengine.org every 15 minutes, and warms the cache with all versions listed in there ahead
  of anyone requesting them - except for `master` / nightly Zig (as that would fill the disk
  quickly.)
* When a mirror tries to fetch -dev versions which are listed as Mach nominated versions in
  index.json, it now tries to fetch from pkg.machengine.org instead of ziglang.org (since the
  latter generally does not have them)

Previously, the `cache/zig/` directory was a flat single folder with all downloaded files inside
of it with no directory structure. This made it hard to determine which versions purging might
be acceptable for if e.g. the disk is full.

After this change, there are subfolders with official `zig` versions, nominated `mach` versions,
and `dev` nightly zig versions - making it easy to purge `dev`. Additionally, all e.g. zip/tar/etc
files for a single version now get their own subfolder. For example:

```
cache/zig/stable/0.11.0/<files>
cache/zig/stable/0.12.0/<files>
cache/zig/stable/0.12.1/<files>
cache/zig/stable/0.13.0/<files>
cache/zig/dev/0.14.0-dev.14+ec337051a/<files>
cache/zig/mach/0.12.0-dev.2063+804cee3b9/<files>
cache/zig/mach/0.13.0-dev.351+64ef45eb0/<files>
cache/zig/mach/0.12.0-dev.3180+83e578a18/<files>
```

Signed-off-by: Stephen Gutekanst <[email protected]>