[libcamera-ci,RFC,v3,3/4] Add `build-package:debug` job
diff mbox series

Message ID 20241217153153.140417-3-barnabas.pocze@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-ci,RFC,v3,1/4] Enable `UDMABUF` in the kernel
Related show

Commit Message

Barnabás Pőcze Dec. 17, 2024, 3:31 p.m. UTC
Convert `build-package:arm64` into a `parallel:matrix` job that
compiles libcamera for amd64 and arm64 with debugging additions
(ASAN, UBSAN, STL debugging) and then publishes the resulting
package as an artifact for other jobs to use.

Note the `force_fallback_for=gtest` option, which is needed because
the googletest library, a dependency of `lc-compliance`, uses STL
types in its API, and `cpp_debugstl=true` changes the ABI of these
types, so it has to be compiled with the same options from source.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---

Changes in v3:
  * extend `build-package:arm64` instead of creating a new job

---
 gitlab-ci.yml | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

--
2.47.1

Comments

Laurent Pinchart Dec. 17, 2024, 3:54 p.m. UTC | #1
Hi Barnabás,

Thank you for the patch.

On Tue, Dec 17, 2024 at 04:31:52PM +0100, Barnabás Pőcze wrote:
> Convert `build-package:arm64` into a `parallel:matrix` job that
> compiles libcamera for amd64 and arm64 with debugging additions
> (ASAN, UBSAN, STL debugging) and then publishes the resulting
> package as an artifact for other jobs to use.
> 
> Note the `force_fallback_for=gtest` option, which is needed because
> the googletest library, a dependency of `lc-compliance`, uses STL
> types in its API, and `cpp_debugstl=true` changes the ABI of these
> types, so it has to be compiled with the same options from source.
> 
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> 
> Changes in v3:
>   * extend `build-package:arm64` instead of creating a new job
> 
> ---
>  gitlab-ci.yml | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/gitlab-ci.yml b/gitlab-ci.yml
> index f679d6e..205c6ff 100644
> --- a/gitlab-ci.yml
> +++ b/gitlab-ci.yml
> @@ -248,7 +248,7 @@ build-history:
>  # real hardware. Enable only the options needed by the tests.
>  #
> 
> -build-package:arm64:
> +build-package:debug:
>    extends:
>      - .fdo.distribution-image@debian
>      - .libcamera-ci.debian:12
> @@ -261,27 +261,28 @@ build-package:arm64:
>      - $CI_PROJECT_DIR/.gitlab-ci/build-libcamera.sh
>      - $CI_PROJECT_DIR/.gitlab-ci/package-libcamera.sh
>    artifacts:
> -    name: libcamera-arm64-${CI_COMMIT_SHA}
> +    name: libcamera-debug-${ARCH}-${CI_COMMIT_SHA}
>      when: always
>      expire_in: 1 week
>      paths:
>        - build/meson-logs/
>        - libcamera-${CI_COMMIT_SHA}.tar.xz
>    variables:
> -    ARCH: arm64
>      BUILD_TYPE: debug
>      MESON_OPTIONS: >-
> -      -D cam=disabled
> -      -D documentation=disabled
> -      -D gstreamer=disabled
> -      -D lc-compliance=enabled
> +      -D b_sanitize=address,undefined
> +      -D cpp_debugstl=true
> +      -D force_fallback_for=['gtest']
>        -D pipelines=['auto']
> -      -D pycamera=disabled
> -      -D qcam=disabled
> +      -D auto_features=disabled
> +      -D lc-compliance=enabled
>        -D test=false
>        -D tracing=enabled
> -      -D udev=disabled
>        -D v4l2=false
> +  parallel:
> +    matrix:
> +      - ARCH: amd64
> +      - ARCH: arm64
> 
>  #
>  # Build and package libcamera for Chrome OS, for the purpose of running tests

Patch
diff mbox series

diff --git a/gitlab-ci.yml b/gitlab-ci.yml
index f679d6e..205c6ff 100644
--- a/gitlab-ci.yml
+++ b/gitlab-ci.yml
@@ -248,7 +248,7 @@  build-history:
 # real hardware. Enable only the options needed by the tests.
 #

-build-package:arm64:
+build-package:debug:
   extends:
     - .fdo.distribution-image@debian
     - .libcamera-ci.debian:12
@@ -261,27 +261,28 @@  build-package:arm64:
     - $CI_PROJECT_DIR/.gitlab-ci/build-libcamera.sh
     - $CI_PROJECT_DIR/.gitlab-ci/package-libcamera.sh
   artifacts:
-    name: libcamera-arm64-${CI_COMMIT_SHA}
+    name: libcamera-debug-${ARCH}-${CI_COMMIT_SHA}
     when: always
     expire_in: 1 week
     paths:
       - build/meson-logs/
       - libcamera-${CI_COMMIT_SHA}.tar.xz
   variables:
-    ARCH: arm64
     BUILD_TYPE: debug
     MESON_OPTIONS: >-
-      -D cam=disabled
-      -D documentation=disabled
-      -D gstreamer=disabled
-      -D lc-compliance=enabled
+      -D b_sanitize=address,undefined
+      -D cpp_debugstl=true
+      -D force_fallback_for=['gtest']
       -D pipelines=['auto']
-      -D pycamera=disabled
-      -D qcam=disabled
+      -D auto_features=disabled
+      -D lc-compliance=enabled
       -D test=false
       -D tracing=enabled
-      -D udev=disabled
       -D v4l2=false
+  parallel:
+    matrix:
+      - ARCH: amd64
+      - ARCH: arm64

 #
 # Build and package libcamera for Chrome OS, for the purpose of running tests