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:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
path: zephyr
|
||||||
|
|
||||||
- name: Rebase
|
- name: Rebase
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
@ -91,6 +92,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref }}
|
BASE_REF: ${{ github.base_ref }}
|
||||||
PR_HEAD: ${{ github.event.pull_request.head.sha }}
|
PR_HEAD: ${{ github.event.pull_request.head.sha }}
|
||||||
|
working-directory: zephyr
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "actions@zephyrproject.org"
|
git config --global user.email "actions@zephyrproject.org"
|
||||||
git config --global user.name "Github Actions"
|
git config --global user.name "Github Actions"
|
||||||
|
@ -100,25 +102,21 @@ jobs:
|
||||||
git clean -f -d
|
git clean -f -d
|
||||||
git log --graph --oneline HEAD...${PR_HEAD}
|
git log --graph --oneline HEAD...${PR_HEAD}
|
||||||
|
|
||||||
- name: cache-pip
|
- name: Setup Zephyr project
|
||||||
uses: actions/cache@v4
|
uses: zephyrproject-rtos/action-zephyr-setup@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
app-path: zephyr
|
||||||
key: pip-${{ hashFiles('doc/requirements.txt') }}
|
toolchains: 'all'
|
||||||
|
|
||||||
- name: install-pip
|
- name: install-pip
|
||||||
|
working-directory: zephyr
|
||||||
run: |
|
run: |
|
||||||
pip install -r doc/requirements.txt
|
pip install -r doc/requirements.txt
|
||||||
pip install west==${WEST_VERSION}
|
|
||||||
pip install cmake==${CMAKE_VERSION}
|
|
||||||
pip install coverxygen
|
pip install coverxygen
|
||||||
|
|
||||||
- name: west setup
|
|
||||||
run: |
|
|
||||||
west init -l .
|
|
||||||
|
|
||||||
- name: build-docs
|
- name: build-docs
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: zephyr
|
||||||
run: |
|
run: |
|
||||||
if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then
|
if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then
|
||||||
DOC_TAG="release"
|
DOC_TAG="release"
|
||||||
|
@ -144,6 +142,7 @@ jobs:
|
||||||
genhtml --no-function-coverage --no-branch-coverage new.info -o coverage-report
|
genhtml --no-function-coverage --no-branch-coverage new.info -o coverage-report
|
||||||
|
|
||||||
- name: compress-docs
|
- name: compress-docs
|
||||||
|
working-directory: zephyr
|
||||||
run: |
|
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 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
|
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
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: html-output
|
name: html-output
|
||||||
path: html-output.tar.xz
|
path: zephyr/html-output.tar.xz
|
||||||
|
|
||||||
- name: upload-api-coverage
|
- name: upload-api-coverage
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: api-coverage
|
name: api-coverage
|
||||||
path: api-coverage.tar.xz
|
path: zephyr/api-coverage.tar.xz
|
||||||
|
|
||||||
- name: process-pr
|
- name: process-pr
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue