[libvirt] [jenkins-ci PATCH 3/3] projects: add libvirt-ocaml project

Pino Toscano posted 3 patches 6 years, 1 month ago
There is a newer version of this series
[libvirt] [jenkins-ci PATCH 3/3] projects: add libvirt-ocaml project
Posted by Pino Toscano 6 years, 1 month ago
Not built on Debian 8, as the version of OCaml is not new enough.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
---
 jobs/defaults.yaml          |  2 ++
 projects/libvirt-ocaml.yaml | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 projects/libvirt-ocaml.yaml

diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml
index 5cf84dc..13cc443 100644
--- a/jobs/defaults.yaml
+++ b/jobs/defaults.yaml
@@ -51,6 +51,8 @@
         default: https://github.com/libvirt/libvirt-go-xml.git
       libvirt-go:
         default: https://github.com/libvirt/libvirt-go.git
+      libvirt-ocaml:
+        default: https://github.com/libvirt/libvirt-ocaml.git
       libvirt-perl:
         default: https://github.com/libvirt/libvirt-perl.git
       libvirt-python:
diff --git a/projects/libvirt-ocaml.yaml b/projects/libvirt-ocaml.yaml
new file mode 100644
index 0000000..efea09b
--- /dev/null
+++ b/projects/libvirt-ocaml.yaml
@@ -0,0 +1,23 @@
+
+- project:
+    name: libvirt-ocaml
+    # Debian 8 doesn't have a recent enough OCaml
+    machines:
+      - libvirt-centos-7
+      - libvirt-debian-9
+      - libvirt-fedora-27
+      - libvirt-fedora-28
+      - libvirt-fedora-rawhide
+      - libvirt-freebsd-10
+      - libvirt-freebsd-11
+    title: Libvirt OCaml
+    archive_format: xz
+    git_url: '{git_urls[libvirt-ocaml][default]}'
+    jobs:
+      - generic-build-job:
+          parent_jobs: 'libvirt-build'
+          command: |
+            autoreconf -vfi
+            ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX
+            $MAKE
+            $MAKE opt
-- 
2.17.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 3/3] projects: add libvirt-ocaml project
Posted by Daniel P. Berrangé 6 years, 1 month ago
On Thu, Oct 11, 2018 at 11:19:54AM +0200, Pino Toscano wrote:
> Not built on Debian 8, as the version of OCaml is not new enough.
> 
> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
> ---
>  jobs/defaults.yaml          |  2 ++
>  projects/libvirt-ocaml.yaml | 23 +++++++++++++++++++++++
>  2 files changed, 25 insertions(+)
>  create mode 100644 projects/libvirt-ocaml.yaml
> 
> diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml
> index 5cf84dc..13cc443 100644
> --- a/jobs/defaults.yaml
> +++ b/jobs/defaults.yaml
> @@ -51,6 +51,8 @@
>          default: https://github.com/libvirt/libvirt-go-xml.git
>        libvirt-go:
>          default: https://github.com/libvirt/libvirt-go.git
> +      libvirt-ocaml:
> +        default: https://github.com/libvirt/libvirt-ocaml.git
>        libvirt-perl:
>          default: https://github.com/libvirt/libvirt-perl.git
>        libvirt-python:
> diff --git a/projects/libvirt-ocaml.yaml b/projects/libvirt-ocaml.yaml
> new file mode 100644
> index 0000000..efea09b
> --- /dev/null
> +++ b/projects/libvirt-ocaml.yaml
> @@ -0,0 +1,23 @@
> +
> +- project:
> +    name: libvirt-ocaml
> +    # Debian 8 doesn't have a recent enough OCaml
> +    machines:
> +      - libvirt-centos-7
> +      - libvirt-debian-9
> +      - libvirt-fedora-27
> +      - libvirt-fedora-28
> +      - libvirt-fedora-rawhide
> +      - libvirt-freebsd-10
> +      - libvirt-freebsd-11
> +    title: Libvirt OCaml
> +    archive_format: xz
> +    git_url: '{git_urls[libvirt-ocaml][default]}'
> +    jobs:
> +      - generic-build-job:
> +          parent_jobs: 'libvirt-build'
> +          command: |
> +            autoreconf -vfi
> +            ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX
> +            $MAKE
> +            $MAKE opt

Since this is using autotools, how about tweaking it to follow the normal
pattern for autotools jobs, so we can use the standard job defintion. It
looks like it would need

  - An autogen.sh script
  - Fixed VPATH build
  - Have 'make opt' be part of the default target

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 3/3] projects: add libvirt-ocaml project
Posted by Andrea Bolognani 6 years, 1 month ago
On Fri, 2018-10-19 at 10:37 +0100, Daniel P. Berrangé wrote:
> On Thu, Oct 11, 2018 at 11:19:54AM +0200, Pino Toscano wrote:
> > +    jobs:
> > +      - generic-build-job:
> > +          parent_jobs: 'libvirt-build'
> > +          command: |
> > +            autoreconf -vfi
> > +            ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX
> > +            $MAKE
> > +            $MAKE opt
> 
> Since this is using autotools, how about tweaking it to follow the normal
> pattern for autotools jobs, so we can use the standard job defintion. It
> looks like it would need
> 
>   - An autogen.sh script
>   - Fixed VPATH build
>   - Have 'make opt' be part of the default target

Yeah, that sounds like a good idea. I was also wondering whether
libvirt-ocaml has any kind of 'make check' target we could run.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 3/3] projects: add libvirt-ocaml project
Posted by Pino Toscano 6 years, 1 month ago
On Friday, 19 October 2018 11:37:17 CEST Daniel P. Berrangé wrote:
> On Thu, Oct 11, 2018 at 11:19:54AM +0200, Pino Toscano wrote:
> > Not built on Debian 8, as the version of OCaml is not new enough.
> > 
> > Signed-off-by: Pino Toscano <ptoscano@redhat.com>
> > ---
> >  jobs/defaults.yaml          |  2 ++
> >  projects/libvirt-ocaml.yaml | 23 +++++++++++++++++++++++
> >  2 files changed, 25 insertions(+)
> >  create mode 100644 projects/libvirt-ocaml.yaml
> > 
> > diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml
> > index 5cf84dc..13cc443 100644
> > --- a/jobs/defaults.yaml
> > +++ b/jobs/defaults.yaml
> > @@ -51,6 +51,8 @@
> >          default: https://github.com/libvirt/libvirt-go-xml.git
> >        libvirt-go:
> >          default: https://github.com/libvirt/libvirt-go.git
> > +      libvirt-ocaml:
> > +        default: https://github.com/libvirt/libvirt-ocaml.git
> >        libvirt-perl:
> >          default: https://github.com/libvirt/libvirt-perl.git
> >        libvirt-python:
> > diff --git a/projects/libvirt-ocaml.yaml b/projects/libvirt-ocaml.yaml
> > new file mode 100644
> > index 0000000..efea09b
> > --- /dev/null
> > +++ b/projects/libvirt-ocaml.yaml
> > @@ -0,0 +1,23 @@
> > +
> > +- project:
> > +    name: libvirt-ocaml
> > +    # Debian 8 doesn't have a recent enough OCaml
> > +    machines:
> > +      - libvirt-centos-7
> > +      - libvirt-debian-9
> > +      - libvirt-fedora-27
> > +      - libvirt-fedora-28
> > +      - libvirt-fedora-rawhide
> > +      - libvirt-freebsd-10
> > +      - libvirt-freebsd-11
> > +    title: Libvirt OCaml
> > +    archive_format: xz
> > +    git_url: '{git_urls[libvirt-ocaml][default]}'
> > +    jobs:
> > +      - generic-build-job:
> > +          parent_jobs: 'libvirt-build'
> > +          command: |
> > +            autoreconf -vfi
> > +            ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX
> > +            $MAKE
> > +            $MAKE opt
> 
> Since this is using autotools, how about tweaking it to follow the normal
> pattern for autotools jobs, so we can use the standard job defintion.

Technically, it does not use autotools, but only autoconf.

> It looks like it would need
> 
>   - An autogen.sh script

It can be added, but it would just call autoreconf.

>   - Fixed VPATH build

Slightly more complicated to fix, and not a priority for now.

>   - Have 'make opt' be part of the default target

'opt' builds the library, and the examples as native using the ocamlopt
compiler.  ocamlopt is not available on all the architecture (since it
requires an ELF generator in the OCaml compiler), and you can choose
which flavour of build you want (i.e. native/optimized, or bytecode).

-- 
Pino Toscano--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 3/3] projects: add libvirt-ocaml project
Posted by Erik Skultety 6 years, 1 month ago
On Thu, Oct 11, 2018 at 11:19:54AM +0200, Pino Toscano wrote:
> Not built on Debian 8, as the version of OCaml is not new enough.
>
> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
> ---
>  jobs/defaults.yaml          |  2 ++
>  projects/libvirt-ocaml.yaml | 23 +++++++++++++++++++++++
>  2 files changed, 25 insertions(+)
>  create mode 100644 projects/libvirt-ocaml.yaml
>
> diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml
> index 5cf84dc..13cc443 100644
> --- a/jobs/defaults.yaml
> +++ b/jobs/defaults.yaml
> @@ -51,6 +51,8 @@
>          default: https://github.com/libvirt/libvirt-go-xml.git
>        libvirt-go:
>          default: https://github.com/libvirt/libvirt-go.git
> +      libvirt-ocaml:
> +        default: https://github.com/libvirt/libvirt-ocaml.git
>        libvirt-perl:
>          default: https://github.com/libvirt/libvirt-perl.git
>        libvirt-python:
> diff --git a/projects/libvirt-ocaml.yaml b/projects/libvirt-ocaml.yaml
> new file mode 100644
> index 0000000..efea09b
> --- /dev/null
> +++ b/projects/libvirt-ocaml.yaml
> @@ -0,0 +1,23 @@
> +
> +- project:
> +    name: libvirt-ocaml
> +    # Debian 8 doesn't have a recent enough OCaml
> +    machines:
> +      - libvirt-centos-7
> +      - libvirt-debian-9
> +      - libvirt-fedora-27
> +      - libvirt-fedora-28
> +      - libvirt-fedora-rawhide
> +      - libvirt-freebsd-10
> +      - libvirt-freebsd-11
> +    title: Libvirt OCaml
> +    archive_format: xz
> +    git_url: '{git_urls[libvirt-ocaml][default]}'
> +    jobs:
> +      - generic-build-job:
> +          parent_jobs: 'libvirt-build'
> +          command: |
> +            autoreconf -vfi

I verified the patches with my builders (not the jenkins part though, but
thanks to Andrea, we keep it nice and tidy and in sync). One thing though, is
there a reason why you'd want to run autoreconf with '-v' in an automated
environment?
With that question answered:

Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list