ci(release): the release's packaging is a program of its own, longshot-packager #2691
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
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/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2691
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:ci-release-packager"
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?
Summary
The Windows release build has to wait for the Linux one only because the Linux job's
longshot-builderis also the tool that packages the release. This moves the packaging into a small program of its own,longshot-packager, that each release job builds for itself, so the two builds no longer depend on each other and any release runner can take either one. Players see nothing.builder/crates/longshot-packager(never shipped):tools,release ...,rust-keyand the two game-free compiles,compile --third-party-objects | --dry-run. It has no UI, Slint or crash-report dependency.release_cmd.rs,release_deltas.rs,release_objects.rsto the packager; thetoolscommand line tobuild_driver::tools::cli; the one-stage command's places tobuild_driver::build::stage_places;windowedtorelease::swap; the play names tobuild_driver::play::NAMES.longshot-builderdropsdev releaseanddev rust-key(their one caller is MagicBeanAdmin/Release'slongshot.yml). It keepsdev tools(mise, CI,tools-check.yml, Release's Longshot tools workflow,dev.py, the Test Farm's agent) andcompile --third-party-objects(from-sourceruns it).longshot-builder'soutput.rsanddiagnostics.rstobuild_core::report::console, which both programs use, so--output jsononlongshot-packagersays events on stdout and nothing else. Those diagnostics'targetis nowlongshot::console.compile --dry-run, the same code from the same commit. The Linux program that ships still runs its own.scripts/longshot_builder.py packagerbuilds it for the Linux system that runs it, with the release profile (quicker to compile than dist).Read first:
builder/crates/longshot-packager/src/main.rsandcompile.rs,scripts/longshot_builder.py(cmd_packager),docs/dev/reference/releases.md("The release workflow").Merge order: merge this, then push the matching
longshot.ymlchange to MagicBeanAdmin/Release straight away (prepared, not pushed). In between, the live workflow still callsdev releaseand a release of this commit or a later one fails. After the push, a commit from before this one can no longer be released by that workflow (it has no packager), so a stable is tagged on this commit or a later one.main(7a2ad9e5) fails on its own, so CI here does too until it is fixed there; none of it is in this change: threeneedless_borrowclippy errors inbuild-driver/src/play.rs(rebuild_reason);build-driver'scodestest (log_unavailableandplay_noticemissing frombuild-events.md); the guide screenshots' review ofsettings-graphics.png(gpu/vk/device_policy.hchanged).Testing
Tested: CachyOS Linux, NVIDIA RTX 3090, driver 620.70.06. Nothing was uploaded or published.
On
d21cfc0b(this change onmain7a2ad9e5; the head,cd5140d6, differs from it by one line ofreleases.md):cargo fmt --check; clippy with-D warnings -A clippy::needless_borrowover the workspace (Linux) and over the packager, builder,build-driver,build-coreandreleaseforx86_64-pc-windows-gnullvm;cargo test --workspace: 786 passed, 1 failed (codes, which fails the same way onmain); the synthetic game end to end.main'slongshot-builder dev ...on the same inputs: the same Rust source key;main's builder took the packager's third-party set whole (identical sets); the pack, the attached program, RecompLauncher's zip, the deltas and the manifest byte for byte the same.--output json,tools check --require,tools install,rust-key,release last-objects,compile,release sources,attach,dry-run,filesandrecomplaunchereach exit 0 with only events on stdout and nothing on stderr.--clean; a release-profile build stood in for the shipped one).tests/run_all.py --strict --changed: 29 passed, 2 failed:test_lifter.py(main's clippy errors andcodestest) andtest_renhdrum.py, only because that run's temporary folder's path began with the checkout's; it passes with another one.test_tools_check.py,scripts/check_third_party.py, pre-commit and actionlint pass.Before the rebase over #2688, #2690 and #2694 (
9c721d90):dev.py packover base3072dda4, built by that head'slongshot-builder, thendev.py rt; headless from the repository savekokiri-startinto play in Kokiri Forest (59.9 fps),quit, exit code 0,stop: close work donein the log. Not run again since.main's then: identical third-party sets, the dry run through the packager over the unpacked tree with the samedry run:lines as the builder's, the packed Windows program (release profile) started under Wine. Not run again since.Not covered: the dist profile's link against the sysroot.
Still to test:
mise run test, the whole run (by hand, or CI).Measurements
Nothing to measure: release packaging moves between programs, and the game and a player's build are unchanged.
Risks
longshot-builder dev releaseordev rust-keynow gets the usage;cargo run --release -p longshot-packager -- release ...replaces it.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Not ticked: only the checks reading changed files ran;test_lifter.pyfails onmain's clippy errors andcodestest.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible. Not ticked: one line ofthird_party/renhdrum/PROVENANCE.mdnames the new command; nothing else there changed.When it applies
tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: CachyOS Linux, RTX 3090, driver 620.70.06: a pack over base
3072dda4built by this branch's longshot-builder (9c721d90), run headless from the repository save kokiri-start into play in Kokiri Forest (59.9 fps), quit with exit code 0 after the close work finished.Possibly related, for context:
9c721d90e7d21cfc0b61d21cfc0b61cd5140d646WIP: ci(release): the release's packaging is a program of its own, longshot-packagerto ci(release): the release's packaging is a program of its own, longshot-packager