Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add CI for Rust Docs #1313

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Enforces Rust Docs sanity (protocols crates only)
# If `cargo doc --all-features` fails for one crate, the entire workflow fails

name: Rust Docs

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
cargo-doc-all-features:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Rust Docs crate common
run: |
cd common
cargo doc --all-features

- name: Rust Docs crate buffer_sv2
run: |
cd utils/buffer
cargo doc --all-features

- name: Rust Docs crate no_serde_sv2_derive_codec
run: |
cd protocols/v2/binary-sv2/no-serde-sv2/derive_codec
cargo doc --all-features

- name: Rust Docs crate no_serde_sv2_codec
run: |
cd protocols/v2/binary-sv2/no-serde-sv2/codec
cargo doc --all-features

- name: Rust Docs crate serde_sv2
run: |
cd protocols/v2/binary-sv2/serde-sv2
cargo doc --all-features

- name: Rust Docs crate binary_sv2
run: |
cd protocols/v2/binary-sv2/binary-sv2
cargo doc --all-features

- name: Rust Docs crate const_sv2
run: |
cd protocols/v2/const-sv2
cargo doc --all-features

- name: Rust Docs crate framing_sv2
run: |
cd protocols/v2/framing-sv2
cargo doc --all-features

- name: Rust Docs crate noise_sv2
run: |
cd protocols/v2/noise-sv2
cargo doc --all-features

- name: Rust Docs crate codec_sv2
run: |
cd protocols/v2/codec-sv2
cargo doc --all-features

# todo: blocked by no_std migration
# for more details, see https://github.com/stratum-mining/stratum/issues/1311#issuecomment-2556243364

# - name: Rust Docs crate common_messages
# run: |
# cd protocols/v2/subprotocols/common-messages
# cargo doc --all-features

# todo: blocked by no_std migration
# for more details, see https://github.com/stratum-mining/stratum/issues/1311#issuecomment-2556243364

# - name: Rust Docs crate job_declaration
# run: |
# cd protocols/v2/subprotocols/job-declaration
# cargo doc --all-features

# todo: blocked by no_std migration
# for more details, see https://github.com/stratum-mining/stratum/issues/1311#issuecomment-2556243364

# - name: Rust Docs crate mining
# run: |
# cd protocols/v2/subprotocols/mining
# cargo doc --all-features

# todo: blocked by no_std migration
# for more details, see https://github.com/stratum-mining/stratum/issues/1311#issuecomment-2556243364

# - name: Rust Docs crate template_distribution
# run: |
# cd protocols/v2/subprotocols/template-distribution
# cargo doc --all-features

- name: Rust Docs crate sv2_ffi
run: |
cd protocols/v2/sv2-ffi
cargo doc --all-features

# todo: blocked by roles_logic_sv2 docs PR
# https://github.com/stratum-mining/stratum/pull/1263

# - name: Rust Docs crate roles_logic_sv2
#
# run: |
# cd protocols/v2/roles-logic-sv2
# cargo doc --all-features

- name: Rust Docs crate sv1_api
run: |
cd protocols/v1
cargo doc --all-features
Loading