Skip to content

chore(ci): install publish build targets#687

Merged
jdx merged 1 commit into
mainfrom
codex/fix-publish-musl-target
Jun 17, 2026
Merged

chore(ci): install publish build targets#687
jdx merged 1 commit into
mainfrom
codex/fix-publish-musl-target

Conversation

@jdx

@jdx jdx commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • install the Rust target for each publish matrix entry before upload-rust-binary-action
  • skip the synthetic universal-apple-darwin target because it is not a rustup target

Root Cause

The v3.5.1 publish job for x86_64-unknown-linux-musl failed after cross fell back to host cargo:

error[E0463]: can't find crate for `core`
= note: the `x86_64-unknown-linux-musl` target may not be installed

Installing the matrix target up front makes host-cargo fallback work for musl and other non-default targets.

Failed job: https://github.com/jdx/usage/actions/runs/27660960261/job/81805071490

Validation

  • actionlint .github/workflows/publish-cli.yml

This PR was generated by an AI coding assistant.


Note

Low Risk
CI-only workflow change with no runtime or application code impact.

Overview
Fixes publish-cli matrix builds that fail when cross falls back to host cargo without the target installed (e.g. x86_64-unknown-linux-musl with “can't find crate for core”).

Adds an Install Rust target step right after the stable toolchain setup: rustup target add ${{ matrix.target }} for every matrix entry except universal-apple-darwin, which is a synthetic fat-binary target and not a rustup triple.

Reviewed by Cursor Bugbot for commit eb805dd. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jdx, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 11 minutes and 16 seconds. Learn how PR review limits work.

To continue reviewing without waiting, enable usage-based billing in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: f91bd0e2-5a50-4981-8da6-f958b769884a

📥 Commits

Reviewing files that changed from the base of the PR and between c601894 and eb805dd.

📒 Files selected for processing (1)
  • .github/workflows/publish-cli.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a rustup target add ${{ matrix.target }} step to the build-and-publish matrix job so that host-cargo fallbacks (e.g. when cross falls back due to missing Docker) can find the required target. The synthetic universal-apple-darwin target is excluded via a conditional because it is not a valid rustup triple.

  • The skip condition matrix.target != 'universal-apple-darwin' is correct — that target is assembled from separate x86_64-apple-darwin and aarch64-apple-darwin builds by upload-rust-binary-action and cannot be added via rustup.
  • For cross-based targets the step is mostly a no-op at build time but provides resilience when cross falls back to host Cargo, which was the root cause of the v3.5.1 failure.
  • For native Windows (x86_64-pc-windows-msvc, aarch64-pc-windows-msvc) the step ensures the target is present before cargo is invoked directly.

Confidence Score: 5/5

The change is a single three-line CI step addition with a well-scoped conditional; it cannot break existing builds and only improves reliability of the non-default targets.

The added step is idempotent (rustup target add is a no-op if the target already exists), the universal-apple-darwin exclusion is correct, and the change directly matches the stated root cause. No logic paths are affected in the production code.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/publish-cli.yml Adds a rustup target add step before upload-rust-binary-action, skipping the synthetic universal-apple-darwin target; correctly addresses the missing-target fallback failure.

Reviews (1): Last reviewed commit: "chore(ci): install publish build targets" | Re-trigger Greptile

@jdx jdx merged commit 4a5fe74 into main Jun 17, 2026
7 checks passed
@jdx jdx deleted the codex/fix-publish-musl-target branch June 17, 2026 02:16
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 17, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [usage](https://github.com/jdx/usage) | patch | `3.5.0` → `3.5.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jdx/usage (usage)</summary>

### [`v3.5.2`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#352---2026-06-17)

[Compare Source](jdx/usage@v3.5.0...v3.5.2)

##### 🔍 Other Changes

- **(ci)** install publish build targets by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;687](jdx/usage#687)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTguMCIsInVwZGF0ZWRJblZlciI6IjQzLjIxOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
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