Skip to content

Commit 2d6dc4c

Browse files
committed
Add docs.rs like CI task
1 parent ef7ee8c commit 2d6dc4c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ jobs:
3737
command: ${{matrix.command}}
3838
args: "${{matrix.command == 'fmt' && '--all -- --check' || '-- -D warnings'}}"
3939

40+
doc: # This task should mirror the procedure on docs.rs
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v2
45+
with: {submodules: true}
46+
- name: Install Rust (${{matrix.rust}})
47+
uses: actions-rs/toolchain@v1
48+
with: {toolchain: nightly, profile: minimal, override: true}
49+
- name: Document workspace
50+
run: env RUSTDOCFLAGS="--cfg docsrs" cargo doc --features hdf5-sys/static,hdf5-sys/zlib,blosc,lzf
51+
4052
brew:
4153
name: brew
4254
runs-on: macos-latest

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ tempfile = "3.2"
4747

4848
[package.metadata.docs.rs]
4949
features = ["hdf5-sys/static", "hdf5-sys/zlib", "blosc", "lzf"]
50+
rustdoc-args = ["--cfg", "docsrs"]

0 commit comments

Comments
 (0)