[libvirt] [jenkins-ci PATCH 1/7] jobs: add a template for Meson

Fabiano Fidêncio fidencio at redhat.com
Tue Aug 20 20:07:42 UTC 2019


Add a template for projects using the Meson framework.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 jenkins/jobs/defaults.yaml |   3 +
 jenkins/jobs/meson.yaml    | 174 +++++++++++++++++++++++++++++++++++++
 2 files changed, 177 insertions(+)
 create mode 100644 jenkins/jobs/meson.yaml

diff --git a/jenkins/jobs/defaults.yaml b/jenkins/jobs/defaults.yaml
index 050c7b5..af78714 100644
--- a/jenkins/jobs/defaults.yaml
+++ b/jenkins/jobs/defaults.yaml
@@ -21,6 +21,7 @@
     global_env: ''
     local_env: ''
     autogen_args: ''
+    meson_args: ''
     command: ''
     command_pre_build: ''
     strip_buildrequires: |
@@ -33,11 +34,13 @@
       export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig"
       export PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig"
     mingw32_autogen_args: --host=i686-w64-mingw32
+    mingw32_meson_args: --cross-file="/usr/share/mingw/toolchain-mingw32.meson"
     mingw64_local_env: |
       export VIRT_PREFIX="$VIRT_PREFIX/x86_64-w64-mingw32/sys-root/mingw"
       export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig"
       export PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig"
     mingw64_autogen_args: --host=x86_64-w64-mingw32
+    mingw64_meson_args: --cross-file="/usr/share/mingw/toolchain-mingw64.meson"
     git_urls:
       libosinfo:
         default: https://gitlab.com/libosinfo/libosinfo.git
diff --git a/jenkins/jobs/meson.yaml b/jenkins/jobs/meson.yaml
new file mode 100644
index 0000000..5c0be01
--- /dev/null
+++ b/jenkins/jobs/meson.yaml
@@ -0,0 +1,174 @@
+---
+- job-template:
+    id: meson-build-job
+    name: '{name}-build'
+    project-type: matrix
+    description: '{title} Build'
+    workspace: '{name}'
+    child-workspace: '.'
+    block-downstream: true
+    block-upstream: true
+    wrappers:
+      - timeout:
+          abort: true
+          type: absolute
+          timeout: 90
+          write-description: 'Aborted build after 90 minutes'
+    properties:
+      - build-discarder:
+          days-to-keep: 30
+          num-to-keep: 1000
+    scm:
+      - git:
+          url: '{git_url}'
+          branches:
+            - origin/master
+          clean:
+            after: true
+          skip-tag: true
+          wipe-workspace: false
+    triggers:
+      - reverse:
+          jobs: '{obj:parent_jobs}'
+      - pollscm:
+          cron: "H/20 * * * *"
+    axes:
+      - axis:
+          name: systems
+          type: slave
+          values: '{obj:machines}'
+    builders:
+      - shell: |
+          {global_env}
+          {local_env}
+          rm -rf build
+          meson build --prefix=$VIRT_PREFIX {meson_args}
+          ninja -C build
+          ninja -C build install
+    publishers:
+      - email:
+          recipients: '{obj:spam}'
+          notify-every-unstable-build: false
+          send-to-individuals: false
+
+- job-template:
+    id: meson-syntax-check-job
+    name: '{name}-syntax-check'
+    project-type: matrix
+    description: '{title} Syntax Check'
+    workspace: '{name}'
+    child-workspace: '.'
+    block-downstream: true
+    block-upstream: true
+    wrappers:
+      - timeout:
+          abort: true
+          type: absolute
+          timeout: 90
+          write-description: 'Aborted build after 90 minutes'
+    properties:
+      - build-discarder:
+          days-to-keep: 30
+          num-to-keep: 1000
+    triggers:
+      - reverse:
+          jobs: '{obj:parent_jobs}'
+    axes:
+      - axis:
+          name: systems
+          type: slave
+          values: '{obj:machines}'
+    builders:
+      - shell: |
+          {global_env}
+          {local_env}
+          ninja -C build syntax-check
+    publishers:
+      - email:
+          recipients: '{obj:spam}'
+          notify-every-unstable-build: false
+          send-to-individuals: false
+
+- job-template:
+    id: meson-test-job
+    name: '{name}-check'
+    project-type: matrix
+    description: '{title} Check'
+    workspace: '{name}'
+    child-workspace: '.'
+    block-downstream: true
+    block-upstream: true
+    wrappers:
+      - timeout:
+          abort: true
+          type: absolute
+          timeout: 90
+          write-description: 'Aborted build after 90 minutes'
+    properties:
+      - build-discarder:
+          days-to-keep: 30
+          num-to-keep: 1000
+    triggers:
+      - reverse:
+          jobs: '{obj:parent_jobs}'
+    axes:
+      - axis:
+          name: systems
+          type: slave
+          values: '{obj:machines}'
+    builders:
+      - shell: |
+          {global_env}
+          {local_env}
+          if ! ninja -C build test
+          then
+              cat build/meson-logs/testlog.txt || true
+              exit 1
+          fi
+    publishers:
+      - email:
+          recipients: '{obj:spam}'
+          notify-every-unstable-build: false
+          send-to-individuals: false
+
+- job-template:
+    id: meson-rpm-job
+    name: '{name}-rpm'
+    project-type: matrix
+    description: '{title} RPM'
+    workspace: '{name}'
+    child-workspace: '.'
+    block-downstream: true
+    block-upstream: true
+    wrappers:
+      - timeout:
+          abort: true
+          type: absolute
+          timeout: 90
+          write-description: 'Aborted build after 90 minutes'
+    properties:
+      - build-discarder:
+          days-to-keep: 30
+          num-to-keep: 1000
+    triggers:
+      - reverse:
+          jobs: '{obj:parent_jobs}'
+    axes:
+      - axis:
+          name: systems
+          type: slave
+          values: '{obj:machines}'
+    builders:
+      - shell: |
+          {global_env}
+          {local_env}
+          cd build
+          {strip_buildrequires}
+          rm -f meson-dist/*.tar.{archive_format}
+          ninja dist
+          rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta meson-dist/*.tar.{archive_format}
+    publishers:
+      - email:
+          recipients: '{obj:spam}'
+          notify-every-unstable-build: false
+          send-to-individuals: false
-- 
2.21.0




More information about the libvir-list mailing list