[{"id":35156,"web_url":"https://patchwork.libcamera.org/comment/35156/","msgid":"<20250726205100.GF30386@pendragon.ideasonboard.com>","date":"2025-07-26T20:51:00","subject":"Re: [RFC PATCH] documentation: Split documentation build task","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Jul 25, 2025 at 06:51:04PM +0100, Kieran Bingham wrote:\n> Update the CI to split out the documentation task and include a\n> link-check call.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n> \n> I can't currently get a clean run on the link-check so ... this isn't\n> mergeable yet - but posting for RFC already so that in the event we\n> could clean up the linkcheck we could include it to prevent link\n> regressions creeping in.\n> \n> I do also like the idea of splitting out the doxygen build anyway so\n> that documentation failures aren't shown simply in a GCC 12 build...\n\nThe documentation is actually built with every compiler, which seems to\nbe a waste of CPU cycles. I think we should indeed split it, but I'd go\na step further an only build it in a dedicated job.\n\nAnd now that I wrote that, I've seen a comment on the #freedesktop IRC\nchannel asking for fewer larger jobs, not more smaller jobs, as spawning\na job on a runner takes a significant amount of resources. Why is\neverything always complicated ? :-)\n\nI'll submit a patch to disable documentation building everywhere but in\nthe gcc 12 job to save CPU cycles. Hopefully that shouldn't be\ncontroversial, and we can then merge this patch (possibly in an adapted\nform) on top after discussions.\n\n>  .gitlab-ci/build-documentation.sh | 28 ++++++++++++++++++++++++++++\n>  gitlab-ci.yml                     | 20 ++++++++++++++++++--\n>  2 files changed, 46 insertions(+), 2 deletions(-)\n>  create mode 100755 .gitlab-ci/build-documentation.sh\n> \n> diff --git a/.gitlab-ci/build-documentation.sh b/.gitlab-ci/build-documentation.sh\n> new file mode 100755\n> index 000000000000..33484bd48c0a\n> --- /dev/null\n> +++ b/.gitlab-ci/build-documentation.sh\n> @@ -0,0 +1,28 @@\n> +#!/bin/bash\n> +\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +# SPDX-FileCopyrightText: © 2025 Kieran Bingham <kieran.bingham@ideasonboard.com>\n> +#\n> +# Build libcamera Documentation only and perform a link check\n> +\n> +set -e\n> +\n> +source \"$(dirname \"$0\")/lib.sh\"\n> +source \"$(dirname \"$0\")/build-libcamera-common.sh\"\n> +\n> +libcamera_documentation() {\n> +\techo \"Building libcamera documentation\"\n> +\n> +\tmeson compile -C build documentation\n> +}\n> +\n> +libcamera_documentation_linkcheck() {\n> +\techo \"Documentation link-check\"\n> +\n> +\tmeson compile -C build documentation-linkcheck\n> +}\n> +\n> +run libcamera_install_pkgs collapsed\n> +run libcamera_setup collapsed\n> +run libcamera_documentation\n> +run libcamera_documentation_linkcheck\n> diff --git a/gitlab-ci.yml b/gitlab-ci.yml\n> index ceb0fd215b89..777456529ac3 100644\n> --- a/gitlab-ci.yml\n> +++ b/gitlab-ci.yml\n> @@ -170,7 +170,6 @@ build-full:debian:12:\n>    variables:\n>      MESON_OPTIONS: >-\n>        ${MESON_ALL_OPTIONS}\n> -      -D doc_werror=true\n>    parallel:\n>      matrix:\n>        - ARCH: amd64\n> @@ -312,9 +311,26 @@ build-package:cros:\n>        dotenv: env\n>  \n>  # ------------------------------------------------------------------------------\n> -# Lint stage - Run checkstyle.py and check merge suitability\n> +# Lint stage - Run checkstyle.py and check merge suitability and validate Docs\n>  # ------------------------------------------------------------------------------\n>  \n> +documentation:\n> +  extends:\n> +    - .fdo.distribution-image@debian\n> +    - .libcamera-ci.scripts\n> +    - .libcamera-ci.debian:12\n> +  stage: lint\n> +  needs:\n> +    - job: container-debian:12\n> +      artifacts: false\n> +  script:\n> +    - $CI_PROJECT_DIR/.gitlab-ci/build-documentation.sh\n> +  variables:\n> +    BUILD_TYPE: release\n> +    MESON_OPTIONS: >-\n> +      ${MESON_ALL_OPTIONS}\n> +      -D doc_werror=true\n> +\n>  lint:\n>    extends:\n>      - .fdo.distribution-image@debian","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 94969BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 26 Jul 2025 20:51:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C6A6969114;\n\tSat, 26 Jul 2025 22:51:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5613A690A5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Jul 2025 22:51:06 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 33A9978C;\n\tSat, 26 Jul 2025 22:50:25 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"A27fMCTE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753563025;\n\tbh=vd7vFMfnuKANUuwAjvXhDlz1mcP33gquhS5e5TXKvbE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=A27fMCTEpKsod2gCmhfwqxzWJ2z5BH+8CeI7/XpcPOFMix9cc8P4qLfI1O0jYNUAE\n\tuol4yeQmFk+OlXC8DN3laErca3aheCsctCtDRctYak6tZL+Yjzp/tnJW4FEN+TRc4e\n\tTCWD2mEcv2ylbS54tl6HvVHiHxUQbjWorsBZKM0A=","Date":"Sat, 26 Jul 2025 23:51:00 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Subject":"Re: [RFC PATCH] documentation: Split documentation build task","Message-ID":"<20250726205100.GF30386@pendragon.ideasonboard.com>","References":"<20250725175107.2301710-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20250725175107.2301710-1-kieran.bingham@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]