ci(release): no dav1d build per release, and a tag skips the build checks its commit's release passed #143
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!143
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:release-speed"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Every release builds dav1d from source in a job whose output nothing uses (the builder gets dav1d from
tools.lock'scpmpackage), and a tag on a commit CI already released (its nightly, or a stable's release candidate) runs every build check again. Both cost runner time on a 4-core runner shared with a VM, and the dav1d job held one of its 3 slots for 4 minutes per release.What changed
build-windows.yml): thedav1djob (meson, nasm, Wine with apt; dav1d 1.5.4 built from source; an artifact nobody downloaded) is gone. Thepackagejob, which already has Wine and llvm-mingw, now installstools.lock'scpmpackage (scripts/tools.py install --only cpm, checked by its SHA-256) and runstests/test_dav1d_av1.pyunder Wine against that package's dav1d: the check now covers the library players actually get.scripts/windows/dav1d.shstays, as the way a maintainer makes that package; its header and RELEASING.md's Bump a tool say so (assemble cpm --add <cpm folder>; the old line pointed at the removed artifact).release.yml,scripts/release.py released-as): on a tag, The version asks for the published release of the same commit (anightly-*whose tag is that commit, or a stable's release candidate), downloads itsSHA256SUMSand.sig(throughRELEASE_UPLOAD_API's host when it is set), and checks that a key inscripts/release_keys.jsonsigned it and that it names exactly the release's files. A release of the commit that fails any of this stops the run; with none, the build is as today. When one is found, its tag goes to both build workflows aschecked, and the build checks that ship no file and passed in its run are skipped: the Windows Vulkan back end job (every step gated onRELEASE_CHECKED) and the AppImage's AMD FSR 4 build check.usr/share/longshot/VERSION(read bylinux_tools.py/linux_update.pyfor the tools folder, and bynx2/version.py) andlongshot_vk.so, whosevk_menu.cppis compiled with-DLONGSHOT_VERSION="<tag> (source …)"(the menu, the bug report). The zip hasVERSION(the setup installs intoversions\<version>) and the builder published with-p:Version=<X.Y.Z-rc.N>(a nightly's is 0.0.0). A renamed nightly file would claim the nightly's version, so both files are always built again. Carrying the commit instead and reading the version from the release would change the setup, the AppImage, the game's version line and RecompLauncher's hand installs; rebuilding only the parts that change would still recompile the whole Vulkan back end for the one object that has the version. Neither is simpler than building the file again.tests/test_release.py(shared) getsReleasedAs: the lookup (by the tag's commit, not by the 8 hex in the name; drafts, other commits, the tag itself and non-product tags ignored; a stable finds its rc), the verification (untrusted key, corrupt or non-base64 signature, a file more or less thanSHA256SUMSnames, a missing.sig, a file that doesn't answer: each stops it), the download through the address without Cloudflare, and the command.tests/test_windows_on_linux.pychecks that no dav1d is built in CI, that thepackagejob checkstools.lock's dav1d under Wine, and thatcheckedgates every step of the Vulkan job and only the FSR check on Linux.scripts/release.py,tests/test_release.py,docs/releases.mdandRELEASING.mdchange the same way in MagicBeanDev/LongshotLauncher (MagicBeanDev/LongshotLauncher#11); the four files are byte-identical (cmp).Flags and settings
None. (
checkedis a new optional input ofbuild-linux.ymlandbuild-windows.yml, empty by default: a run by hand behaves as before.)Measurements
main:
e28236b4(2026-11-13)this PR: release-speed @
6a9895eeHardware: the Unraid runner (Ryzen 5 3400G, 4C/8T, shared with a VM), capacity 3,
ghcr.io/catthehacker/ubuntu:act-24.04in Docker-in-DockerScene: nightly run 717 (
nightly-34-545618fc); its build workflows are main's (545618fc..e28236b4 changes no build workflow)Method: per-step durations from Forgejo's
action_task_step(the stored logs keep no per-step markers), queue time fromaction_run_job; one run (a release run can't be repeated on demand without making releases; the test suite below ran interleaved, twice each). This PR's own numbers wait for its first nightly and tag: the build workflows have no pull-request trigger and the fork has no runnerHow to reproduce:
sqlite3 -readonly gitea.db "select task_id, \"index\", stopped-started, name from action_task_step where task_id in (446,448,449,458,497)"e28236b4(run 717)6a9895ee(expected)dav1djob (runner time)package)cpmdownload, the test compile and its Wine run)appimage)Testing
Tested:
LONGSHOT_VULKAN_HEADERS=/usr/include python -I -B tests/run_all.pyon main @e28236b4and on this branch, interleaved, twice each (Linux, CachyOS): 500 passed, 2 failed, 36 skipped on all four runs (main 92 s, 92 s; this branch 106 s, 86 s); the 2 failures are the knowntest_bake_portabilityandtest_builder_log_read_only, on main too.tests/test_release.pypasses in the LongshotLauncher copy as well.released-asagainst git.magicbean.dev: for545618fc(taggedv3.0.0-rc.1),--not v3.0.0-rc.1printsnightly-34-545618fc, itsSHA256SUMSchecked with the real release key.tests/test_dav1d_av1.py --crosswith llvm-mingw 20261104 compiles and links against thecpmpackage'slibdav1d.ainstalled bytools.py install --only cpm. actionlint 1.7.12 reports nothing new against main.Not tested: the workflows themselves, because the fork's branch has no runner: the Wine run of the dav1d test in the zip's job (there's no Wine here) and the
checkedpath of a tag. The first nightly after merge runs the dav1d check ("host/dav1d_av1.c on it, under Wine"). The first tag on a nightly's commit runsreleased-as: its The version prints a::notice::naming the nightly, and the Vulkan job's steps are skipped. The maintainer who merges and tags sees both.Needs other testers:
None
Screenshots
Nothing on screen
Risk and rollback
released-asfinds a release of the commit whoseSHA256SUMSdoes not check, the tag's run stops in The version: by design, nothing is built or published. Delete the bad release (or fix the key) and push the tag again.if:s as expected, the Vulkan job would simply run as today.cpmpackage's dav1d failed under Wine, the zip's job fails and so does the release: that is the library players get. Reverting the commit brings the old job back.Reviewer notes
Start with
released_as()inscripts/release.pyand the version step inrelease.yml. Left for follow-ups (report in the first comment):publishwaited 6.8 min for a runner in run 717 (it could run onquick: 104 s); release runs read no cache by design, thoughtools.pychecks every cached archive's SHA-256, so a cache oftools.lock's archives would be safe for releases too.Issues
None.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
tests/that reads changed source updated in this PR, not weakened.WIP: ci(release): no dav1d build per release, and a tag skips the build checks its commit's release passedto ci(release): no dav1d build per release, and a tag skips the build checks its commit's release passedWhere the time goes in run 717 (nightly-34-545618fc, 21.5 min overall), and what caching would gain. These are follow-ups, not part of this PR.
appimage, 736 s. The steps: apt 154 s, deps (Python with Tk) 108 s, tools.lock tools 61 s, AppImage 339 s (Vulkan back end compile 226 s, squashfs 55 s), FSR check 23 s.publishwaited 6.8 min for a runner slot, then ran in 104 s (90 s of that is the two artifact downloads through Cloudflare). Moving it toruns-on: quickis a one-line change and the biggest single gain./data/.cache/actcache, and the quick runner has its own. The evidence:llvm-mingw-…was saved by task 278 and restored by task 279, andlinux-deps-downloads-…was saved in run 717. Nocache:setting needs to change. Release runs read no cache by design, though. Sincetools.py fetchchecks every cached archive's size and SHA-256, cachingtools-cacheand llvm-mingw would be safe on releases too.appimageand 20 s onpackage.test_linux_docker_packageskept in step).package(Wine 38 s, .NET and Python setup 33 s).