[libcamera-devel] [PATCH 3/3] ci: gitlab: Provide initial automated testing

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jan 20 18:08:20 CET 2020


Hi Kieran,

Thank you for the patch.

On Mon, Jan 20, 2020 at 12:55:44PM +0000, Kieran Bingham wrote:
> Integrate compile testing and the ninja test framework.
> Any unit tests registered with the Meson Build system will automatically
> be run with 'ninja test'.

I'm not sure when you mean here. The script below doesn't run tests,
does it ?

> Documentation will be built, and the resulting package will be installed
> to 'libcamera/package'
> 
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> 
> ---
> v2:
>  - CI: Add Documentation to build artifacts
>  - CI: Convert to alpine image
>  - CI: test install phase
> ---
>  .gitlab-ci.yml | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>  create mode 100644 .gitlab-ci.yml
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> new file mode 100644
> index 000000000000..5851af90e22c
> --- /dev/null
> +++ b/.gitlab-ci.yml
> @@ -0,0 +1,18 @@
> +image: alpine:edge

Any specific reason for this choice ? I suppose it's fine to start with,
and we can then extend to more distributions.

> +
> +build:
> +  stage: build
> +  before_script:
> +    - apk add --no-cache gcc g++ musl-dev meson py3-yaml py3-sphinx linux-headers pkgconfig eudev eudev-dev

Should we also depend on Qt to test compilation of qcam ?

Is there an easy way to also test compilation with clang ?

> +  script:
> +    - mkdir libcamera && cd libcamera && meson .. && ninja

How about enabling the android and V4L2 compatibility layers ?

> +    - ninja Documentation/linkcheck
> +    - DESTDIR=$PWD/package ninja install
> +  artifacts:
> +    expire_in: 6 hrs
> +    paths:
> +      - libcamera/Documentation/*
> +      - libcamera/src/libcamera/libcamera.so
> +      - libcamera/test/test_init
> +      - libcamera/meson-logs/testlog.txt
> +      - libcamera/package/*

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list