[libvirt-csharp 0/3] Enable use of GitLab CI and merge requests

This introduces support for GitLab CI, and then recommends use of merge requests for contribution. Daniel P. Berrangé (3): Update to target newer 4.0 .NET framework version gitlab: introduce CI jobs testing git master & distro libvirt gitlab: add CONTRIBUTING.rst file to indicate use of merge requests .gitlab-ci.yml | 96 +++++++++++++++++++ .gitpublish | 4 - CONTRIBUTING.rst | 28 ++++++ ci/README.rst | 14 +++ ci/libvirt-debian-9.Dockerfile | 58 +++++++++++ ci/libvirt-fedora-31.Dockerfile | 52 ++++++++++ ci/libvirt-fedora-32.Dockerfile | 61 ++++++++++++ ci/libvirt-fedora-rawhide.Dockerfile | 53 ++++++++++ ci/refresh | 27 ++++++ .../virConnectOpen/virConnectOpen.csproj | 4 +- .../virConnectOpenAuth.csproj | 4 +- .../virConnectSetErrorFunc.csproj | 4 +- .../virDomainStats/virDomainStats.csproj | 57 ++++++++++- .../virEventRegisterImpl.csproj | 4 +- projects/MonoDevelop/LibvirtBindings.csproj | 6 +- projects/MonoDevelop/LibvirtBindings.sln | 6 +- 16 files changed, 454 insertions(+), 24 deletions(-) delete mode 100644 .gitpublish create mode 100644 CONTRIBUTING.rst create mode 100644 ci/README.rst create mode 100644 ci/libvirt-debian-9.Dockerfile create mode 100644 ci/libvirt-fedora-31.Dockerfile create mode 100644 ci/libvirt-fedora-32.Dockerfile create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile create mode 100755 ci/refresh -- 2.26.2

The 3.5 .NET version is no longer supported by the mono / monodevelop toolchain. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- .../virConnectOpen/virConnectOpen.csproj | 4 +- .../virConnectOpenAuth.csproj | 4 +- .../virConnectSetErrorFunc.csproj | 4 +- .../virDomainStats/virDomainStats.csproj | 57 ++++++++++++++++++- .../virEventRegisterImpl.csproj | 4 +- projects/MonoDevelop/LibvirtBindings.csproj | 6 +- projects/MonoDevelop/LibvirtBindings.sln | 6 +- 7 files changed, 65 insertions(+), 20 deletions(-) diff --git a/examples/MonoDevelop/virConnectOpen/virConnectOpen.csproj b/examples/MonoDevelop/virConnectOpen/virConnectOpen.csproj index e0bbb1b..131bbfc 100644 --- a/examples/MonoDevelop/virConnectOpen/virConnectOpen.csproj +++ b/examples/MonoDevelop/virConnectOpen/virConnectOpen.csproj @@ -1,10 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.21022</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{FFCD939E-7F9A-44D5-AEBC-84F40942E8B5}</ProjectGuid> <OutputType>WinExe</OutputType> <RootNamespace>virConnectOpen</RootNamespace> diff --git a/examples/MonoDevelop/virConnectOpenAuth/virConnectOpenAuth.csproj b/examples/MonoDevelop/virConnectOpenAuth/virConnectOpenAuth.csproj index 32b20d4..4e05439 100644 --- a/examples/MonoDevelop/virConnectOpenAuth/virConnectOpenAuth.csproj +++ b/examples/MonoDevelop/virConnectOpenAuth/virConnectOpenAuth.csproj @@ -1,10 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.21022</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{3259AE36-B12F-435E-9124-F6CAA781AD5C}</ProjectGuid> <OutputType>WinExe</OutputType> <RootNamespace>virConnectOpenAuth</RootNamespace> diff --git a/examples/MonoDevelop/virConnectSetErrorFunc/virConnectSetErrorFunc.csproj b/examples/MonoDevelop/virConnectSetErrorFunc/virConnectSetErrorFunc.csproj index 2a77393..f5e6254 100644 --- a/examples/MonoDevelop/virConnectSetErrorFunc/virConnectSetErrorFunc.csproj +++ b/examples/MonoDevelop/virConnectSetErrorFunc/virConnectSetErrorFunc.csproj @@ -1,10 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.21022</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{243DD685-9AB3-4CD0-93D5-92034C1D97D8}</ProjectGuid> <OutputType>WinExe</OutputType> <RootNamespace>virConnectSetErrorFunc</RootNamespace> diff --git a/examples/MonoDevelop/virDomainStats/virDomainStats.csproj b/examples/MonoDevelop/virDomainStats/virDomainStats.csproj index 355d8ef..05b2ecb 100644 --- a/examples/MonoDevelop/virDomainStats/virDomainStats.csproj +++ b/examples/MonoDevelop/virDomainStats/virDomainStats.csproj @@ -1 +1,56 @@ -<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{767373FC-96BE-420A-8219-97146D33B2CB}</ProjectGuid> <OutputType>WinExe</OutputType> <RootNamespace>virDomainStats</RootNamespace> <AssemblyName>virDomainStats</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug</OutputPath> <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <ConsolePause>false</ConsolePause> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Release</OutputPath> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <ConsolePause>false</ConsolePause> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="Mono.Posix" /> <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> <Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> <Reference Include="System.Xml" /> <Reference Include="System.Core"> </Reference> </ItemGroup> <ItemGroup> <EmbeddedResource Include="gtk-gui\gui.stetic"> <LogicalName>gui.stetic</LogicalName> </EmbeddedResource> </ItemGroup> <ItemGroup> <Compile Include="gtk-gui\generated.cs" /> <Compile Include="MainWindow.cs" /> <Compile Include="gtk-gui\MainWindow.cs" /> <Compile Include="Main.cs" /> <Compile Include="AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\..\projects\MonoDevelop\LibvirtBindings.csproj"> <Project>{C51C70EB-9040-4F8E-9A18-DF2A77D04A37}</Project> <Name>LibvirtBindings</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> </Project> \ No newline at end of file +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{767373FC-96BE-420A-8219-97146D33B2CB}</ProjectGuid> + <OutputType>WinExe</OutputType> + <RootNamespace>virDomainStats</RootNamespace> + <AssemblyName>virDomainStats</AssemblyName> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>none</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="Mono.Posix" /> + <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Core"> + </Reference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="gtk-gui\gui.stetic"> + <LogicalName>gui.stetic</LogicalName> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <Compile Include="gtk-gui\generated.cs" /> + <Compile Include="MainWindow.cs" /> + <Compile Include="gtk-gui\MainWindow.cs" /> + <Compile Include="Main.cs" /> + <Compile Include="AssemblyInfo.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> +</Project> \ No newline at end of file diff --git a/examples/MonoDevelop/virEventRegisterImpl/virEventRegisterImpl.csproj b/examples/MonoDevelop/virEventRegisterImpl/virEventRegisterImpl.csproj index 5165c88..858b89c 100644 --- a/examples/MonoDevelop/virEventRegisterImpl/virEventRegisterImpl.csproj +++ b/examples/MonoDevelop/virEventRegisterImpl/virEventRegisterImpl.csproj @@ -1,10 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.21022</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{4576BB61-F143-4BC8-BD1D-D50F710CEA10}</ProjectGuid> <OutputType>WinExe</OutputType> <RootNamespace>virEventRegisterImpl</RootNamespace> diff --git a/projects/MonoDevelop/LibvirtBindings.csproj b/projects/MonoDevelop/LibvirtBindings.csproj index 2473625..3a35541 100644 --- a/projects/MonoDevelop/LibvirtBindings.csproj +++ b/projects/MonoDevelop/LibvirtBindings.csproj @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.21022</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{C51C70EB-9040-4F8E-9A18-DF2A77D04A37}</ProjectGuid> <OutputType>Library</OutputType> <RootNamespace>LibvirtBindings</RootNamespace> <AssemblyName>LibvirtBindings</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> diff --git a/projects/MonoDevelop/LibvirtBindings.sln b/projects/MonoDevelop/LibvirtBindings.sln index a737c5a..a38e18c 100644 --- a/projects/MonoDevelop/LibvirtBindings.sln +++ b/projects/MonoDevelop/LibvirtBindings.sln @@ -1,6 +1,6 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibvirtBindings", "LibvirtBindings.csproj", "{C51C70EB-9040-4F8E-9A18-DF2A77D04A37}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{504BA6A7-9D0E-44BA-827D-D797773347FD}" -- 2.26.2

On Tue, 2020-05-12 at 11:23 +0100, Daniel P. Berrangé wrote:
+++ b/examples/MonoDevelop/virDomainStats/virDomainStats.csproj @@ -1 +1,56 @@ -<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{767373FC-96BE-420A-8219-97146D33B2CB}</ProjectGuid> <OutputType>WinExe</OutputType> <RootNamespace>virDomainStats</RootNamespace> <AssemblyName>virDomainStats</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
The patch seems to have gotten corrupted somehow, since all the leading "-"s are missing from this part and the diff is larger than it is for other files for not apparent reason. Anyway, the changes look reasonable so, assuming your local version of the patch is not corrupted and you've tested it thoroughly, Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization

On Thu, May 14, 2020 at 06:46:55PM +0200, Andrea Bolognani wrote:
On Tue, 2020-05-12 at 11:23 +0100, Daniel P. Berrangé wrote:
+++ b/examples/MonoDevelop/virDomainStats/virDomainStats.csproj @@ -1 +1,56 @@ -<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{767373FC-96BE-420A-8219-97146D33B2CB}</ProjectGuid> <OutputType>WinExe</OutputType> <RootNamespace>virDomainStats</RootNamespace> <AssemblyName>virDomainStats</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
The patch seems to have gotten corrupted somehow, since all the leading "-"s are missing from this part and the diff is larger than it is for other files for not apparent reason.
I think your mail client has just inserted fake line breaks. This original file had its entire contents on a single line, which is fixed in the new version :-) 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 :|

The csharp build needs to validate two axis - A variety of libvirt versions - A variety of csharp versions We get coverage for both these axis by running a build against the distro provided libvirt packages. All that is then missing is a build against the latest libvirt git master, which only needs to be run on a single distro, for which Fedora 32 is picked. Latest Debian, Ubuntu, openSUSE and CentOS all stopped shipping the monodevelop package, pointing people to flatpaks instead. Thus the set of distros built is somewhat limited Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- .gitlab-ci.yml | 96 ++++++++++++++++++++++++++++ ci/README.rst | 14 ++++ ci/libvirt-debian-9.Dockerfile | 58 +++++++++++++++++ ci/libvirt-fedora-31.Dockerfile | 52 +++++++++++++++ ci/libvirt-fedora-32.Dockerfile | 61 ++++++++++++++++++ ci/libvirt-fedora-rawhide.Dockerfile | 53 +++++++++++++++ ci/refresh | 27 ++++++++ 7 files changed, 361 insertions(+) create mode 100644 ci/README.rst create mode 100644 ci/libvirt-debian-9.Dockerfile create mode 100644 ci/libvirt-fedora-31.Dockerfile create mode 100644 ci/libvirt-fedora-32.Dockerfile create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile create mode 100755 ci/refresh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50dae92..9047fc3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,55 @@ stages: - prebuild + - containers + - builds + +.container_job_template: &container_job_definition + image: docker:stable + stage: containers + services: + - docker:dind + before_script: + - export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest" + - export COMMON_TAG="$CI_REGISTRY/libvirt/libvirt-csharp/ci-$NAME:latest" + - docker info + - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" + script: + - docker pull "$TAG" || docker pull "$COMMON_TAG" || true + - docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "ci/libvirt-$NAME.Dockerfile" ci + - docker push "$TAG" + after_script: + - docker logout + +.git_build_job_template: &git_build_job_definition + image: $CI_REGISTRY_IMAGE/ci-$NAME:latest + stage: builds + before_script: + - export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)" + - export SCRATCH_DIR="/tmp/scratch" + - export VROOT="$SCRATCH_DIR/vroot" + - export LD_LIBRARY_PATH="$VROOT/lib" + - export PATH="$VROOT/bin:$PATH" + - export PKG_CONFIG_PATH="$VROOT/lib/pkgconfig" + script: + - pushd "$PWD" + - mkdir -p "$SCRATCH_DIR" + - cd "$SCRATCH_DIR" + - git clone --depth 1 https://gitlab.com/libvirt/libvirt.git + - mkdir libvirt/build + - cd libvirt/build + - ../autogen.sh --prefix="$VROOT" --without-libvirtd + - $MAKE install + - popd + - mdtool build projects/MonoDevelop/LibvirtBindings.csproj + +.dist_build_job_template: &dist_build_job_definition + image: $CI_REGISTRY_IMAGE/ci-$NAME:latest + stage: builds + before_script: + - export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)" + script: + - mdtool build projects/MonoDevelop/LibvirtBindings.csproj # Check that all commits are signed-off for the DCO. # Skip on "libvirt" namespace, since we only need to run @@ -14,3 +63,50 @@ check-dco: except: variables: - $CI_PROJECT_NAMESPACE == 'libvirt' + +debian-9-container: + <<: *container_job_definition + variables: + NAME: debian-9 + +fedora-31-container: + <<: *container_job_definition + variables: + NAME: fedora-31 + +fedora-32-container: + <<: *container_job_definition + variables: + NAME: fedora-32 + +fedora-rawhide-container: + <<: *container_job_definition + variables: + NAME: fedora-rawhide + + +fedora-32-git-build: + <<: *git_build_job_definition + variables: + NAME: fedora-32 + + +debian-9-dist-build: + <<: *dist_build_job_definition + variables: + NAME: debian-9 + +fedora-31-dist-build: + <<: *dist_build_job_definition + variables: + NAME: fedora-31 + +fedora-32-dist-build: + <<: *dist_build_job_definition + variables: + NAME: fedora-32 + +fedora-rawhide-dist-build: + <<: *dist_build_job_definition + variables: + NAME: fedora-rawhide diff --git a/ci/README.rst b/ci/README.rst new file mode 100644 index 0000000..530897e --- /dev/null +++ b/ci/README.rst @@ -0,0 +1,14 @@ +CI job assets +============= + +This directory contains assets used in the automated CI jobs, most +notably the Dockerfiles used to build container images in which the +CI jobs then run. + +The ``refresh`` script is used to re-create the Dockerfiles using the +``lcitool`` command that is provided by repo +https://gitlab.com/libvirt/libvirt-ci + +The containers are built during the CI process and cached in the GitLab +container registry of the project doing the build. The cached containers +can be deleted at any time and will be correctly rebuilt. diff --git a/ci/libvirt-debian-9.Dockerfile b/ci/libvirt-debian-9.Dockerfile new file mode 100644 index 0000000..7631511 --- /dev/null +++ b/ci/libvirt-debian-9.Dockerfile @@ -0,0 +1,58 @@ +FROM debian:9 + +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt-get update && \ + apt-get dist-upgrade -y && \ + apt-get install --no-install-recommends -y \ + autoconf \ + automake \ + autopoint \ + bash \ + bash-completion \ + ca-certificates \ + ccache \ + chrony \ + gcc \ + gdb \ + gettext \ + git \ + libc6-dev \ + libtool \ + libtool-bin \ + libvirt-dev \ + locales \ + lsof \ + make \ + mono-devel \ + monodevelop \ + net-tools \ + ninja-build \ + patch \ + perl \ + pkgconf \ + python3 \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + screen \ + strace \ + sudo \ + vim && \ + apt-get autoremove -y && \ + apt-get autoclean -y && \ + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ + dpkg-reconfigure locales && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc) + +RUN pip3 install \ + meson==0.49.0 + +ENV LANG "en_US.UTF-8" + +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" diff --git a/ci/libvirt-fedora-31.Dockerfile b/ci/libvirt-fedora-31.Dockerfile new file mode 100644 index 0000000..167176c --- /dev/null +++ b/ci/libvirt-fedora-31.Dockerfile @@ -0,0 +1,52 @@ +FROM fedora:31 + +RUN dnf update -y && \ + dnf install -y \ + autoconf \ + automake \ + bash \ + bash-completion \ + ca-certificates \ + ccache \ + chrony \ + cppi \ + gcc \ + gdb \ + gettext \ + gettext-devel \ + git \ + glibc-devel \ + glibc-langpack-en \ + libtool \ + libvirt-devel \ + lsof \ + make \ + meson \ + mono-devel \ + monodevelop \ + net-tools \ + ninja-build \ + patch \ + perl \ + pkgconfig \ + python3 \ + python3-setuptools \ + python3-wheel \ + rpm-build \ + screen \ + strace \ + sudo \ + vim && \ + dnf autoremove -y && \ + dnf clean all -y && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc) + +ENV LANG "en_US.UTF-8" + +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" diff --git a/ci/libvirt-fedora-32.Dockerfile b/ci/libvirt-fedora-32.Dockerfile new file mode 100644 index 0000000..fe4f3c4 --- /dev/null +++ b/ci/libvirt-fedora-32.Dockerfile @@ -0,0 +1,61 @@ +FROM fedora:32 + +RUN dnf update -y && \ + dnf install -y \ + autoconf \ + automake \ + bash \ + bash-completion \ + ca-certificates \ + ccache \ + chrony \ + cppi \ + gcc \ + gdb \ + gettext \ + gettext-devel \ + git \ + glib2-devel \ + glibc-devel \ + glibc-langpack-en \ + gnutls-devel \ + libnl3-devel \ + libtirpc-devel \ + libtool \ + libvirt-devel \ + libxml2 \ + libxml2-devel \ + libxslt \ + lsof \ + make \ + meson \ + mono-devel \ + monodevelop \ + net-tools \ + ninja-build \ + patch \ + perl \ + pkgconfig \ + python3 \ + python3-docutils \ + python3-setuptools \ + python3-wheel \ + rpcgen \ + rpm-build \ + screen \ + strace \ + sudo \ + vim && \ + dnf autoremove -y && \ + dnf clean all -y && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc) + +ENV LANG "en_US.UTF-8" + +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" diff --git a/ci/libvirt-fedora-rawhide.Dockerfile b/ci/libvirt-fedora-rawhide.Dockerfile new file mode 100644 index 0000000..a316303 --- /dev/null +++ b/ci/libvirt-fedora-rawhide.Dockerfile @@ -0,0 +1,53 @@ +FROM fedora:rawhide + +RUN dnf update -y --nogpgcheck fedora-gpg-keys && \ + dnf update -y && \ + dnf install -y \ + autoconf \ + automake \ + bash \ + bash-completion \ + ca-certificates \ + ccache \ + chrony \ + cppi \ + gcc \ + gdb \ + gettext \ + gettext-devel \ + git \ + glibc-devel \ + glibc-langpack-en \ + libtool \ + libvirt-devel \ + lsof \ + make \ + meson \ + mono-devel \ + monodevelop \ + net-tools \ + ninja-build \ + patch \ + perl \ + pkgconfig \ + python3 \ + python3-setuptools \ + python3-wheel \ + rpm-build \ + screen \ + strace \ + sudo \ + vim && \ + dnf autoremove -y && \ + dnf clean all -y && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc) + +ENV LANG "en_US.UTF-8" + +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" diff --git a/ci/refresh b/ci/refresh new file mode 100755 index 0000000..68c1957 --- /dev/null +++ b/ci/refresh @@ -0,0 +1,27 @@ +#!/bin/sh + +if test -z "$1" +then + echo "syntax: $0 PATH-TO-LCITOOL" + exit 1 +fi + +LCITOOL=$1 + +if ! test -x "$LCITOOL" +then + echo "$LCITOOL is not executable" + exit 1 +fi + +HOSTS=$($LCITOOL hosts | grep -E "(debian-9|fedora)") + +for host in $HOSTS +do + if test "$host" = "libvirt-fedora-32" + then + $LCITOOL dockerfile $host libvirt+minimal,libvirt+dist,libvirt-csharp > $host.Dockerfile + else + $LCITOOL dockerfile $host libvirt+dist,libvirt-csharp > $host.Dockerfile + fi +done -- 2.26.2

On Tue, 2020-05-12 at 11:23 +0100, Daniel P. Berrangé wrote:
The csharp build needs to validate two axis
- A variety of libvirt versions - A variety of csharp versions
We get coverage for both these axis by running a build against the distro provided libvirt packages. All that is then missing is a build against the latest libvirt git master, which only needs to be run on a single distro, for which Fedora 32 is picked.
Latest Debian, Ubuntu, openSUSE and CentOS all stopped shipping the monodevelop package, pointing people to flatpaks instead. Thus the set of distros built is somewhat limited
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- .gitlab-ci.yml | 96 ++++++++++++++++++++++++++++ ci/README.rst | 14 ++++ ci/libvirt-debian-9.Dockerfile | 58 +++++++++++++++++ ci/libvirt-fedora-31.Dockerfile | 52 +++++++++++++++ ci/libvirt-fedora-32.Dockerfile | 61 ++++++++++++++++++ ci/libvirt-fedora-rawhide.Dockerfile | 53 +++++++++++++++ ci/refresh | 27 ++++++++ 7 files changed, 361 insertions(+) create mode 100644 ci/README.rst create mode 100644 ci/libvirt-debian-9.Dockerfile create mode 100644 ci/libvirt-fedora-31.Dockerfile create mode 100644 ci/libvirt-fedora-32.Dockerfile create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile create mode 100755 ci/refresh
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization

With the introduction of automated CI pipelines, we are now ready to switch to using merge requests for the project. With this switch we longer wish to have patches sent to the mailing list. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- .gitpublish | 4 ---- CONTRIBUTING.rst | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) delete mode 100644 .gitpublish create mode 100644 CONTRIBUTING.rst diff --git a/.gitpublish b/.gitpublish deleted file mode 100644 index 7c4687f..0000000 --- a/.gitpublish +++ /dev/null @@ -1,4 +0,0 @@ -[gitpublishprofile "default"] -base = master -to = libvir-list@redhat.com -prefix = libvirt-csharp PATCH diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..4cbdb57 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,28 @@ +============================== +Contributing to libvirt-csharp +============================== + +The libvirt Csharp API binding accepts code contributions via merge requests +on the GitLab project: + +https://gitlab.com/libvirt/libvirt-csharp/-/merge_requests + +It is required that automated CI pipelines succeed before a merge request +will be accepted. The global pipeline status for the ``master`` branch is +visible at: + +https://gitlab.com/libvirt/libvirt-csharp/pipelines + +CI pipeline results for merge requests will be visible via the contributors' +own private repository fork: + +https://gitlab.com/yourusername/libvirt-csharp/pipelines + +Contributions submitted to the project must be in compliance with the +Developer Certificate of Origin Version 1.1. This is documented at: + +https://developercertificate.org/ + +To indicate compliance, each commit in a series must have a "Signed-off-by" +tag with the submitter's name and email address. This can be added by passing +the ``-s`` flag to ``git commit`` when creating the patches. -- 2.26.2

On Tue, 2020-05-12 at 11:23 +0100, Daniel P. Berrangé wrote:
With the introduction of automated CI pipelines, we are now ready to switch to using merge requests for the project. With this switch we longer wish to have patches sent to the mailing list.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- .gitpublish | 4 ---- CONTRIBUTING.rst | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) delete mode 100644 .gitpublish create mode 100644 CONTRIBUTING.rst
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrangé