Commit Graph

112 Commits

Author SHA1 Message Date
Benjamin Cabé dc2c13bebd doc: ci: Build documentation on board documentation changes
Adds glob expression triggering CI for *all* changes in boards'
documentation, not just those matching the "*.rst" pattern since there
can also be images being changed without any other change on RST files.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-08 11:40:58 -06:00
Benjamin Cabé d8997b4dc3 ci: github: git clean after rebase
After rebasing the PR on main, the local copy of the repository may
still contain untracked directories and files (for example, the commits
from the pull request are "git mv"ing files out of directories that are
then left empty). Add a git clean so that we run CI in conditions
that are as close as possible to a fresh clone.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-19 15:13:49 +02:00
Benjamin Cabé c394234305 ci: doc: build the documentation using GitHub-hosted runners
There is no reason to use our custom runners for docs build
as it's equally fast on GH default runners and allows doc CI
to be expedited more quickly even when our build farm is
busy.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-17 09:05:22 -05:00
Benjamin Cabé 346031d060 ci: github: bump tj-actions/changed-files version
Bump tj-actions/changed-files to latest (v45).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:50:10 -04:00
Benjamin Cabé 178e940a45 ci: doc: build documentation in CI when files are deleted
Use correct output for the changed-files action so that docs
is built in CI when relevant files are *deleted* too, not just
added/renamed/modified

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:50:10 -04:00
Gerard Marull-Paretas e8a3304ba4 doc: doxygen: upgrade to 1.12.0
Update to latest Doxygen version.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-15 11:57:14 -04:00
Benjamin Cabé 704000eb58 ci: doc-build: compress HTML docs more efficiently
Compressing doc build to upload it to AWS S3 is talking several minutes.
Use -T0 to run xz in parallel mode to speed up the process.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:33:07 +01:00
Benjamin Cabé 9ee3bf221d doc: pdf: add ImageMagick converter extension
Our documentation uses image formats such as WebP that are not supported
by LaTeX. This commit enables Sphinx's sphinx.ext.imageconverter
extension, and updates the documentation to indicate ImageMagick is
required to build docs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 14:58:16 +03:00
Stephanos Ioannidis c74445d694 ci: doc-build: Reduce parallel job count to 14
This commit reduces the parallel job count for building the documentation
from the default value of 16 (i.e. `-j auto` aka. the vCPU count) to 14
because the total available RAM in the runners is 32GiB and each
sphinx-build process may use more than 2GiB of RAM, which can lead to
out-of-memory conditions.

Note that the HTML doc build process was parallelised prior to this change
in spite of the lack of `-j auto` in the CI workflow because the default
`SPHINXOPTS` includes `-j auto` and only `SPHINXOPTS_EXTRA` was specified
-- this commit explicitly adds the `SPHINXOPTS` for it with the default
value specified in doc/CMakeLists.txt to make the job count configurable
while ensuring the previous behaviour is preserved.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-06-04 22:37:44 -04:00
Maciej Perkowski a9565f7a96 docs: Add pytest files to a scope triggering doc-build workflow
Those files are used with autoclass to use their docstrings
in docs.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-03 16:08:50 -04:00
Fin Maaß 300de90ab6 ci: revert: fix broken microsoft repo
This reverts commit 3ba4c98a1d.

A repo from microsoft was not available, that lead to ci
actions failing. This hat been fixed, so this workaround
is no longer needed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-26 16:19:58 +02:00
Benjamin Cabé 2df4cce71e ci: github: bump tj-actions/changed-files version
Bump tj-actions/changed-files to v44.
As of v42, input file patterns that end with a / now match all sub-files
within the directory without requiring to specify the globstar pattern.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-24 14:57:32 -04:00
Fin Maaß 3ba4c98a1d ci: fix broken microsoft repo
temporary fix broken microsoft repo

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-24 20:01:08 +09:00
Benjamin Cabé 107b335cce ci: doc-build: increase timeout for doc build jobs
With the introduction of the new runners, the time it takes to build the
documentation in CI has slowed down to the point that the job often times
out.

Applied a conservative 2x factor to the timeouts that were in place.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-03-19 17:43:33 +00:00
Stephanos Ioannidis 2819c3526a ci: doc-build: Use zephyr-runner v2
This commit updates the doc-build workflow to use the new zephyr-runner v2
CI runner deployment.

It also installs additional system packages that are not available by
default in the zephyr-runner v2.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-12 08:54:42 -04:00
Anas Nashif 72a17b6d88 ci: fix doc workflow on schedule
Build phase was skipped, we were checking for file changes which will
not have any results on a scheduled event.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-04 12:42:23 +09:00
Anas Nashif a9f77a5126 ci: doc: always report status
Generate status that can be used for enforcing branch checks even if
some jobs get skipped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-02-24 16:10:02 -05:00
Jordan Yates 0dcb0518be ci: update Github actions versions
Update Github actions to their latest versions to fix the following
warnings on runs:
```
Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/checkout@v3, actions/cache@v3,
actions/upload-artifact@v3. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
```

`actions/checkout` and `actions/cache` are straight Node version
upgrades, `actions/upload-artifact` and `actions/download-artifact` have
breaking changes, but don't appear to affect our usage.
https://github.com/actions/upload-artifact

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-01-30 18:51:12 -05:00
Fabio Baltieri 35e9104de7 ci: doc-build: add the container owner workaround step
Seems like the PDF build hit the "detected dubious ownership in
repository" issue that has already been worked around in other workflow.
Add that step here as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-09 18:54:26 +00:00
Fabio Baltieri 62b0153249 ci: doc-build: only rebase on pull requests
Skip the rebase step if it's not a pull request. Schedule and push runs
have no base ref to rebase against anyway, currently the step is failing
and being skipped.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-09 18:54:26 +00:00
Anas Nashif bad87f1684 ci: publish api docs and coverage as well
Also API coverage reports to both PRs and main documentation site.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-26 10:12:36 -04:00
Benjamin Cabé b1c207524b ci: github: Only build docs for zephyrproject-rtos GH org
As documentation is now built using one of our self-hosted runners,
have the GitHub action only run for the upstream repo, not for potential
forks.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-22 19:08:58 -04:00
Martí Bolívar e2b2dde1c8 .github: doc-build: build with west 1.2
This is just released and we want the docstrings from there.

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2023-10-21 13:14:57 +02:00
Fabio Baltieri 799c8ddf9f ci: doc-build: add a rebase step
Add a rebase step after checkout for the documentation build CI run.

This is in line with what pretty much all other workfloww already do,
and means that if a PR is opened on a broken tree and the breakage get
fixed, the PR run just have to be retried for the test to pass and we
don't have to ask the authors to rebase and lose any pending approvals.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-23 08:27:05 -04:00
Gerard Marull-Paretas 7f9215da0e doc: move requirements to doc/
Zephyr scripts do not require documentation dependencies, so let's
move them from scripts/ to doc/.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-07-12 09:13:49 -04:00
Gerard Marull-Paretas 2c89bf5798 doc: add cmake SPHINXOPTS_EXTRA option
Add a new CMake option to append options to SPHINXOPTS. This allows us
to easily extend default SPHINXOPTS. This patch also restores the "-j
auto" option in CI (now that we use a custom runner).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-07-12 09:13:49 -04:00
Gerard Marull-Paretas a211469734 ci: doc-build: use zephyr-runner-linux-x64-4xlarge
This should allow us to observe faster build times when using
parallelization.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-07-12 09:13:49 -04:00
Michael Jones 343f60c631 doc: Add '--keep-going' flag to sphinx-build
So that we see all the potential errors in CI and not just the first
and can assess how much work there is to do.

This was introduced for debuggin but gmarull has suggested keeping it
in.

Signed-off-by: Michael Jones <m.pricejones@gmail.com>
2023-07-03 10:05:52 +00:00
Anas Nashif ae114855f9 ci: doc-build: use customer runner
Apparently the PDF build needs more resources, otherwise we end up
aborting the build too early.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-20 16:49:07 +02:00
Anas Nashif 294e0ddee7 ci: doc-build: set shell as bash
Specify the shell variant being used in the workflow step.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-20 16:49:07 +02:00
Anas Nashif e3f0d402f9 ci: doc: upload build log for debugging
When PDF build fails, we want to see what cmaused the failure, so upload
the log for later analysis.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-20 16:49:07 +02:00
Alberto Escolar Piedras 1c165296e8 Revert "ci: doc-build: Pull 'bsim' west project"
This reverts commit 00130b72ce.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-08 11:49:17 -04:00
Stephanos Ioannidis 00130b72ce ci: doc-build: Pull 'bsim' west project
This commit updates the documentation build workflow to pull in the
'bsim' west project (with its submanifest) so that the build process
does not fail due to a manifest import failure.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-20 15:47:25 +02:00
Stephanos Ioannidis b1e4116d40 ci: Use Ubuntu 22.04
This commit updates the CI workflows to use the GitHub Ubuntu 22.04
virtual environment for running jobs.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2023-04-14 02:39:47 +09:00
Gerard Marull-Paretas e6d9ff2948 ci: doc-build: fix PDF build
New LaTeX Docker image (Debian based) uses Python 3.11. On Debian
systems, this version does not allow to install packages to the system
environment using pip.  Use a virtual environment instead.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-02-23 18:52:52 -05:00
Martí Bolívar 0de8c6bf29 .github: doc-build: move to west 1.0.0
The release notes are in and west==1.0.0 is installable via pypi.
Move the doc build over to it and fix a typo while we are here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-02-21 19:39:50 +09:00
Martí Bolívar e150ad6258 .github: build docs with west v1.0.a1
The alpha for this release is up on pypi; start using it so we can
test out the doc build in CI.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-02-20 13:00:47 -08:00
Gerard Marull-Paretas a003b725bb ci: doc-build: change Doxygen download URL
It looks like versions >= 1.9.2 have disappeared from the Sourceforge
website. Since they use GH releases since 1.9.6, the version we use,
let's just update download URL.

Ref. https://github.com/doxygen/doxygen/issues/9801

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-01-19 17:13:36 +01:00
Gerard Marull-Paretas 036e4f2902 ci: doc-build: use Doxygen 1.9.6
Use the latest release of Doxygen, 1.9.6.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-01-10 10:27:54 +01:00
Stephanos Ioannidis e11d82ba31 ci: doc-build: Disable PDF documentation build for pull requests
This commit disables the PDF documentation build for pull request CI
runs because the HTML documentation build already validates the
documentation changes and the PDF build takes significantly longer than
the HTML build.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-12-14 01:13:45 +09:00
Stephanos Ioannidis 264afa8ae7 ci: doc-build: Increase PDF documentation build timeout
This commit increases the timeout for PDF documentation build job from
45 minutes to 60 minutes because it can occasionally take more than 45
minutes on the GitHub Actions hosted runners.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-12-14 01:13:45 +09:00
Gerard Marull-Paretas 8c1aa8aa61 ci: doc: use Ubuntu 22.04
Use the latest Ubuntu image. There's no special reason for this change
other than staying up-to-date.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-19 14:17:26 +09:00
Gerard Marull-Paretas 61f252fe33 ci: doc-build: remove unnecessary libclang dependency
Doxygen 1.9.4 no longer needs libclang.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-19 14:17:26 +09:00
Stephanos Ioannidis dd6e1b9f5a ci: Use actions/cache@v3
This commit updates the CI workflows to use the latest "cache" action
v3, which is based on Node.js 16.

Note that Node.js 12-based actions are now deprecated by GitHub and may
stop working in the near future.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-10-14 12:03:07 +09:00
Stephanos Ioannidis d4c6f002d8 ci: Use actions/upload-artifact@v3
This commit updates the CI workflows to use the latest
"upload-artifact" action v3, which is based on Node.js 16.

Note that Node.js 12-based actions are now deprecated by GitHub and may
stop working in the near future.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-10-14 12:03:07 +09:00
Stephanos Ioannidis 216b0e6778 ci: Use actions/checkout@v3
This commit updates the CI workflows to use the latest "checkout"
action v3, which is based on Node.js 16.

Note that Node.js 12-based actions are now deprecated by GitHub and may
stop working in the near future.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-10-14 12:03:07 +09:00
Martí Bolívar 788aeca277 .github: update to west 0.14.0
This is up on PyPI; use it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-08-29 16:54:53 +02:00
Stephanos Ioannidis 25a22883c2 ci: doc-build: Use upload-artifact action v3
This commit updates the documentation build workflow to use a specific
upload-artifact action version, v3, instead of the latest master branch
in order to prevent any potential breakages due to the newer commits.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-23 03:10:29 +09:00
Stephanos Ioannidis ebe8b4c776 ci: doc: Use Ubuntu 20.04 runner image
This commit updates the documentation build and publish workflows to
use a specific runner image version, ubuntu-20.04, instead of the
latest version in order to prevent any potential breakages due to the
'latest' version change by GitHub.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-23 03:10:29 +09:00
Fabio Baltieri a5dfd6bd64 ci: doc-build: bump timeout up to 45m
Give documentation a bit more time to build, seems like we are hitting
the current 30 minutes limit.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-20 09:41:32 -05:00