fix(ci): hand the built engine to the exe build, which no longer finds it - #124
Merged
Conversation
…s it The 2.0.0-rc7 release published without ctld-tools.exe. PyInstaller failed with "Unable to find D:\a\CTLD\CTLD\CTLD.lua when adding binary and data files". Root cause: build-exe runs on its own runner. It checks the repository out and goes straight to PyInstaller, which bundles the engine via --add-data "../../CTLD.lua;ctld_data". The release job does build CTLD.lua, but on a different runner, and nothing was passed between them. That worked only because the engine used to be committed, so the checkout carried it. CHORE-UNTRACK-BUILT-ENGINE (PR #110) git-ignored it, and rc7 is the first release published since - so the regression had never had an occasion to show. That lot anticipated exactly this class of breakage and added an engine build to the python-quality job; release.yml was missed. Fix: the release job uploads the CTLD.lua it just built as an artifact, and build-exe downloads it before packaging. Chosen over rebuilding the engine a second time in build-exe so the exe embeds byte-for-byte the same file attached to the release - two independent builds could not guarantee that. if-no-files-found: error on the upload, so a missing engine fails the job that produced it rather than the one that consumes it.
Reviewer's GuideThis PR fixes the release pipeline regression where the ctld-tools.exe build no longer finds CTLD.lua by passing the freshly built engine from the release job to the build-exe job via GitHub Actions artifacts, ensuring the exe embeds the same engine file that is attached to the release. Sequence diagram for passing CTLD.lua from release job to build-exesequenceDiagram
participant release_job
participant artifact_storage
participant build_exe_job
participant pyinstaller
release_job->>release_job: Build CTLD.lua
release_job->>artifact_storage: actions_upload_artifact_v4(name=ctld-engine, path=CTLD.lua)
build_exe_job->>artifact_storage: actions_download_artifact_v4(name=ctld-engine)
build_exe_job->>pyinstaller: run_pyinstaller_add_data(../../CTLD.lua, ctld_data)
pyinstaller-->>build_exe_job: ctld-tools.exe with embedded CTLD.lua
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
2.0.0-rc7published withoutctld-tools.exe. PyInstaller failed withUnable to find D:\a\CTLD\CTLD\CTLD.lua when adding binary and data files— and the notes tell a Mission Maker the exe is the only file they need.Root cause.
build-exeruns on its own runner: it checks the repository out and goes straight to PyInstaller, which bundles the engine via--add-data "../../CTLD.lua;ctld_data". Thereleasejob does buildCTLD.lua— on a different runner, with nothing passed between them. That only ever worked because the engine used to be committed, so the checkout carried it.CHORE-UNTRACK-BUILT-ENGINE(#110) git-ignored it, and rc7 is the first release published since, so the regression had never had an occasion to show.#110 anticipated exactly this class of breakage and added an engine build to the
python-qualityjob.release.ymlwas missed.Fix. The
releasejob uploads theCTLD.luait just built as an artifact;build-exedownloads it before packaging. Chosen over rebuilding the engine a second time inbuild-exe, so the exe embeds byte-for-byte the same file attached to the release — two independent builds cannot guarantee that.if-no-files-found: erroron the upload, so a missing engine fails the job that produced it rather than the one that consumes it.Note on the smoke checks:
release.ymlalready asserts the bundled engine is present in the exe ("a bundle that silently loses an --add-data entry must fail the release"). They never ran here — PyInstaller died before producing anything.Test plan
yaml.safe_loadon the workflow; step order verified (download lands before the frontend build and PyInstaller)CTLD.luaat the workspace root, which is what../../CTLD.luaresolves to fromtools/ctld-toolsrelease.yml— only a tag push does)Summary by Sourcery
CI: