Skip to content

Move cargo doc to a seperate CI job#7883

Merged
youknowone merged 1 commit into
RustPython:mainfrom
ShaharNaveh:ci-seperate-cargo-doc
May 16, 2026
Merged

Move cargo doc to a seperate CI job#7883
youknowone merged 1 commit into
RustPython:mainfrom
ShaharNaveh:ci-seperate-cargo-doc

Conversation

@ShaharNaveh
Copy link
Copy Markdown
Contributor

@ShaharNaveh ShaharNaveh commented May 16, 2026

By having this under a separate job we can trigger it when needed and not on every PR change

Summary by CodeRabbit

  • Chores
    • Optimized continuous integration workflow for documentation generation with improved caching and toolchain management.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 94edc7af-4c75-40c4-90ff-225e84de9ee1

📥 Commits

Reviewing files that changed from the base of the PR and between 0871bc8 and 6d2bccd.

📒 Files selected for processing (1)
  • .github/workflows/ci.yaml

📝 Walkthrough

Walkthrough

The pull request refactors cargo documentation generation in the CI workflow by extracting the cargo doc --locked step from the rust_tests job into a separate, conditionally-executed job that runs when Rust code changes are detected or when building the main branch.

Changes

Cargo doc job restructuring

Layer / File(s) Summary
Remove cargo doc from rust_tests job
.github/workflows/ci.yaml
The Linux-conditional cargo doc --locked step is removed from the rust_tests job.
Add conditional cargo_doc job
.github/workflows/ci.yaml
A new top-level cargo_doc job runs cargo doc --locked on ubuntu-latest when Rust code changes are detected or on main branch pushes, including Cargo/target cache restoration and stable Rust toolchain setup.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • RustPython/RustPython#7741: Also refactors .github/workflows/ci.yaml by reorganizing Rust CI job structure, removing parts of rust_tests and adding separate top-level jobs for cargo tooling.
  • RustPython/RustPython#7760: Also modifies .github/workflows/ci.yaml to conditionally run Rust-related tasks based on detected code changes.
  • RustPython/RustPython#7572: Also gates Rust CI jobs based on whether Rust code changed in the same workflow file.

Suggested reviewers

  • youknowone

Poem

🐰 A docs job hops free,
From rust_tests' old tree,
Now conditional springs,
When changes take wings—
Cargo doc runs lean as can be! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: moving the cargo doc step from the rust_tests job into a separate CI job.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@youknowone youknowone merged commit 2d8f8ab into RustPython:main May 16, 2026
26 checks passed
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.

2 participants