[libcamera-devel] [PATCH 3/3] ci: gitlab: Provide initial automated testing
Nicolas Dufresne
nicolas at ndufresne.ca
Mon Jan 20 20:22:52 CET 2020
Le lundi 20 janvier 2020 à 12:55 +0000, Kieran Bingham a écrit :
> Integrate compile testing and the ninja test framework.
> Any unit tests registered with the Meson Build system will automatically
> be run with 'ninja test'.
>
> 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
> +
> +build:
> + stage: build
> + before_script:
> + - apk add --no-cache gcc g++ musl-dev meson py3-yaml py3-sphinx linux-
How long does that take and how much network is required each time ? That being
said, it will be fixed if you use ci-templates, as there you can gen and save
your docker.
> headers pkgconfig eudev eudev-dev
> + script:
> + - mkdir libcamera && cd libcamera && meson .. && ninja
I'm not sure I like the idea of usign "libcamera" as a build directory. But that
does not seems a big deal. It you be cleaner to use the following invocation
though:
- meson libcamera
- ninja -C libcamera
Meson will create that directory for you (alternatively you can use the long
explicit way, meson setup <builddir>). This splits the configure and the build
step properly. It will be easier to add configure options later.
> + - 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/*
More information about the libcamera-devel
mailing list