ci: doc: add action-zephyr-setup
Setup a fully working Zephyr workspace so that documentation steps that require e.g. building Zephyr apps have the ability to do so. The "turbo" builds running on pull requests get a minimal setup, with no toolchain being installed. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
b514241d21
commit
b6922c83a8
1 changed files with 11 additions and 12 deletions
23
.github/workflows/doc-build.yml
vendored
23
.github/workflows/doc-build.yml
vendored
|
@ -84,6 +84,7 @@ jobs:
|
|||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
path: zephyr
|
||||
|
||||
- name: Rebase
|
||||
if: github.event_name == 'pull_request'
|
||||
|
@ -91,6 +92,7 @@ jobs:
|
|||
env:
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
PR_HEAD: ${{ github.event.pull_request.head.sha }}
|
||||
working-directory: zephyr
|
||||
run: |
|
||||
git config --global user.email "actions@zephyrproject.org"
|
||||
git config --global user.name "Github Actions"
|
||||
|
@ -100,25 +102,21 @@ jobs:
|
|||
git clean -f -d
|
||||
git log --graph --oneline HEAD...${PR_HEAD}
|
||||
|
||||
- name: cache-pip
|
||||
uses: actions/cache@v4
|
||||
- name: Setup Zephyr project
|
||||
uses: zephyrproject-rtos/action-zephyr-setup@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: pip-${{ hashFiles('doc/requirements.txt') }}
|
||||
app-path: zephyr
|
||||
toolchains: 'all'
|
||||
|
||||
- name: install-pip
|
||||
working-directory: zephyr
|
||||
run: |
|
||||
pip install -r doc/requirements.txt
|
||||
pip install west==${WEST_VERSION}
|
||||
pip install cmake==${CMAKE_VERSION}
|
||||
pip install coverxygen
|
||||
|
||||
- name: west setup
|
||||
run: |
|
||||
west init -l .
|
||||
|
||||
- name: build-docs
|
||||
shell: bash
|
||||
working-directory: zephyr
|
||||
run: |
|
||||
if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then
|
||||
DOC_TAG="release"
|
||||
|
@ -144,6 +142,7 @@ jobs:
|
|||
genhtml --no-function-coverage --no-branch-coverage new.info -o coverage-report
|
||||
|
||||
- name: compress-docs
|
||||
working-directory: zephyr
|
||||
run: |
|
||||
tar --use-compress-program="xz -T0" -cf html-output.tar.xz --exclude html/_sources --exclude html/doxygen/xml --directory=doc/_build html
|
||||
tar --use-compress-program="xz -T0" -cf api-output.tar.xz --directory=doc/_build html/doxygen/html
|
||||
|
@ -153,13 +152,13 @@ jobs:
|
|||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: html-output
|
||||
path: html-output.tar.xz
|
||||
path: zephyr/html-output.tar.xz
|
||||
|
||||
- name: upload-api-coverage
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: api-coverage
|
||||
path: api-coverage.tar.xz
|
||||
path: zephyr/api-coverage.tar.xz
|
||||
|
||||
- name: process-pr
|
||||
if: github.event_name == 'pull_request'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue