Skip to content

Commit 5e7339c

Browse files
authored
Add Docs job to CI workflow for nightly builds
Added a new job to simulate docs.rs for nightly builds.
1 parent e78a9d0 commit 5e7339c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,28 @@ jobs:
107107
toolchain: stable
108108
- name: Build docs
109109
run: cargo doc --manifest-path Cargo.toml --no-deps
110+
111+
docsrs:
112+
name: Docs (simulate docs.rs on nightly)
113+
runs-on: ubuntu-latest
114+
steps:
115+
- uses: actions/checkout@v4
116+
117+
- name: Install Rust (nightly)
118+
uses: dtolnay/rust-toolchain@stable
119+
with:
120+
toolchain: nightly
121+
122+
- name: Cache cargo
123+
uses: Swatinem/rust-cache@v2
124+
125+
- name: Build docs like docs.rs
126+
env:
127+
DOCS_RS: "1"
128+
RUSTDOCFLAGS: "--cfg docsrs --cap-lints warn"
129+
run: |
130+
cargo +nightly doc --lib --no-deps \
131+
--features "smoltcp,critical-section,async,embassy-net,log,defmt"
132+
110133
env:
111134
RUSTDOCFLAGS: -D warnings

0 commit comments

Comments
 (0)