Skip to content

ci: add docs.rs compatibility checks - #649

Open
par1ram wants to merge 1 commit into
stratum-mining:mainfrom
par1ram:codex/issue-524-docs-rs-ci
Open

ci: add docs.rs compatibility checks#649
par1ram wants to merge 1 commit into
stratum-mining:mainfrom
par1ram:codex/issue-524-docs-rs-ci

Conversation

@par1ram

@par1ram par1ram commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • add a GitHub Actions workflow that checks docs.rs compatibility for all seven published application crates
  • prefetch dependencies, then run cargo docs-rs --offline inside an isolated Linux network namespace
  • document the reusable docs-rs-check.sh helper

Why

docs.rs builds crates without network access. A regular documentation build can therefore miss regressions where a dependency or build script attempts a download, as happened in #519.

This adds a focused regression check while keeping the implementation smaller than running the full docs.rs infrastructure.

Closes #524.

Validation

  • cargo +nightly docs-rs --offline passed for:
    • stratum-apps
    • pool_sv2
    • jd_server_sv2
    • jd_client_sv2
    • translator_sv2
    • integration_tests_sv2
    • bitcoin_core_sv2
  • actionlint .github/workflows/docs-rs.yaml
  • shellcheck scripts/docs-rs-check.sh
  • bash -n scripts/docs-rs-check.sh
  • git diff --check

The full Linux network-namespace path is exercised by the new workflow on this pull request.

@par1ram
par1ram force-pushed the codex/issue-524-docs-rs-ci branch from f7573bf to 410d48e Compare July 27, 2026 07:23
@par1ram
par1ram marked this pull request as ready for review July 28, 2026 13:28
Comment thread scripts/docs-rs-check.sh Outdated
echo "Building docs for ${manifest_path} in no-network sandbox"
export MANIFEST_PATH="$manifest_path"
export CARGO_BIN="$cargo_bin"
sudo --preserve-env=MANIFEST_PATH,CARGO_BIN,PATH,CARGO_HOME,RUSTUP_HOME,HOME unshare --net --mount-proc bash -lc \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't wanna use sudo on ci

@par1ram
par1ram force-pushed the codex/issue-524-docs-rs-ci branch from 410d48e to ecd98fa Compare August 3, 2026 08:31
@plebhash

plebhash commented Aug 4, 2026

Copy link
Copy Markdown
Member

@par1ram on this project we try to keep a reasonable level of git hygiene

if a reviewer asks you to change something, please don't add a new commit pivoting commit history to a new direction... simply rebase the original commit while atomically incorporating the review

in other words: ecd98fa shouldn't exist as a standalone commit

Build each published crate with cargo-docs-rs inside an offline network namespace so sandbox-only documentation regressions fail in CI.
@par1ram
par1ram force-pushed the codex/issue-524-docs-rs-ci branch from ecd98fa to 43f6c1a Compare August 12, 2026 18:30
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.

add CI for docs.rs

3 participants