Skip to content

Run dist artifact builds on pull requests - #10

Open
devfire wants to merge 3 commits into
mainfrom
ci/pr-run-mode-upload
Open

Run dist artifact builds on pull requests#10
devfire wants to merge 3 commits into
mainfrom
ci/pr-run-mode-upload

Conversation

@devfire

@devfire devfire commented Aug 25, 2026

Copy link
Copy Markdown
Owner

What

Set pr-run-mode = "upload" in dist-workspace.toml so cargo-dist builds the full 6-target artifact matrix on PRs instead of only running dist plan.

Why

PR runs of the Release workflow previously skipped build-local-artifacts (and everything downstream) because publishing is false on pull_request events and the default pr_run_mode is plan. That meant target-specific build breakage (e.g. windows-msvc only) surfaced only after tagging a release. With upload, builds run on every PR and artifacts attach to the workflow run; host/announce still skip, so nothing is ever released from a PR.

Note: cargo-dist forces needs_coherence=true in this mode — workspace versions must match tags in lockstep; single-package workspace, so trivially satisfied.

Deviations

  • The dist generate-ci regeneration also adds a swatinem/rust-cache@v2 step to build-local-artifacts (4 lines). Blocked from push by missing workflow token scope; follows as a second commit once scope is granted. The behavior change does not depend on it — the job if: reads pr_run_mode from the runtime plan manifest, which comes from this toml change.

Verification

  • dist plan --output-format=json locally: ci.github.pr_run_mode == "upload", all 6 targets present in the artifacts matrix, exit 0.
  • This PR's Release run is the end-to-end check: build jobs must start instead of skipping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant