-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (50 loc) · 1.62 KB
/
rustdoc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
name: Documentation
"on":
push:
branches:
- trunk
pull_request:
branches:
- trunk
schedule:
- cron: "0 0 * * TUE"
concurrency:
group: docs-${{ github.head_ref }}
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
rustdoc:
name: Build Rust API docs
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings -D rustdoc::broken_intra_doc_links --cfg docsrs
RUST_BACKTRACE: 1
steps:
- name: Checkout repository
uses: actions/checkout@v3.5.3
- name: Install Rust toolchain
uses: artichoke/setup-rust/rustdoc@v1.10.0
- name: Install emscripten target
run: rustup target add wasm32-unknown-emscripten
- name: Set toolchain versions
run: |
echo "emscripten=$(cat emscripten-toolchain)" >> $GITHUB_OUTPUT
id: toolchain_versions
- name: Install Emscripten toolchain
uses: mymindstorm/setup-emsdk@ab889da2abbcbb280f91ec4c215d3bb4f3a8f775 # v12
with:
version: ${{ steps.toolchain_versions.outputs.emscripten }}
no-cache: true
- name: Verify emcc version
run: emcc -v
- name: Check docs with no default features
run: cargo doc --workspace --no-default-features
- name: Check docs with no default features (emscripten)
run: cargo doc --workspace --no-default-features --target wasm32-unknown-emscripten
- name: Clean docs
run: cargo clean
- name: Build Documentation
run: cargo doc --workspace
- name: Build Documentation (emscripten)
run: cargo doc --workspace --target wasm32-unknown-emscripten