Skip to content

Commit

Permalink
ci: publish api docs and coverage as well
Browse files Browse the repository at this point in the history
Also public api docs and coverage information.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Sep 28, 2023
1 parent 4a0e26d commit 06019b1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: install-pkgs
run: |
sudo apt-get update
sudo apt-get install -y ninja-build graphviz
sudo apt-get install -y ninja-build graphviz lcov
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
Expand All @@ -79,6 +79,7 @@ jobs:
pip3 install -r doc/requirements.txt
pip3 install west==${WEST_VERSION}
pip3 install cmake==${CMAKE_VERSION}
pip3 install coverxygen
- name: west setup
run: |
Expand All @@ -98,19 +99,36 @@ jobs:
else
DOC_TARGET="html"
fi
python3 -m coverxygen --xml-dir doc/_build/html/doxygen/xml/ --src-dir include/ --output doc-coverage.info
lcov --summary doc-coverage.info
genhtml --no-function-coverage --no-branch-coverage doc-coverage.info -o coverage-report
DOC_TAG=${DOC_TAG} SPHINXOPTS_EXTRA="-q -t publish" make -C doc ${DOC_TARGET}
- name: compress-docs
run: |
tar cfJ html-output.tar.xz --directory=doc/_build html
tar cfJ api-output.tar.xz --directory=doc/_build doxygen/html
tar cfJ api-coverage.tar.xz coverage-report
- name: upload-build
uses: actions/upload-artifact@v3
with:
name: html-output
path: html-output.tar.xz

- name: upload-api
uses: actions/upload-artifact@v3
with:
name: api-output
path: api-output.tar.xz

- name: upload-api-coverage
uses: actions/upload-artifact@v3
with:
name: api-coverage
path: api-coverage.tar.xz

- name: process-pr
if: github.event_name == 'pull_request'
run: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/doc-publish-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
- name: Uncompress HTML docs
run: |
tar xf html-output/html-output.tar.xz -C html-output
tar xf api-output/api-output.tar.xz -C api-output
tar xf api-coverage/api-coverage.tar.xz -C api-coverage
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
Expand All @@ -61,3 +63,9 @@ jobs:
aws s3 sync --quiet html-output/html \
s3://builds.zephyrproject.org/${{ github.event.repository.name }}/pr/${PR_NUM}/docs \
--delete
aws s3 sync --quiet api-output/html \
s3://builds.zephyrproject.org/${{ github.event.repository.name }}/pr/${PR_NUM}/api-docs \
--delete
aws s3 sync --quiet html-coverage/ \
s3://builds.zephyrproject.org/${{ github.event.repository.name }}/pr/${PR_NUM}/api-coverage \
--delete

0 comments on commit 06019b1

Please sign in to comment.