build(tools): the build tools download from git-cdn.magicbean.dev, Cloudflare's edge, first #160

Merged
HumanBean merged 1 commit from HumanBean/Longshot:build/tools-cdn into main 2026-11-13 07:59:21 +00:00
Owner

Why

Forgejo's packages are now in Cloudflare R2 and git-cdn.magicbean.dev serves them from Cloudflare's edge, so the 500+ MB of build tools a player downloads at first start can come from the edge instead of through Unraid's tunnel.

What changed

  • tools.lock: each tool's first URL is https://git-cdn.magicbean.dev/api/packages/MagicBeanDev/generic/<name>-<system>/<version>/<file>, then the same file on git.magicbean.dev, then upstream; the header says so.
  • scripts/tools.py: CDN, store_urls(); mirror and add write both first; check --require refuses a line whose store copy isn't preceded by its edge copy, and still checks the file through the package API.
  • tests/test_tools_lock.py: the repository's lock has both first; a line without the edge link fails the check.
  • docs/releases.md (shared, byte-identical with LongshotLauncher's, same PR there).

Flags and settings

None

Measurements

main: 1be180bb (2026-11-13)
this PR: build/tools-cdn @ b668b937

main @ 1be180bb this PR @ b668b937
python (55 MB) download 0.85 MB/s (through the tunnel, before R2) about 41 MB/s from R2, edge-cached after the first (measured by the website session)
each tool's first URL, live — 11 of 11 answer 200 with tools.lock's size; wgpu-native and third-party downloaded whole, SHA-256 match

Testing

Tested: tools.py check --require against the live server; test_tools_lock, test_linux_tools, test_windows_on_linux, test_release; each new URL live (size), two downloaded whole (SHA-256).

Not tested: a first start on a player's PC with the new lock (the next release carries it).

Needs other testers: None

Screenshots

Nothing on screen

Risk and rollback

If git-cdn fails, every installer falls back to the git.magicbean.dev link, then upstream; files are checked by SHA-256 either way. Reverting the commit is enough.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.
## Why Forgejo's packages are now in Cloudflare R2 and git-cdn.magicbean.dev serves them from Cloudflare's edge, so the 500+ MB of build tools a player downloads at first start can come from the edge instead of through Unraid's tunnel. ## What changed - `tools.lock`: each tool's first URL is `https://git-cdn.magicbean.dev/api/packages/MagicBeanDev/generic/<name>-<system>/<version>/<file>`, then the same file on git.magicbean.dev, then upstream; the header says so. - `scripts/tools.py`: `CDN`, `store_urls()`; `mirror` and `add` write both first; `check --require` refuses a line whose store copy isn't preceded by its edge copy, and still checks the file through the package API. - `tests/test_tools_lock.py`: the repository's lock has both first; a line without the edge link fails the check. - `docs/releases.md` (shared, byte-identical with LongshotLauncher's, same PR there). ## Flags and settings None ## Measurements main: 1be180bb (2026-11-13) this PR: build/tools-cdn @ b668b937 | | main @ 1be180bb | this PR @ b668b937 | |---|---|---| | python (55 MB) download | 0.85 MB/s (through the tunnel, before R2) | about 41 MB/s from R2, edge-cached after the first (measured by the website session) | | each tool's first URL, live | — | 11 of 11 answer 200 with tools.lock's size; wgpu-native and third-party downloaded whole, SHA-256 match | ## Testing **Tested:** `tools.py check --require` against the live server; `test_tools_lock`, `test_linux_tools`, `test_windows_on_linux`, `test_release`; each new URL live (size), two downloaded whole (SHA-256). **Not tested:** a first start on a player's PC with the new lock (the next release carries it). **Needs other testers:** None ## Screenshots Nothing on screen ## Risk and rollback If git-cdn fails, every installer falls back to the git.magicbean.dev link, then upstream; files are checked by SHA-256 either way. Reverting the commit is enough. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.
build(tools): the build tools download from git-cdn.magicbean.dev, Cloudflare's edge, first
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Successful in 2s
CI / Workflow lint (actionlint) (pull_request) Successful in 4s
Third-party parts / As their notes say (pull_request) Successful in 5s
b668b9374c
HumanBean deleted branch build/tools-cdn 2026-11-13 07:59:21 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!160
No description provided.