From patchwork Wed May 6 15:54:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 26641 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4EF02C32F6 for ; Wed, 6 May 2026 15:55:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D349B63021; Wed, 6 May 2026 17:55:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="anyQplHs"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D7F6262FE8 for ; Wed, 6 May 2026 17:55:31 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:f191:8aa5:3091:a04d]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 6AC90C21; Wed, 6 May 2026 17:55:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778082928; bh=juu51sQ7yb7m/tfnqcplXBc/jiwXhY8IGpK6X7gBvfU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=anyQplHsqnVZV7O/QMVAxNnw6yaU1zBNo7VtPUvBOg1oROSr6WUPjhXWZMbianXUF KFddbLrcBh6A9+RuiCOeRWmeiOX71BEyylY+yLvvhpiMAh0YXLFGEZAH1BkFWwhHqE eLDjw3bpOOd1uj/cFkWjYrMgGP6K/mxI4W1mNLVU= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v1 1/2] Split documentation build into separate build step Date: Wed, 6 May 2026 17:54:11 +0200 Message-ID: <20260506155442.1566744-2-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260506155442.1566744-1-stefan.klug@ideasonboard.com> References: <20260506155442.1566744-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Create a separate build step that builds the docs and merges the html docs and the api docs into a single docs directory. Drop the documentation build from the build-full step as it is no longer needed there. Signed-off-by: Stefan Klug --- .gitlab-ci/build-libcamera-docs.sh | 28 ++++++++++++++++++++++++++++ gitlab-ci.yml | 29 +++++++++++++++++++++++++---- 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100755 .gitlab-ci/build-libcamera-docs.sh diff --git a/.gitlab-ci/build-libcamera-docs.sh b/.gitlab-ci/build-libcamera-docs.sh new file mode 100755 index 000000000000..a2ee7ba839d8 --- /dev/null +++ b/.gitlab-ci/build-libcamera-docs.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: © 2023 Laurent Pinchart +# +# Build libcamera + +set -e + +source "$(dirname "$0")/lib.sh" +source "$(dirname "$0")/build-libcamera-common.sh" + +libcamera_build_docs() { + echo "Building libcamera" + + meson compile -C build -j$BUILD_CONCURRENT_JOBS documentation + ( + cd build + rm -rf docs + mv Documentation/html/ docs + rm -rf docs/{internal,public}-api + mv Documentation/{internal,public}-api docs/ + ) +} + +run libcamera_install_pkgs +run libcamera_setup +run libcamera_build_docs collapsed diff --git a/gitlab-ci.yml b/gitlab-ci.yml index f887e3b6c221..468f5769eb87 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -229,10 +229,6 @@ build-full:debian:13: - ARCH: amd64 CC: gcc-14 CXX: g++-14 - MESON_OPTIONS: >- - ${MESON_ALL_OPTIONS} - -D documentation=enabled - -D doc_werror=true - ARCH: amd64 CC: clang CXX: clang++ @@ -302,6 +298,31 @@ build-package:debug: - ARCH: amd64 - ARCH: arm64 +# Build documentation. +build-docs: + extends: + - .fdo.distribution-image@debian + - .libcamera-ci.debian:13 + - .libcamera-ci.scripts + stage: build + needs: + - job: container-debian:13 + artifacts: false + script: + - $CI_PROJECT_DIR/.gitlab-ci/build-libcamera-docs.sh + artifacts: + name: libcamera-docs-${CI_COMMIT_SHA} + when: always + expire_in: 1 week + paths: + - build/docs + variables: + BUILD_TYPE: release + MESON_OPTIONS: >- + ${MESON_ALL_OPTIONS} + -D documentation=enabled + -D doc_werror=true + # ------------------------------------------------------------------------------ # Lint stage - Run checkstyle.py and check merge suitability # ------------------------------------------------------------------------------ From patchwork Wed May 6 15:54:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 26642 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E6958BE173 for ; Wed, 6 May 2026 15:55:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8499963029; Wed, 6 May 2026 17:55:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Wy0oO436"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8448762FE8 for ; Wed, 6 May 2026 17:55:34 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:f191:8aa5:3091:a04d]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 1BA2ED52; Wed, 6 May 2026 17:55:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778082931; bh=am1aCIC97fpgj/71aAhk9MF0ow43YpXhsEXtVkvu9Eo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wy0oO436kYlcmp3M1Zb1sRaWrlRK+YkjIOH11ukE7UupABMxlzMin5bhrxPX3HFSm wb/5qixDCA1dMTcCGvsnqnibjzT8u2t/RjXL0/SDc2CUgVl9iwBaSp6Sc0MzLcfBEA Pegu9EUtq75UrkRrY0/B6FYogwdpno4aAEz2zoFw= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v1 2/2] Deploy docs to docs.libcamera.org Date: Wed, 6 May 2026 17:54:12 +0200 Message-ID: <20260506155442.1566744-3-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260506155442.1566744-1-stefan.klug@ideasonboard.com> References: <20260506155442.1566744-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a build step that deploys the docs to docs.libcamera.org. This step only runs on pushes to master and on tag builds. It requires two external variables: DEPLOY_SSH_KEY_BASE64: base64 encoded private deploy key DEPLOY_KNOWN_HOSTS: Known hosts containing docs.libcamera.org Signed-off-by: Stefan Klug --- .gitlab-ci/setup-container.sh | 2 ++ gitlab-ci.yml | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh index c7ca6426c3ab..6c4b439b887b 100755 --- a/.gitlab-ci/setup-container.sh +++ b/.gitlab-ci/setup-container.sh @@ -132,6 +132,8 @@ case $FDO_DISTRIBUTION_VERSION in python3-sphinxcontrib.doxylink texlive-latex-extra ) + # Packages required to deploy the documentation + PKGS_LIBCAMERA_RUNTIME+=( openssh-client rsync ) # Tools requires by the lint jobs. PKGS_LIBCAMERA_RUNTIME+=( clang-format jq python3-autopep8 reuse shellcheck ) # libclang-rt-dev for the clang ASan runtime. diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 468f5769eb87..9bbceae38a27 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -5,6 +5,7 @@ stages: - build - lint - test + - deploy variables: FDO_UPSTREAM_REPO: 'camera/libcamera' @@ -74,7 +75,7 @@ include: .libcamera-ci.debian:13: variables: FDO_DISTRIBUTION_VERSION: 'trixie' - FDO_DISTRIBUTION_TAG: '2026-04-24.0' + FDO_DISTRIBUTION_TAG: '2026-05-06.0' .container-debian: extends: @@ -437,3 +438,35 @@ test-lc-compliance:virtual: artifacts: reports: junit: build/lc-compliance-report.xml + +# ------------------------------------------------------------------------------ +# Deploy stage - deploy docs if we are building master or a tag +# ------------------------------------------------------------------------------ + +deploy-docs: + extends: + - .fdo.distribution-image@debian + - .libcamera-ci.debian:13 + - .libcamera-ci.scripts + rules: + - if: $CI_COMMIT_BRANCH == "master" + - if: $CI_COMMIT_TAG + environment: deploy + stage: deploy + needs: + - job: build-docs + script: + - | + mkdir -p ~/.ssh + chmod 700 ~/.ssh + echo "${DEPLOY_SSH_KEY_BASE64}" | base64 --decode > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + echo "${DEPLOY_KNOWN_HOSTS}" > ~/.ssh/known_hosts + + - | + rsync -rlz --delete --chmod=Do=rx,Fo=r \ + --exclude .doctrees \ + --exclude .buildinfo \ + --exclude objects.inv \ + build/docs/ \ + deploy@docs.libcamera.org:/$CI_COMMIT_REF_NAME