[jenkins-ci PATCH 2/7] guests: Add Meson jobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These tasks mirror the Jenkins's Meson jobs contained in the top-level
jobs/ directory.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 guests/playbooks/build/jobs/defaults.yml          |  3 +++
 guests/playbooks/build/jobs/meson-build-job.yml   | 14 ++++++++++++++
 guests/playbooks/build/jobs/meson-check-job.yml   | 15 +++++++++++++++
 guests/playbooks/build/jobs/meson-rpm-job.yml     | 15 +++++++++++++++
 .../build/jobs/meson-syntax-check-job.yml         | 11 +++++++++++
 5 files changed, 58 insertions(+)
 create mode 100644 guests/playbooks/build/jobs/meson-build-job.yml
 create mode 100644 guests/playbooks/build/jobs/meson-check-job.yml
 create mode 100644 guests/playbooks/build/jobs/meson-rpm-job.yml
 create mode 100644 guests/playbooks/build/jobs/meson-syntax-check-job.yml

diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml
index 311f980..33dde45 100644
--- a/guests/playbooks/build/jobs/defaults.yml
+++ b/guests/playbooks/build/jobs/defaults.yml
@@ -22,6 +22,7 @@ mingw_machines:
 global_env: ''
 local_env: ''
 autogen_args: ''
+meson_args: ''
 command: ''
 command_pre_build: ''
 strip_buildrequires: |
@@ -34,11 +35,13 @@ mingw32_local_env: |
   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/guests/playbooks/build/jobs/meson-build-job.yml b/guests/playbooks/build/jobs/meson-build-job.yml
new file mode 100644
index 0000000..aab8256
--- /dev/null
+++ b/guests/playbooks/build/jobs/meson-build-job.yml
@@ -0,0 +1,14 @@
+---
+- name: '{{ name }}-build'
+  shell: |
+    set -e
+    cd {{ name }}
+
+    {{ global_env }}
+    {{ local_env }}
+    rm -rf build
+    meson build --prefix=$VIRT_PREFIX {{ meson_args }}
+    ninja -C build
+    ninja -C build install
+  when:
+    - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/meson-check-job.yml b/guests/playbooks/build/jobs/meson-check-job.yml
new file mode 100644
index 0000000..d4a361d
--- /dev/null
+++ b/guests/playbooks/build/jobs/meson-check-job.yml
@@ -0,0 +1,15 @@
+---
+- name: '{{ name }}-check'
+  shell: |
+    set -e
+    cd {{ name }}
+
+    {{ global_env }}
+    {{ local_env }}
+    if ! ninja -C build test
+    then
+        cat build/meson-logs/testlog.txt || true
+        exit 1
+    fi
+  when:
+    - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/meson-rpm-job.yml b/guests/playbooks/build/jobs/meson-rpm-job.yml
new file mode 100644
index 0000000..f517214
--- /dev/null
+++ b/guests/playbooks/build/jobs/meson-rpm-job.yml
@@ -0,0 +1,15 @@
+---
+- name: '{{ name }}-rpm'
+  shell: |
+    set -e
+    cd {{ name }}
+
+    {{ 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 }}
+  when:
+    - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/meson-syntax-check-job.yml b/guests/playbooks/build/jobs/meson-syntax-check-job.yml
new file mode 100644
index 0000000..5609bb4
--- /dev/null
+++ b/guests/playbooks/build/jobs/meson-syntax-check-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-syntax-check'
+  shell: |
+    set -e
+    cd {{ name }}
+
+    {{ global_env }}
+    {{ local_env }}
+    ninja -C build syntax-check
+  when:
+    - inventory_hostname in machines
-- 
2.21.0

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux