Skip to content

Commit

Permalink
Add docs build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Nov 15, 2024
1 parent 8eae25c commit 9216ac3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 27 deletions.
22 changes: 22 additions & 0 deletions .github/ci/doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
## on push branch=main

set -euxo pipefail

export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
export BUILDER_THREADS=4
export BUILDER_COMPRESS=true

# force rustup to download the toolchain before starting building.
# Otherwise, the docs builder is running multiple instances of cargo rustdoc concurrently.
# They all see the toolchain is not installed and try to install it in parallel
# which makes rustup very sad
rustc --version > /dev/null

docserver-builder -i . -o webroot/crates/nrf-pac/git.zup

export KUBECONFIG=/ci/secrets/kubeconfig.yml
POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name})
kubectl cp webroot/crates $POD:/data
27 changes: 0 additions & 27 deletions .github/workflows/doc.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ nrf54l15-app = []
nrf54l15-flpr = []
nrf9120 = []
nrf9160 = []

[package.metadata.embassy_docs]
src_base = "https://github.com/embassy-rs/nrf-pac/blob/v$VERSION/src/"
src_base_git = "https://github.com/embassy-rs/nrf-pac/blob/$COMMIT/src/"
features = ["rt"]
flavors = [
{ regex_feature = "nrf51", target = "thumbv6m-none-eabi" },
{ regex_feature = "nrf52.*", target = "thumbv7em-none-eabihf" },
{ regex_feature = "nrf53.*", target = "thumbv8m.main-none-eabihf" },
{ regex_feature = "nrf54.*", target = "thumbv8m.main-none-eabihf" },
{ regex_feature = "nrf91.*", target = "thumbv8m.main-none-eabihf" },
]

0 comments on commit 9216ac3

Please sign in to comment.