release: update draft notes for upcoming 3.5.0 #276
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2021-2022 TiaC Systems | |
# Copyright (c) 2021 Li-Pro.Net | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Documentation Build | |
on: | |
workflow_dispatch: # And manually on button click | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
- 'v*-branch' | |
paths: | |
- 'VERSION' | |
- 'doc/**' | |
- '**.rst' | |
- 'include/**' | |
- '.known-issues/doc/**' | |
- '**/Kconfig*' | |
- 'scripts/tools-versions-*' | |
- 'scripts/requirements-*' | |
- 'scripts/requirements.txt' | |
- 'west.yml' | |
- '.github/workflows/doc-*.yml' | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- main | |
- 'v*-branch' | |
paths: | |
- 'VERSION' | |
- 'doc/**' | |
- '**.rst' | |
- 'include/**' | |
- '.known-issues/doc/**' | |
- '**/Kconfig*' | |
- 'scripts/tools-versions-*' | |
- 'scripts/requirements-*' | |
- 'scripts/requirements.txt' | |
- 'west.yml' | |
- '.github/workflows/doc-*.yml' | |
jobs: | |
doc-build: | |
name: Build and upload documentation to artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update GitHub PATH for west | |
run: | | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
with: | |
path: workspace/bridle | |
- name: Install packages | |
run: | | |
sudo add-apt-repository -y -u ppa:tiac-systems/doxygen | |
sudo apt-get install -y ninja-build doxygen mscgen graphviz | |
- name: Restore PIP Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-doc-pip | |
- name: Install base dependencies | |
working-directory: workspace | |
run: | | |
pip3 install --upgrade pip | |
pip3 install --upgrade setuptools | |
pip3 install --upgrade --requirement bridle/scripts/requirements-base.txt | |
- name: West init and update | |
working-directory: workspace | |
run: | | |
west init -l bridle | |
west update | |
west zephyr-export | |
west bridle-export | |
- name: Install documentation dependencies | |
working-directory: workspace | |
run: | | |
pip3 install --upgrade --requirement zephyr/doc/requirements.txt | |
pip3 install --upgrade --requirement bridle/scripts/requirements-doc.txt | |
- name: Build documentation | |
working-directory: workspace | |
run: | | |
cmake -B build -GNinja bridle/doc | |
ninja -C build build-all | |
# | |
# For some unknown reason, the layout of the Sphinx Tabs extension | |
# in the docset "devicetree" is no longer rendered properly by the | |
# HTML Builder of Sphinx v6. Only cleaning it up and rebuilding it | |
# helps so far. | |
# | |
ninja -C build devicetree-clean | |
ninja -C build devicetree-html | |
- name: Archive documentation | |
working-directory: workspace/build | |
run: | | |
# synopsys: publish2 <catalog> <version> <archive> | |
# <catalog> := {development|approved} | |
# <version> := {latest|<branch>} | |
# <archive> := doc_build_<GITHUB_RUN_ID_from_doc-build>.tgz | |
mkdir doc && cd doc | |
archive="doc_build_${GITHUB_RUN_ID}.tgz" | |
tar -C ../html -zcf ${archive} . | |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
# basename will work for both branches and tags | |
branch=$(basename "${{ github.ref }}") | |
echo "publish2 preview REF-${branch} ${archive}" > "monitor_${GITHUB_RUN_ID}.txt" | |
else | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
echo "publish2 development PR-${{ github.event.number }} ${archive}" > \ | |
"monitor_${GITHUB_RUN_ID}.txt" | |
echo "${{ github.event.number }}" > pr.txt | |
else | |
# basename will work for both branches and tags | |
branch=$(basename "${{ github.ref }}") | |
if [[ "${branch}" == "main" ]]; then | |
echo "publish2 approved latest ${archive}" > "monitor_${GITHUB_RUN_ID}.txt" | |
else | |
echo "publish2 approved ${branch} ${archive}" > "monitor_${GITHUB_RUN_ID}.txt" | |
fi | |
fi | |
fi | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: doc | |
path: workspace/build/doc |