From patchwork Mon Dec 15 09:37:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 25556 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 CFAF3C3257 for ; Mon, 15 Dec 2025 09:37:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 79F1761960; Mon, 15 Dec 2025 10:37:24 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OzsuJN4T"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F965606D5 for ; Mon, 15 Dec 2025 10:37:22 +0100 (CET) Received: from pb-laptop.local (185.221.143.114.nat.pool.zt.hu [185.221.143.114]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8FF05EB4 for ; Mon, 15 Dec 2025 10:37:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1765791437; bh=PzYvW5tEs/MQQF/Q70nnlDn2rqKwanipZNyN1gvyorI=; h=From:To:Subject:Date:From; b=OzsuJN4TeuGDXHcKkHr3TxmpnhKazc9RemiIgWg0BOvNrEcFEhYrobP6W47uN1dac 6jD3kmMuLkSUiHzMCptNuSeZ7SO8edxVQuW29oXLNSy+W/4KIq+psHjb3vwaNP2hk+ cipiQN/a5f1c3RyiwXQQkrjxwOGp69F+J9JyPoxY= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [PATCH v1] Add job to build libcamera as subproject Date: Mon, 15 Dec 2025 10:37:19 +0100 Message-ID: <20251215093719.574058-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 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" Building libcamera as a meson subproject is currently not well tested, and it is a good way to confirm that no improper assumptions are made about where and how commands run, and to test any kind of path manipulation happening during the build. So add a job that builds libcamera as a subproject. Signed-off-by: Barnabás Pőcze Acked-by: Kieran Bingham --- .gitlab-ci/build-libcamera-subproject.sh | 59 ++++++++++++++++++++++++ gitlab-ci.yml | 24 ++++++++++ 2 files changed, 83 insertions(+) create mode 100755 .gitlab-ci/build-libcamera-subproject.sh -- 2.52.0 diff --git a/.gitlab-ci/build-libcamera-subproject.sh b/.gitlab-ci/build-libcamera-subproject.sh new file mode 100755 index 0000000..ae59ac3 --- /dev/null +++ b/.gitlab-ci/build-libcamera-subproject.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: © 2025 Ideas on Board Oy +# +# Build libcamera as a meson subproject + +set -e + +source "$(dirname "$0")/lib.sh" +source "$(dirname "$0")/build-libcamera-common.sh" + +PROJECT_ROOT=$(mktemp -d ./subproject-test.XXXXXX) + +libcamera_setup_as_subproject() { + echo "Setting up libcamera build with meson options $MESON_OPTIONS" + + mkdir -p "$PROJECT_ROOT/subprojects" + ln -s ../../ "$PROJECT_ROOT/subprojects/libcamera" + + # Convert options suitable for the `default_options` parameter of `subproject()` + echo "$MESON_OPTIONS" \ + | sed 's/-D[[:space:]]*//g' \ + | tr ' ' '\n' \ + | sed "s/'/\"/g" \ + | sed "s/^\(.*\)$/\t\t'\1',/" \ + > "$PROJECT_ROOT/meson-options" + + cat > "$PROJECT_ROOT/meson.build" <> "$PROJECT_ROOT/meson.build" + cat >> "$PROJECT_ROOT/meson.build" <- + ${MESON_ALL_OPTIONS} + -D documentation=enabled + needs: + - job: container-debian:12 + artifacts: false + stage: build + script: + - $CI_PROJECT_DIR/.gitlab-ci/build-libcamera-subproject.sh + artifacts: + when: always + expire_in: 1 week + paths: + - build/meson-logs/ + - build/meson-intro/ + - build/build.ninja + build-full:debian:13: extends: - .libcamera-ci.debian:13