On Tue, Mar 30, 2021 at 06:12:06PM +0200, Martin Kletzander wrote:
This is a first try for adding a CI to libnbd. It uses the libvirt-ci to get as much coverage as possible with the ease of use provided by that repository. Not all the data are available there at the time of posting this patch, so if anyone wants to recreate the Containerfiles and variable files (for cirrus CI) my temporary branch of libvirt-ci called nbd_prep:https://gitlab.com/nertpinx/libvirt-ci/-/tree/nbd_prep The result of this branch CI run is available here: https://gitlab.com/nertpinx/libnbd/-/pipelines As you can see there are errors. I went down a rabbit hole of trying to figure out one of them, but ended up not being sure what the preferred way of fixing that particular issue would be. So instead of trying myself and raising various questions every single day I am posting this here as handling it myself would take too much time and I would be bothering other people throughout days and days going forward. If there are any questions related to how the CI is running, how it works, how to replicate CI builds locally or how to change anything, then I am more than happy to help. Actually recreating the builds locally (at least for Linux distributions and setups) is pretty straightforward. Choose a file from ci/containers which represents the desired setup, for our example let's pick fedora rawhide, and build your container and tag it, e.g. using podman (or feel free to substitute "podman" with "docker"): podman build ci/containers/fedora-33.Dockerfile -t libnbd-fedora-rawhide That will get you a container tagged `libnbd-fedora-rawhide` that you can execute the tests on. You can then run whatever you want inside that container with the current repository passed through like this: podman run -it --rm -v .:/repo -w /repo libnbd-fedora-rawhide bash which will bind-mount the current directory onto /repo inside the container and also use that path as the working directory (just so you do not have to `cd /repo` before any commands. I prefer running bash, but of course you can just run the build script used in the CI. I have put all the commands into one file for simplicity, so that you can simply specifically `ci/build_script.sh`. So simply executing that script will give you the results and you can experiment right inside that environment to figure out what is needed. At the same time you can easily modify any files inside that repository on your host, just like you are used to, so that you can use your editor and other setups that work for you. Last few things to note: - You should make sure that build files do not interfere between the host and the container, if you want to replicate a clean build you need to either use VPATH or just clean everything. - No tests include running make distcheck as that seems a bit more broken and could be fixed after more pressing issues are dealt with, just so the output does not interfere in the meantime. Let me know what you think, and have a nice day.
Polite ping. Any thoughts? Anything you'd like to change? Thanks, Martin
signature.asc
Description: PGP signature
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs