Commit Graph

248 Commits

Author SHA1 Message Date
Erik Skultety
ed1a0a63ce ci: build.sh: Always assume -Dsystem=true
There's no harm in always building in system mode, i.e. setting the
right paths.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-08-11 15:09:04 +02:00
Erik Skultety
b845c2fd3b ci: build.sh: Use 'meson setup' explicitly
Even though 'setup' is assumed when no other command is given, we're
being explicit in our GitLab recipes, so do the same for the local
build.sh script too.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-08-11 15:09:04 +02:00
Erik Skultety
d95b6e993f ci: build.sh: Drop the commentary about CI_BUILD_SCRIPT
build.sh is not the place where this should be mentioned as the
official entrypoint for this script locally is ci/helper which can
download the right image from our upstream CI registry. Since the idea
is to ultimately drop the usage of a Makefile for the local executions,
this patch doesn't provide an alternative place for the comment in
question as the functionality is going to be altered substantially in
the future.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-08-11 15:09:04 +02:00
Erik Skultety
6d46808a0e ci: integration: Drop the Fedora 35 check
We're already past Fedora 35 and so all new fedora's default to
modular daemon setup.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2023-08-11 14:55:56 +02:00
Michal Privoznik
51ae80d6a7 ci: Switch to OpenSUSE Leap 15.5
OpenSUSE Leap was released recently (2023-06-07). Refresh our CI
with latest lcitool which brings this minor update.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-07-25 11:47:56 +02:00
Han Han
28141adfdc scripts: Fix the flake8 syntax-check failures
Fix the syntax-check failures (which can be seen after
python3-flake8-import-order package is installed) with the help
of isort[1]:

289/316 libvirt:syntax-check / flake8   FAIL   5.24s   exit status 2

[1]: https://pycqa.github.io/isort/

Signed-off-by: Han Han <hhan@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-06-29 11:51:27 +02:00
Daniel P. Berrangé
25420111ba ci: fix Cirrus CI jobs run from merge requests
Preferentially fetch from $CI_MERGE_REQUEST_REF_PATH if it is
defined, otherwise use $CI_COMMIT_REF_NAME

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-06-05 11:39:12 +01:00
Erik Skultety
adf67ca987 ci: refresh with latest lcitool manifest
Main lcitool changes:
- added Alpine 3.17 and 3.18 targets
- dropped Alpine 3.15 and 3.16

Note that we're not actively testing all Alpine targets due to CI
quota, so only 3.17 is used as a replacement for 3.15 in this patch.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2023-06-05 10:51:18 +02:00
Erik Skultety
dcb9ee99f3 ci: integration: Flip QEMU upstream integration tests to Fedora 38
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2023-05-10 16:41:21 +02:00
Erik Skultety
2bb0efa367 ci: Flip mingw jobs from Fedora 37 to Fedora 38
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2023-05-10 16:41:21 +02:00
Erik Skultety
ffd2a97070 ci: Drop Fedora 36 target
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2023-05-10 16:41:21 +02:00
Erik Skultety
96ffb7318e ci: Add Fedora 38 target
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2023-05-10 16:41:21 +02:00
Michal Privoznik
a3cc0e9ceb ci: Regenerate files
This removes minor version number from OpenSUSE LEAP target names
and on CentOS Stream 9 installs flake8 from repositories, instead
of pip.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2023-04-27 15:02:42 +02:00
Andrea Bolognani
5be133b39e ci: Regenerate files
This unbreaks the various $CROSS-$NAME-local-env jobs.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-04-04 10:51:53 +02:00
Martin Kletzander
e9adb4dcb1 Revert "ci: Disable optimization on macos-12"
This reverts commit 1f76b5365e.

There were two issues with this commit.  First is the missing propagation
of CFLAGS into the build environment and second is the fact that this is
not enough to disable the check for -fsemantic-interposition.  The
proper fix would require setting MESON_OPTS or similar and also add the
propagation of such variable into the cirrus builds etc., but at this
point I burned so much time on this trivial piece of rubbish that I
think it's easier to just wait for macos to gain a newer clang =D

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-03-24 17:15:15 +01:00
Martin Kletzander
1f76b5365e ci: Disable optimization on macos-12
This enables our CI to run tests on on macos-12 after commit
7944700b40.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2023-03-24 13:15:32 +01:00
Martin Kletzander
1b0c07db75 ci: Refresh CI files with current lcitool
This updates to FreeBSD 12.4 which has clang that supports
-fsemantic-interposition, plus of course updates the system.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-03-24 12:59:51 +01:00
Peter Krempa
7334972c9a ci: Drop EOL OpenSUSE 15.3
The '15.3' version is EOL now:

  https://get.opensuse.org/leap/15.3/

Also switch the 'codestyle' job to the appropriate container image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-03-23 16:24:56 +01:00
Peter Krempa
0cbd00525d ci: Add OpenSUSE leap 15.4 job
As a precursor to dropping the EOL OpenSUSE 15.3 job add first the
definitions for the replacement version.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-03-23 16:13:01 +01:00
Peter Krempa
20e063c2fd ci: Regenerate gitlab CI config with latest lcitool
The latest 'lcitool' now generates the CI config in a way which
allows users to kick off pipelines with the upstream projects container
environment rather than building a throwaway updated environment each
time and enables a gitlab feature to time individual script lines.
Pull it into libvirt.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2023-03-01 14:42:19 +01:00
Peter Krempa
5d59142122 ci: Regenerate gitlab config with latest lcitool
The 'cirrus-run' and 'check-dco' containers are now exported as
':latest' instead of ':master'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-03-01 11:57:37 +01:00
Erik Skultety
917749314c ci: Test with latest Avocado again
Test with the following fix:
https://github.com/avocado-framework/avocado/pull/5567/commits

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-02-08 16:36:10 +01:00
Erik Skultety
ad00beffa6 ci: integration: Set an expiration on logs artifacts
The default expiry time is 30 days. Since the RPM artifacts coming from
the previous pipeline stages are set to expire in 1 day we can set the
failed integration job log artifacts to the same value. The sentiment
here is that if an integration job legitimately failed (i.e. not with
an infrastructure failure) unless it was fixed in the meantime it will
fail the next day with the scheduled pipeline again, meaning, that even
if the older log artifacts are removed, they'll be immediately
replaced with fresh ones.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-12 09:57:52 +01:00
Erik Skultety
3ebfeaa206 ci: Refresh and add Fedora 37 target
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-01-09 14:53:34 +01:00
Erik Skultety
c9a65eb8a6 ci: integration: Lock the Avocado version to 98.0 for now
Avocado 99.0 causes the TCK test suite to fail with the nwfilter tests
(which is another Bash framework underneath). Until the culprit is
identified and fixed in Avocado, let's lock the version to 98.0 which
worked with the test suite just fine.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-11-16 10:14:20 +01:00
Daniel P. Berrangé
539e851c5d ci: regenerate with lcitool manifest
Two notable changes:

 * the macOS platform has switched from x86_64 to aarch64
 * if a new pipeline starts before a previous one finishes,
   jobs marked 'interruptible: true' will be auto-cancelled

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-11-14 17:22:31 +00:00
Erik Skultety
5597ae9609 ci: integration: Bundle only failed Avocado test results
Latest versions of Avocado create 'by-status' symlink shortcuts to test
results, IOW:

 # this is the main test results directory containing all data
 $ ls <path>/avocado/job-results/latest/test-results/
 01-scripts_networks_050-transient-lifecycle.t
 02-scripts_networks_051-transient-autostart.t
 ...
 22-scripts_networks_400-guest-bandwidth.t
 by_status/

 # list only the failed tests
 $ ls -l <path>/avocado/job-results/latest/test-results/by-status/FAIL
 19-scripts_networks_360-guest-network-vepa.t ->
    <path>/avocado/job-results/latest/test-results/19-scripts_networks_360-guest-network-vepa.t

Therefore, let's bundle only the failed ones, it's going to make the
log artifacts more obvious when looking for libvirt errors.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:44 +02:00
Erik Skultety
2b26127397 ci: integration: Create the avocado logs artifact dir conditionally
Don't create an avocado directory in the resulting log artifacts
if Avocado didn't even run (e.g. libvirt errored out on service
restart).

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:44 +02:00
Erik Skultety
5243dcea65 ci: integration: Use 'set +e' in the log collecting job
All 'script' blocks are defined as 'set -e' and so a single failed
return value means we won't collect some of the logs. Because of
the nature of the original job's failure some of the log sources
might not be available, but that's fine, however, the gitlab
after_script job cannot finish prematurely.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:44 +02:00
Erik Skultety
124eb56342 ci: integration: Only create a coredump log when a core exists
It could be quite confusing looking at the job log artifacts and having
an empty coredump log in there, IOW it doesn't really give much
confidence that the reporting mechanism actually works.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:44 +02:00
Erik Skultety
1df36ecbd0 ci: integration: Fix the test on avocado directory existence
It's a directory, so -d should be used with 'test'.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:43 +02:00
Erik Skultety
ddc4898080 ci: integration: Add an extra level of quoting for augeas set options
Both log filters and log outputs expect string values, however, augeas
apparently requires an extra level of quotes apart from the ones we
pass via shell (see comment [1]) to work properly, otherwise augeas
ignores the value and returns 0.
Without this fix we don't set libvirt's log level to debug, we don't
set logging to a file and hence we don't include the logs in CI
artifacts in case the test suite fails.

[1] https://github.com/hercules-team/augeas/issues/301#issuecomment-143699880

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:43 +02:00
Erik Skultety
045e642d29 ci: integration: Add virtnetworkd to the list of restarted services
It was missing from the set. While at it, order the daemon set
alphabetically.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:43 +02:00
Peter Krempa
bb0bec4827 ci: Install python RPMs from libvirt/libvirt-python CI artifacts
After addition of the new libvirt-client-qemu sub-package which is using
python bindings (thus creating a circular dependency between the libvirt
and libvirt-python projects) the integration jobs fail with:

  Error:
   Problem: conflicting requests
    - nothing provides python3-libvirt >= 8.9.0-1.el9 needed by libvirt-client-qemu-8.9.0-1.el9.x86_64

The libvirt-python project now provides the RPMs in artifacts:
 https://gitlab.com/libvirt/libvirt-python/-/merge_requests/96

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-10-13 12:23:01 +02:00
Daniel P. Berrangé
491d918502 ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push

   git push <remote> -o ci.variable=RUN_PIPELINE=1

This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.

The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.

With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-10-06 05:15:54 -04:00
Erik Skultety
0327bbb767 ci: integration: Update the perl CI job names
libvirt-derived repos recently changed the way how and when CI
containers are built and for that a different naming scheme was adopted
to differentiate between the 2. Update the integration pipeline config
to reflect this change.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-06 10:47:56 +02:00
Pavel Hrdina
84d9279aef ci: refresh generated files
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-10-03 12:05:20 +02:00
Daniel P. Berrangé
c83c6e4e7a ci: refresh with latest lcitool manifest
This updates the FreeBSD 13 image to 13.1 which should fix the
symbol lookup errors seen in CI recently.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-14 10:54:15 -04:00
Peter Krempa
5598ce16d5 ci: Regenerate dockerfiles after 'sheepdog' removal
After support for the sheepdog storage driver backend was removed we
don't need to install it any longer in the containers.

Regenerate the dockerfiles after:
https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/314

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2022-09-01 16:29:15 +02:00
Andrea Bolognani
915d566f42 ci: Switch from macOS 11 to macOS 12
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-08-24 11:07:19 +02:00
Andrea Bolognani
3173cdf43b ci: Refresh generated files
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-08-24 11:07:06 +02:00
Peter Krempa
2700787d0a ci: Drop Debian 10
Debian 10 reaches EOL in August of 2022.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-11 14:38:31 +02:00
Peter Krempa
41c92a1325 ci: Move active Debian-10 jobs to Debian-11
Debian 10 will reach EOL in august of 2022 and thus libvirt will no
longer target it. Move CI jobs over to Debian-11.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-11 14:38:30 +02:00
Peter Krempa
619d825a18 ci: Move builds from alpine-314 to alpine-315
'lcitool' dropped alpine-314

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2022-07-25 10:50:08 +02:00
Peter Krempa
7cd8f51b97 ci: Regenerate files with new lcitool
Apart from other changes this fixes failures with builds on FreeBSD.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-07-11 15:53:54 +02:00
Andrea Bolognani
ae2dabe5ed ci: Move upstream QEMU integration test to Fedora 36
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-06-09 14:41:44 +02:00
Andrea Bolognani
4a4b7f2854 ci: Add Fedora 36 to integration tests
This requires publishing the RPMs as artifacts from the regular
build job.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-06-09 14:41:40 +02:00
Erik Skultety
d1e3247675 ci: integration: Set 'safe.directory' when installing QEMU from git
Since a fix for CVE-2022-24765 was released every git command is now
checked against the context repo in which it's supposed to run
resulting in a fatal error if the repo is owned by other user than the
one running the git command.
This means that in order to be able to do 'sudo make install', we have
to set the 'safe.directory' for the root user. This is because QEMU
runs 'git submodule update' automatically on 'make install'.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2022-06-09 13:38:17 +02:00
Erik Skultety
3b943f0c43 ci: integration: SELinux relabel the QEMU we installed from git
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2022-06-09 13:38:13 +02:00
Daniel P. Berrangé
8b8fd1bc67 ci: eliminate many cross arch CI builds
We currently build cross-arch containers for all three Debian
releases (10, 11, Sid), and do libvirt builds covering each
arch. This is overkill in terms of the number of problems it
identifies. The most important aspect of cross arch builds is
to find problems with 32-bit builds and problems with big
endian builds.

With this in mind the cross arch jobs are altered as follows

 - Debian 10
     - build the containers by default
     - build armv7 (32-bit) & s390x (big endian)
     - other arch builds manual

 - Debian 11 / Sid
     - container builds all optional
     - arch builds all optional

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-31 17:23:04 +02:00
Daniel P. Berrangé
bb9abaed26 ci: move Ubuntu GCC santizers build to 20.04
We currently build on Ubuntu 22.04 twice, for GCC and CLang
with santizers turned on. Moving the GCC santizers build
to 20.04 lets us cull one of the 22.04 jobs

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-31 17:23:04 +02:00
Daniel P. Berrangé
b7565a2145 ci: disable native builds on certain distros
Currently we do native builds on all distros that are covered
by the support matrix. This reduces that such that we mostly
only run builds on the newest (ie bleeding edge non-released)
version and the oldest version. The effect is that cut out
builds on the newest release version. This is acceptable,
because that version is sandwiched between two versions we
do still test, so unlikely to have failures not already
identified by other jobs.

This has the effect of disabling:

  - AlmaLinux 8 GCC - still has a CLang build
    and CentOS 8 Stream also gives coverage

  - Debian 11 - still has a Debian 10 and Sid
    build

  - Alpine 3.15 - still has a Alpine 3.14 and Edge
    build

Ideally Fedora 35 would be disabled too, but we rely on that
for the integration tests.

The Ubuntu jobs will be handled in the next patch.

The containers are still built since this is cheap-ish.

The build jobs can also be triggered manually if desired.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-31 17:23:04 +02:00
Daniel P. Berrangé
1c5bc460d3 ci: refresh with lcitool manifest
This refreshes the containers bringing in new behaviour when
builds/containers are disabled.

Instead of deleting the job entirely, the job still exists
but is set to be a manual job. It won't affect the pipeline
result, but can be triggered by the developer if they wish
to test a specific scenario.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-31 17:23:04 +02:00
Martin Kletzander
76802e5dc6 ci: Refresh generated files
Notable changes:

* 'lcitool manifest' now generates absolute include paths

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2022-05-27 13:35:33 +02:00
Andrea Bolognani
be1d39f6bd ci: Don't mark any Fedora 36 job as optional
It's a stable distro, so we expect all jobs to succeed.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-26 16:41:23 +02:00
Andrea Bolognani
1234ea1d38 ci: Move MinGW jobs to Fedora 36
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-26 16:41:20 +02:00
Andrea Bolognani
a6f7ed6e72 ci: Add Fedora 36
The target is intentionally not added to the integration tests
at this time, because the corresponding VM template is not yet
available on the runner. A later patch will take care of that.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-26 16:41:19 +02:00
Andrea Bolognani
c000499c4f ci: Refresh generated files
Notable changes:

  * 'lcitool manifest' now generates GitLab CI rules spread
    across a bunch of files;

  * container images are built less frequently for the main
    repository.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-26 16:41:17 +02:00
Andrea Bolognani
af89e4b8f8 ci: Drop Fedora 34
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-05-26 16:41:14 +02:00
Andrea Bolognani
40d78e47e5 docs: Update URL for MinGW
The MinGW-w64 project has effectively replaced the original
MinGW project, and distributions such as Fedora have been shipping
packages based on the former for years now.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-24 12:19:15 +02:00
Andrea Bolognani
7f403bc251 syntax-check: Enforce sc_prohibit_backslash_alignment everywhere
Basically all files in the repository are already passing the
check, except for syntax-check.mk itself. Fix that, and stop
limiting the files on which the test is performed.

These changes have been generated by running

  $ sed -Ei 's/[ '$'\t'']+\\$/ \\/g' $(git grep -El '[ '$'\t'']+\\$')

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-24 11:09:51 +02:00
Erik Skultety
b7fa48081d ci: Add a Fedora integration test job utilizing upstream QEMU
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Erik Skultety
80ffd571a8 ci: Add a new integration job template for the upstream QEMU scenario
YAML anchors don't work with Shell condition structures, so we cannot
simply reference the QEMU build template YAML anchor conditionally and
hence have everything as part of a single job template.
Instead, we have to "subclass" the .integration_tests template and
inject the QEMU building bits explicitly.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Erik Skultety
de98075faf ci: Introduce a template for upstream QEMU build
This was heavily inspired by QEMU's upstream CI buildtest-template.yml.
Rather than referencing QEMU's template directly (which GitLab can do),
this patch resorts to hard-coding the build steps ourselves, solely
because there's no guarantee QEMU will keep either the template file
name or the template name from which the build steps were mostly copied
from.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Erik Skultety
72887b8f59 ci: Break off the integration_tests template into more templates
There's quite a lot happening in the .integration_tests template
already even without adding upstream QEMU build into the mix.
Let's break the template into more pieces which can then reference
in the .integration_tests template when putting all the pieces back
together using YAML anchors.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Erik Skultety
387932771a ci: Separate the integration job template to a separate file
Future patches will do more code extraction from the existing template
using YAML anchors so it'd be better that the templates would live
separately from job definitions.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Andrea Bolognani
0495f841ee ci: Move clang/asan/ubsan jobs to Ubuntu 22.04
Using an updated toolchain means we're likely to catch more
issues.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-06 15:25:18 +02:00
Andrea Bolognani
29ee8c1d2e ci: Add Ubuntu 22.04
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-06 11:13:12 +02:00
Andrea Bolognani
1e25a480f5 ci: Refresh configuration
Notable changes:

  * use the most recent point release for FreeBSD 12.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-06 11:13:05 +02:00
Daniel P. Berrangé
d4d5cebdf1 ci: print stack traces on macOS if any tests fail
Mostly the tests should fail cleanly, but sometimes the test might crash
or abort. In this case we'll need to know the stack traces in order to
debug the problem. Fortunately on the Cirrus CI macOS instances, the
crash reporting service is active and saving crashes to the directory
~/Library/Logs/DiagnosticReports/

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-04-28 13:36:34 +01:00
Daniel P. Berrangé
a45e4b42fe ci: print test suite logs on failure for Cirrus jobs
We don't have access to the 'testlog.txt' file, so we need meson to
print the failures for any broken tests directly.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-04-26 13:17:52 +01:00
Andrea Bolognani
08e097f605 ci: Drop openSUSE Leap 15.2
It has reached end of life in January 2022.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:34 +02:00
Andrea Bolognani
e33366fc19 ci: Add openSUSE Leap 15.3
It was released in June 2021.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:31 +02:00
Andrea Bolognani
67e3589120 ci: Add Alpine Linux 3.15
It was released in November 2021.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:30 +02:00
Andrea Bolognani
de390af9d7 ci: Simplify Alpine Linux 3.14 definition
Using the extended definition format is only necessary when
the defaults are not good enough, but that's not the case here.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:28 +02:00
Andrea Bolognani
766a2d2e52 ci: Drop FreeBSD -CURRENT
All build jobs for the target are explicitly disabled, so
there's no point in keeping the variables file around and we
can simply not mention it in the manifest at all.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:11 +02:00
Erik Skultety
cc05c4e5e4 ci: Refresh Dockerfiles and vars files
In this batch:
- dnsmasq is dropped as build dependency
- Alpine Edge rpcgen package collision fix

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-07 16:19:42 +02:00
Peter Krempa
e3ab7900da ci: Drop Ubuntu 1804
As of April 23 2022, Ubuntu 20.04 will be out for two years, which per
our platform support policy means we no longer have to support
Ubuntu 18.04.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-04-04 12:26:58 +02:00
Tim Wiederhake
49156f8070 Fix spelling
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2022-03-31 11:31:08 +02:00
Erik Skultety
69bcfa5e3b ci: integration: Rename all Avocado standard stream log files to *.log
By default, stdout/stderr Avocado test log files do not have any file
extension which confuses GitLab's web UI to mangle the MIME type for
these and so the browser will never offer the option to open such file
from in a text editor rather than dowloading it.
Since GitLab sets a proper MIME for .txt and .log file extensions,
rename all Avocado log files without an extension to *.log . This pairs
nicely with the coredumpctl info file which we already name as
'coredumpctl.txt' because of this.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-03-22 17:11:51 +01:00
Erik Skultety
908cb26b5d ci: integration: Collect stack traces with coredumpctl
Some Red Hat-like distros have cores limited with a soft limit of 0
which means that neither a stack trace nor a core file will be
available. Since we want the stack trace we need to set the core limit
with systemd globally to unlimited/infinity.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-03-22 12:07:37 +01:00
Erik Skultety
e23353756e ci: Define the integration job tag dynamically via a variable
Custom runners are private to a project, so naturally forks cannot run
any workloads on these. The integration test suite which requires
access to our custom runner is naturally disabled on forks and can be
enabled by setting LIBVIRT_CI_INTEGRATION=1.
The problem is that the current integration jobs definitions have tags
statically defined as 'redhat-vm-host'. If users are going to supply
their own private runners for their forks, they can define whatever
tags they want with it and so unless they add 'redhat-vm-host' to their
own runner's tags, the pipeline won't run.
To solve this, define the integration job tag using a variable. The
repo config will use the value defined in the job for the variable
while users can override the value easily on a project/pipeline level
thanks to GitLab's CI variable precedence [1].

[1] https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-03-22 12:07:37 +01:00
Daniel P. Berrangé
e4327557a4 ci: only run integration tests if $LIBVIRT_CI_INTEGRATION=1 is set
Right now the jobs have no rules so they will always be created in
a pipeline. If the user's fork has no runner configured, then the
jobs will never be able to execute and the pipeline will not finish.

Even on upstream, there might be times the runner has to be taken
offline for maint work, or unexpectedly fail. We need a quick way
to disable the integration tests if we decide we don't want to
have pipelines queued until the runner comes back online.

Both these problems can be addressed by requiring a environment
variable to be set

   LIBVIRT_CI_INTEGRATION=1

This can be done in the GitLab repo CI settings for permanent
enablement. Alternatively it can be set for individual
scheduled jobs, or using a push option

  git push -o ci.variable=LIBVIRT_CI_INTEGRATION=1

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-03-18 16:45:57 +01:00
Daniel P. Berrangé
b1c7cca6c9 ci: rename integration test template
Although we split out jobs across many files, the template / job
namespace is global, so we should use something more specific
than '.tests' as the template name.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-03-18 16:45:35 +01:00
Erik Skultety
1dfd308843 gitlab-ci: Introduce new 'integration_tests' pipeline stage
This stage will download build artifacts from both the libvirt and
libvirt-perl (multi-project CI) builds, install all them on the custom
runners and configures libvirt debug logging on the runners prior to
executing the actual test suite. In case of a failure, libvirt and
Avocado logs will be saved and published as pipeline artifacts.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-03-17 16:09:53 +01:00
Erik Skultety
4ee1c4cc6d ci: manifest: Publish RPMs as artifacts on CentOS Stream and Fedoras
We're already building libvirt in the containers already, if we publish
the build in form of, say, RPMs, later stages of the pipeline can
consume the RPMs instead of re-building libvirt from scratch.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-03-17 16:09:53 +01:00
Erik Skultety
68141bd148 ci: gitlab: Refresh gitlab.yml
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-03-17 16:09:53 +01:00
Martin Kletzander
92e00c7afc Add Alpine builds to CI
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-03-17 11:28:40 +01:00
Peter Krempa
79c4e4e5c4 ci: Regenerate with new lcitool
Regenerate with lcitool as of:

  commit f83b916d5efa4bd33fbf4b7ea41bf6d535cc63fb
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   Fri Feb 11 09:39:30 2022 +0000

      mappings: skip multipath-tools for cross Debian

      This package is both a mix of library files, headers and native
      binaries so cannot be installed in a cross environment. For now skip
      it for cross targets.

      See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005323

      Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-02-15 09:33:03 +01:00
Peter Krempa
9a21d6848c ci: Move from 'centos-8' to 'almalinux-8'
Upstream lcitool suggests that as a solution to 'centos-8' being
removed.

Move also the website and other jobs to depend on
'x86_64-almalinux-8-container'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-02-15 09:33:03 +01:00
Peter Krempa
eca3daaf5b ci: Regenerate with new lcitool
Re-generate our CI infra with 'lcitool' as of:

  commit b346752e98bd12395233ebba8c9312e08212b639 (HEAD)
  Author: Erik Skultety <eskultet@redhat.com>
  Date:   Tue Feb 1 10:48:53 2022 +0100

      tests: Replace CentOS 8 with AlmaLinux 8 in test scenarios

      Switch the test target before actually dropping CentOS 8.

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

This is prior to upstream lcitool dropping 'centos-8' support to
minimize the differences.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-02-15 09:33:03 +01:00
Erik Skultety
d955cbd3a1 ci: containers: Add CentOS Stream 9 target
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-02-01 17:33:17 +01:00
Erik Skultety
7485f47082 ci: manifest: Allow RPM builds on CentOS Stream 8
The meson version provided by the package managing system satisfies our
minimum requirement.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-02-01 17:33:16 +01:00
Andrea Bolognani
4c7316b2f0 ci: Refresh configuration
Notable changes:

  * drop parted and XFS headers.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2022-01-04 18:08:28 +01:00
Andrea Bolognani
d004171806 ci: Refresh configuration
Notable changes:

  * drop libdbus and radvd;
  * add codespell.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2022-01-03 16:52:25 +01:00
Peter Krempa
019eab7240 ci: Refresh dockerfiles
Apart from some churn, the important is the removal of 'netcf-devel'
from the fedora rawhide container.

Update to state as of 174fe4999204afcae (libvirt-ci).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2021-12-22 17:24:43 +01:00
Daniel P. Berrangé
c7edcb320b ci: run a mingw64 job on stable Fedora
Both of the current mingw jobs are marked as 'allow_failure' because
they are running against Fedora rawhide which is an unstable distro.

We need at least one mingw job to be gating to more reliably detect
problems.

This introduces dockerfiles for both mingw variants on Fedora 35
and sets the mingw64 build to run on Fedora 34, and mingw32 on
Fedora rawhide.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-11-23 16:44:18 +00:00
Daniel P. Berrangé
3ca8611455 ci: refresh variables/dockerfiles with latest content
- The Cirrus CI variables are now sorted
  - The dockerfiles update commands changed for some distros
  - Meson in CentOS is now new enough to use

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-11-23 16:44:15 +00:00
Daniel P. Berrangé
4e2dcfcb82 ci: replace Fedora 33 with Fedora 35
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-11-23 16:43:57 +00:00
Daniel P. Berrangé
9ff311f105 ci: regenerate container from manifest
This removes the libnetcf-dev package from Debian Sid, as it is no
longer available in that distro stream.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-10-25 12:45:31 +01:00