Skip to content

Commit 307e575

Browse files
committed
Move to doctest.yaml as ind CI and run inline from action
1 parent 8a5c6dd commit 307e575

File tree

3 files changed

+40
-37
lines changed

3 files changed

+40
-37
lines changed

.github/workflows/ci.yaml

-22
Original file line numberDiff line numberDiff line change
@@ -129,25 +129,3 @@ jobs:
129129

130130
- name: Clippy check
131131
run: cargo clippy --features=linux-native -- -D warnings
132-
133-
doc_build:
134-
runs-on: ubuntu-latest
135-
136-
steps:
137-
- name: Fetch head
138-
uses: actions/checkout@v4
139-
140-
- name: Install dependencies
141-
run: |
142-
sudo apt-get update
143-
sudo apt-get install -y libdbus-1-dev pkg-config
144-
145-
- name: Install rust nightly
146-
uses: dtolnay/rust-toolchain@stable
147-
with:
148-
toolchain: nightly
149-
targets: x86_64-unknown-linux-gnu, aarch64-apple-darwin, aarch64-apple-ios, x86_64-pc-windows-msvc
150-
components: rust-src
151-
152-
- name: docs build check
153-
run: bash test-docsrs-build.sh

.github/workflows/doctest.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Docs Build
2+
3+
on: [ workflow_dispatch, push, pull_request ]
4+
5+
jobs:
6+
doc_build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Check out repository
11+
uses: actions/checkout@v4
12+
13+
- name: Install dependencies
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install -y libdbus-1-dev pkg-config
17+
18+
- name: Install Rust nightly
19+
uses: dtolnay/rust-toolchain@stable
20+
with:
21+
toolchain: nightly
22+
targets: x86_64-unknown-linux-gnu, aarch64-apple-darwin, aarch64-apple-ios, x86_64-pc-windows-msvc
23+
components: rust-src
24+
25+
- name: Build docs
26+
run: |
27+
FEATURES="apple-native, windows-native, linux-native-sync-persistent, crypto-rust"
28+
TARGETS=(
29+
"x86_64-unknown-linux-gnu"
30+
"aarch64-apple-darwin"
31+
"aarch64-apple-ios"
32+
"x86_64-pc-windows-msvc"
33+
)
34+
35+
for TARGET in "${TARGETS[@]}"; do
36+
echo "Building docs for $TARGET"
37+
RUSTDOCFLAGS="--cfg docsrs" \
38+
cargo +nightly doc --no-deps --features "$FEATURES" --target "$TARGET" -Zbuild-std
39+
done
40+

test-docsrs-build.sh

-15
This file was deleted.

0 commit comments

Comments
 (0)