mbox series

[v5,00/11] Green the msys2 CI make

Message ID 20200905062333.1087-1-luoyonggang@gmail.com
Headers show
Series Green the msys2 CI make | expand

Message

罗勇刚(Yonggang Luo) Sept. 5, 2020, 6:23 a.m. UTC
Also it's fixes issues about make check

Yonggang Luo (11):
  Revert "configure: add --ninja option"
  block: Fixes nfs on msys2/mingw
  ci: fixes msys2 build by upgrading capstone to 4.0.2
  meson: upgrade meson for execute custom ninjatool under msys2 properly
  ci: Enable msys2 ci in cirrus
  tests: Trying fixes test-replication.c on msys2.
  block: get file-win32.c handle locking option consistence with
    file-posix.c
  osdep: These function are only available on Non-Win32 system.
  meson: Fixes qapi tests.
  docker: Add win32/msys2/mingw64 docker
  ci: Enable Github actions.

 .cirrus.yml                           | 24 +++++++++++++++++++
 .github/workflows/main.yml            | 31 +++++++++++++++++++++++++
 block/file-win32.c                    | 23 +++++++++++++++++--
 block/nfs.c                           | 26 +++++++++++++--------
 capstone                              |  2 +-
 configure                             | 18 ++-------------
 include/qemu/osdep.h                  |  2 +-
 meson                                 |  2 +-
 scripts/ci/windows/msys2-build.sh     | 27 ++++++++++++++++++++++
 scripts/ci/windows/msys2-download.bat |  4 ++++
 scripts/ci/windows/msys2-install.sh   | 33 +++++++++++++++++++++++++++
 tests/docker/dockerfiles/msys2.docker | 11 +++++++++
 tests/qapi-schema/meson.build         |  3 ++-
 tests/test-replication.c              | 17 ++++++++++----
 14 files changed, 188 insertions(+), 35 deletions(-)
 create mode 100644 .github/workflows/main.yml
 create mode 100644 scripts/ci/windows/msys2-build.sh
 create mode 100644 scripts/ci/windows/msys2-download.bat
 create mode 100644 scripts/ci/windows/msys2-install.sh
 create mode 100644 tests/docker/dockerfiles/msys2.docker

-- 
2.28.0.windows.1

Comments

Thomas Huth Sept. 5, 2020, 8:29 a.m. UTC | #1
On 05/09/2020 08.23, Yonggang Luo wrote:
> This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41.
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  configure | 16 +---------------
>  1 file changed, 1 insertion(+), 15 deletions(-)

Please be a little bit more descriptive in the patch description: Why do
you have to revert this patch?

 Thomas
Thomas Huth Sept. 5, 2020, 8:42 a.m. UTC | #2
On 05/09/2020 08.23, Yonggang Luo wrote:
> The error are:
> +@end table
> +
> +@end deftypefn
> +
> make: *** [Makefile.mtest:63: check-qapi-schema] Error 1
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  tests/qapi-schema/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
> index c87d141417..67ba0a5ebd 100644
> --- a/tests/qapi-schema/meson.build
> +++ b/tests/qapi-schema/meson.build
> @@ -220,6 +220,7 @@ qapi_doc = custom_target('QAPI doc',
>  
>  # "full_path()" needed here to work around
>  # https://github.com/mesonbuild/meson/issues/7585
> -test('QAPI doc', diff, args: ['-u', files('doc-good.texi'), qapi_doc[0].full_path()],
> +test('QAPI doc', diff, args: ['--strip-trailing-cr',
> +                              '-u', files('doc-good.texi'), qapi_doc[0].full_path()],

I just had a look at the POSIX man page of "diff", and it seems like
"'--strip-trailing-cr" is not a portable option :-( Thus this will
likely fail on the BSDs and Solaris-based systems.
I think it's maybe best if you replace it with "-b" instead.

 Thomas
Paolo Bonzini Sept. 5, 2020, 8:48 a.m. UTC | #3
Il sab 5 set 2020, 10:29 Thomas Huth <thuth@redhat.com> ha scritto:

> On 05/09/2020 08.23, Yonggang Luo wrote:
> > This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41.
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> >  configure | 16 +---------------
> >  1 file changed, 1 insertion(+), 15 deletions(-)
>
> Please be a little bit more descriptive in the patch description: Why do
> you have to revert this patch?
>

It shouldn't be reverted yet. The Windows issue that required the
introduction of --ninja is now fixed in upstream Meson, but we shouldn't
include the fix in the meson submodule until it's part of a released
version. We can then bump the required version (hopefully 0.55.2) and
decide whether to remove --ninja.

That said, we might also want to use ninja instead of make in the future to
build QEMU (leaving make to do the orchestration of the submodules etc.),
which would let us remove ninjatool altogether. I am not sure if that is
going to happen anytime soon, but it should be taken into account before
deciding to remove --ninja.

Paolo

>
<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il sab 5 set 2020, 10:29 Thomas Huth &lt;<a href="mailto:thuth@redhat.com">thuth@redhat.com</a>&gt; ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/09/2020 08.23, Yonggang Luo wrote:<br>
&gt; This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41.<br>
&gt; <br>
&gt; Signed-off-by: Yonggang Luo &lt;<a href="mailto:luoyonggang@gmail.com" target="_blank" rel="noreferrer">luoyonggang@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  configure | 16 +---------------<br>
&gt;  1 file changed, 1 insertion(+), 15 deletions(-)<br>
<br>
Please be a little bit more descriptive in the patch description: Why do<br>
you have to revert this patch?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">It shouldn&#39;t be reverted yet. The Windows issue that required the introduction of --ninja is now fixed in upstream Meson, but we shouldn&#39;t include the fix in the meson submodule until it&#39;s part of a released version. We can then bump the required version (hopefully 0.55.2) and decide whether to remove --ninja.</div><div dir="auto"><br></div><div dir="auto">That said, we might also want to use ninja instead of make in the future to build QEMU (leaving make to do the orchestration of the submodules etc.), which would let us remove ninjatool altogether. I am not sure if that is going to happen anytime soon, but it should be taken into account before deciding to remove --ninja.</div><div dir="auto"><br></div><div dir="auto">Paolo</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>
Paolo Bonzini Sept. 5, 2020, 1:44 p.m. UTC | #4
On 05/09/20 08:23, Yonggang Luo wrote:
> The ninja options now have no need anymore.
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  meson | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson b/meson
> index 68ed748f84..492afe50a4 160000
> --- a/meson
> +++ b/meson
> @@ -1 +1 @@
> -Subproject commit 68ed748f84f14c2d4e62dcbd123816e5898eb04c
> +Subproject commit 492afe50a439d70df99d6e3e59572aff55e14c6b
> 

Sorry, we cannot use a random commit.  We need a release so that we can
in parallel update the version check in the configure script.

Paolo
罗勇刚(Yonggang Luo) Sept. 7, 2020, 4:20 a.m. UTC | #5
On Sat, Sep 5, 2020 at 4:42 PM Thomas Huth <thuth@redhat.com> wrote:

> On 05/09/2020 08.23, Yonggang Luo wrote:
> > The error are:
> > +@end table
> > +
> > +@end deftypefn
> > +
> > make: *** [Makefile.mtest:63: check-qapi-schema] Error 1
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> >  tests/qapi-schema/meson.build | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/qapi-schema/meson.build
> b/tests/qapi-schema/meson.build
> > index c87d141417..67ba0a5ebd 100644
> > --- a/tests/qapi-schema/meson.build
> > +++ b/tests/qapi-schema/meson.build
> > @@ -220,6 +220,7 @@ qapi_doc = custom_target('QAPI doc',
> >
> >  # "full_path()" needed here to work around
> >  # https://github.com/mesonbuild/meson/issues/7585
> > -test('QAPI doc', diff, args: ['-u', files('doc-good.texi'),
> qapi_doc[0].full_path()],
> > +test('QAPI doc', diff, args: ['--strip-trailing-cr',
> > +                              '-u', files('doc-good.texi'),
> qapi_doc[0].full_path()],
>
> I just had a look at the POSIX man page of "diff", and it seems like
> "'--strip-trailing-cr" is not a portable option :-( Thus this will
> likely fail on the BSDs and Solaris-based systems.
> I think it's maybe best if you replace it with "-b" instead.

updated

>
>  Thomas
>
>