Skip to content

Support for Zephyr kernel objects #46

Support for Zephyr kernel objects

Support for Zephyr kernel objects #46

Workflow file for this run

name: Generate and Preview Rust Docs
on:
pull_request:
branches:
- main # Only generate docs for PRs targeting main
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: zephyr-rust-lang
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
app-path: zephyr-rust-lang
manifest-file-name: ci-manifest.yml
toolchains: arm-zephyr-eabi:riscv64-zephyr-elf
- name: Install Rust Targets
shell: bash
run: |
rustup target add thumbv7em-none-eabi
rustup target add thumbv7m-none-eabi
- name: Setup cargo build
working-directory: zephyr-rust-lang
run: |
# Must do full build
west build -b nrf52840dk/nrf52840 docgen
- name: Build Rust documentation
working-directory: zephyr-rust-lang/docgen
run: |
rm -rf .cargo
mkdir .cargo
cd .cargo
ln -s ../../build/rust/sample-cargo-config.toml config.toml
cd ..
cargo doc
cd ..
mkdir docout
mv build/rust/target/thumbv7em-none-eabi/doc docout/nostd
cp docs/top-index.html docout/index.html
- name: Build build documentation
working-directory: zephyr-rust-lang
run: |
cd zephyr-build
cargo doc
mv target/doc ../docout/std
- name: compress-docs
working-directory: zephyr-rust-lang
run: |
tar --use-compress-program="xz -T0" -cf rust-lang-html.tar.xz docout
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: rust-lang-html
path: zephyr-rust-lang/rust-lang-html.tar.xz
deploy:
needs: generate-docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Some deploy debugging
run: |
echo "This shows deployment"
echo "Key: ${AWS_BUILDS_ZEPHYR_PR_ACCESS_KEY_ID}"