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

Match CI doc testing with docs.rs. #734

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,17 @@ jobs:
with:
save-if: ${{ github.event_name != 'merge_group' }}

# We test documentation using nightly to match docs.rs. This prevents potential breakages
# We test documentation using nightly to match docs.rs.
- name: cargo doc
run: cargo doc --workspace --locked --all-features --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
run: cargo doc --workspace --locked --all-features --no-deps --document-private-items
env:
RUSTDOCFLAGS: '--cfg docsrs -D warnings'

# If this fails, consider changing your text or adding something to .typos.toml
# If this fails, consider changing your text or adding something to .typos.toml.
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: check typos
uses: crate-ci/typos@v1.26.0
uses: crate-ci/typos@v1.27.0
2 changes: 1 addition & 1 deletion examples/scenes/src/test_scenes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export_scenes!(
);

/// Implementations for the test scenes.
/// In a module because the exported [`ExampleScene`](crate::ExampleScene) creation functions use the same names.
/// In a module because the exported [`ExampleScene`] creation functions use the same names.
mod impls {
use std::f64::consts::PI;

Expand Down
6 changes: 6 additions & 0 deletions vello/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ rust-version.workspace = true
license.workspace = true
repository.workspace = true

[package.metadata.docs.rs]
all-features = true
# There are no platform specific docs.
default-target = "x86_64-unknown-linux-gnu"
targets = []

[features]
default = ["wgpu"]
# Enables GPU memory usage estimation. This performs additional computations
Expand Down
2 changes: 2 additions & 0 deletions vello/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
//!
//! See the [`examples/`](https://github.com/linebender/vello/tree/main/examples) folder to see how that code integrates with frameworks like winit.

#![cfg_attr(docsrs, feature(doc_auto_cfg))]

mod debug;
mod recording;
mod render;
Expand Down
2 changes: 1 addition & 1 deletion vello/src/wgpu_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub(crate) struct WgpuEngine {
#[cfg(not(target_arch = "wasm32"))]
shaders_to_initialise: Option<Vec<UninitialisedShader>>,
pub(crate) use_cpu: bool,
/// Overrides from a specific `Image`'s [`id`](peniko::Image::id) to a wgpu `Texture`.
/// Overrides from a specific `Image::data`'s [`id`](peniko::Blob::id) to a wgpu `Texture`.
///
/// The `Texture` should have the same size as the `Image`.
pub(crate) image_overrides: HashMap<u64, wgpu::ImageCopyTextureBase<Arc<Texture>>>,
Expand Down
6 changes: 6 additions & 0 deletions vello_encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ rust-version.workspace = true
license.workspace = true
repository.workspace = true

[package.metadata.docs.rs]
all-features = true
# There are no platform specific docs.
default-target = "x86_64-unknown-linux-gnu"
targets = []

[features]
default = ["full"]

Expand Down
2 changes: 2 additions & 0 deletions vello_encoding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

//! Raw scene encoding.

#![cfg_attr(docsrs, feature(doc_auto_cfg))]

mod binning;
mod clip;
mod config;
Expand Down
6 changes: 6 additions & 0 deletions vello_shaders/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ rust-version.workspace = true
license.workspace = true
repository.workspace = true

[package.metadata.docs.rs]
all-features = true
# There are no platform specific docs.
default-target = "x86_64-unknown-linux-gnu"
targets = []

[features]
default = ["wgsl", "full", "cpu"]
compile = ["dep:naga", "dep:thiserror"]
Expand Down
2 changes: 2 additions & 0 deletions vello_shaders/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
//!
//! [Vello]: https://github.com/linebender/vello

#![cfg_attr(docsrs, feature(doc_auto_cfg))]

mod types;

#[cfg(feature = "compile")]
Expand Down