ci(release): sync Cargo.lock in create-release and gate CI on --locked (FJ-21) #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/create-release-cargo-lock-fj-21"
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
Two coupled fixes so the
create-releaserecipe always produces aCargo.lockthat matches the bumped manifests, and so ordinary CI catches lock drift at PR time instead of only at release-build time.Changes
justfilecreate-releaserecipe (around line 168): after the lockstep manifest bump and beforegit commit, runcargo update --workspaceto rewrite only the workspace member entries inCargo.lock, and stage the lockfile alongside the three manifests.cargo update --workspaceis the targeted operation: it touches only workspace members and leaves third-party pins alone, with no full compile required..forgejo/workflows/check.yml: add--lockedtocargo build --all-targets(stepBuild, line 30) andcargo test(stepUnit tests, line 33). The release Docker build already uses--locked(oci-build/Dockerfilelines 39 and 71;oci-build/Dockerfile.windowslines 39 and 63); mirroring it in normal CI moves drift detection from release time to PR time. Thev0.6.0release was bitten by this: the release commit bumpedcrates/fj/Cargo.tomlto0.6.0but leftCargo.lock'sforgejo-clientry at0.5.0, and the lock had to be patched post-hoc in94534e9.Stacking note
Stacked on FJ-20 (PR #19): the base is
chore/create-release-bump-libs-lockstep-fj-20, so thegit addline in the recipe already lists all three manifests. Merge FJ-20 first; the FJ-21 diff is thecargo update --workspaceline, theCargo.lockprepend on thegit addline, and the two--lockedflags incheck.yml.Acceptance criteria
just create-release <bump>runscargo update --workspaceafter the version bump and stagesCargo.lockin the release commit.Cargo.lockmatches all bumped manifests;cargo build --release --lockedsucceeds on the release commit with no follow-up lock patch..forgejo/workflows/check.ymlrunscargo build --all-targets --lockedandcargo test --locked.Cargo.lockfailscheck.yml(the--lockedflag now inBuild/Unit testsenforces this).Resolves FJ-21.
#FJ-21