Skip to content

Commit 1a984a6

Browse files
committed
Add docs build
1 parent 8eae25c commit 1a984a6

File tree

3 files changed

+34
-27
lines changed

3 files changed

+34
-27
lines changed

.github/ci/doc.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
## on push branch=main
3+
4+
set -euxo pipefail
5+
6+
export RUSTUP_HOME=/ci/cache/rustup
7+
export CARGO_HOME=/ci/cache/cargo
8+
export CARGO_TARGET_DIR=/ci/cache/target
9+
export BUILDER_THREADS=4
10+
export BUILDER_COMPRESS=true
11+
12+
# force rustup to download the toolchain before starting building.
13+
# Otherwise, the docs builder is running multiple instances of cargo rustdoc concurrently.
14+
# They all see the toolchain is not installed and try to install it in parallel
15+
# which makes rustup very sad
16+
rustc --version > /dev/null
17+
18+
docserver-builder -i . -o webroot/crates/nrf-pac/git.zup
19+
20+
export KUBECONFIG=/ci/secrets/kubeconfig.yml
21+
POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name})
22+
kubectl cp webroot/crates $POD:/data

.github/workflows/doc.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,15 @@ nrf54l15-app = []
2424
nrf54l15-flpr = []
2525
nrf9120 = []
2626
nrf9160 = []
27+
28+
[package.metadata.embassy_docs]
29+
src_base = "https://github.com/embassy-rs/nrf-pac/blob/v$VERSION/src/"
30+
src_base_git = "https://github.com/embassy-rs/nrf-pac/blob/$COMMIT/src/"
31+
features = ["rt"]
32+
flavors = [
33+
{ regex_feature = "nrf51", target = "thumbv6m-none-eabi" },
34+
{ regex_feature = "nrf52.*", target = "thumbv7em-none-eabihf" },
35+
{ regex_feature = "nrf53.*", target = "thumbv8m.main-none-eabihf" },
36+
{ regex_feature = "nrf54.*", target = "thumbv8m.main-none-eabihf" },
37+
{ regex_feature = "nrf91.*", target = "thumbv8m.main-none-eabihf" },
38+
]

0 commit comments

Comments
 (0)