[PATCH 7/7] .gitlab-ci.d/windows.yml: Test 'make installer' in the CI

Bin Meng posted 7 patches 3 years, 5 months ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Peter Lieven <pl@kamp.de>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>
[PATCH 7/7] .gitlab-ci.d/windows.yml: Test 'make installer' in the CI
Posted by Bin Meng 3 years, 5 months ago
From: Bin Meng <bin.meng@windriver.com>

Now that we have supported packaging DLLs automatically, let's add
the 'make installer' in the CI and publish the generated installer
file as an artifact.

Increase the job timeout to 90 minutes to accommodate to it.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
---

 .gitlab-ci.d/windows.yml | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml
index fffb202658..3a94d40e73 100644
--- a/.gitlab-ci.d/windows.yml
+++ b/.gitlab-ci.d/windows.yml
@@ -10,7 +10,7 @@
       - ${CI_PROJECT_DIR}/msys64/var/cache
   needs: []
   stage: build
-  timeout: 70m
+  timeout: 90m
   before_script:
   - If ( !(Test-Path -Path msys64\var\cache ) ) {
       mkdir msys64\var\cache
@@ -28,6 +28,11 @@
   - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Core update
   - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Normal update
   - taskkill /F /FI "MODULES eq msys-2.0.dll"
+  artifacts:
+    name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
+    expire_in: 7 days
+    paths:
+      - build/qemu-setup*.exe
 
 msys2-64bit:
   extends: .shared_msys2_builder
@@ -51,6 +56,7 @@ msys2-64bit:
       mingw-w64-x86_64-lzo2
       mingw-w64-x86_64-nettle
       mingw-w64-x86_64-ninja
+      mingw-w64-x86_64-nsis
       mingw-w64-x86_64-pixman
       mingw-w64-x86_64-pkgconf
       mingw-w64-x86_64-python
@@ -60,12 +66,15 @@ msys2-64bit:
       mingw-w64-x86_64-usbredir
       mingw-w64-x86_64-zstd "
   - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
-  - $env:MSYSTEM = 'MINGW64'     # Start a 64 bit Mingw environment
+  - $env:MSYSTEM = 'MINGW64'     # Start a 64-bit MinGW environment
   - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
-  - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu
+  - mkdir build
+  - cd build
+  - ..\msys64\usr\bin\bash -lc '../configure --target-list=x86_64-softmmu
       --enable-capstone --without-default-devices'
-  - .\msys64\usr\bin\bash -lc 'make'
-  - .\msys64\usr\bin\bash -lc 'make check'
+  - ..\msys64\usr\bin\bash -lc 'make'
+  - ..\msys64\usr\bin\bash -lc 'make check'
+  - ..\msys64\usr\bin\bash -lc 'make installer'
 
 msys2-32bit:
   extends: .shared_msys2_builder
@@ -89,6 +98,7 @@ msys2-32bit:
       mingw-w64-i686-lzo2
       mingw-w64-i686-nettle
       mingw-w64-i686-ninja
+      mingw-w64-i686-nsis
       mingw-w64-i686-pixman
       mingw-w64-i686-pkgconf
       mingw-w64-i686-python
@@ -98,10 +108,11 @@ msys2-32bit:
       mingw-w64-i686-usbredir
       mingw-w64-i686-zstd "
   - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
-  - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinG environment
+  - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinGW environment
   - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
-  - mkdir output
-  - cd output
+  - mkdir build
+  - cd build
   - ..\msys64\usr\bin\bash -lc "../configure --target-list=ppc64-softmmu"
   - ..\msys64\usr\bin\bash -lc 'make'
   - ..\msys64\usr\bin\bash -lc 'make check'
+  - ..\msys64\usr\bin\bash -lc 'make installer'
-- 
2.34.1
Re: [PATCH 7/7] .gitlab-ci.d/windows.yml: Test 'make installer' in the CI
Posted by Stefan Weil via 3 years, 3 months ago
Am 08.09.22 um 15:28 schrieb Bin Meng:
> From: Bin Meng <bin.meng@windriver.com>
> 
> Now that we have supported packaging DLLs automatically, let's add
> the 'make installer' in the CI and publish the generated installer
> file as an artifact.
> 
> Increase the job timeout to 90 minutes to accommodate to it.
> 
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
> 
>   .gitlab-ci.d/windows.yml | 27 +++++++++++++++++++--------
>   1 file changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml
> index fffb202658..3a94d40e73 100644
> --- a/.gitlab-ci.d/windows.yml
> +++ b/.gitlab-ci.d/windows.yml
> @@ -10,7 +10,7 @@
>         - ${CI_PROJECT_DIR}/msys64/var/cache
>     needs: []
>     stage: build
> -  timeout: 70m
> +  timeout: 90m
>     before_script:
>     - If ( !(Test-Path -Path msys64\var\cache ) ) {
>         mkdir msys64\var\cache
> @@ -28,6 +28,11 @@
>     - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Core update
>     - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Normal update
>     - taskkill /F /FI "MODULES eq msys-2.0.dll"
> +  artifacts:
> +    name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
> +    expire_in: 7 days
> +    paths:
> +      - build/qemu-setup*.exe
>   
>   msys2-64bit:
>     extends: .shared_msys2_builder
> @@ -51,6 +56,7 @@ msys2-64bit:
>         mingw-w64-x86_64-lzo2
>         mingw-w64-x86_64-nettle
>         mingw-w64-x86_64-ninja
> +      mingw-w64-x86_64-nsis
>         mingw-w64-x86_64-pixman
>         mingw-w64-x86_64-pkgconf
>         mingw-w64-x86_64-python
> @@ -60,12 +66,15 @@ msys2-64bit:
>         mingw-w64-x86_64-usbredir
>         mingw-w64-x86_64-zstd "
>     - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
> -  - $env:MSYSTEM = 'MINGW64'     # Start a 64 bit Mingw environment
> +  - $env:MSYSTEM = 'MINGW64'     # Start a 64-bit MinGW environment

I use Mingw-w64, not MinGW. :-)

https://www.mingw-w64.org/ uses inconsistent case, mostly Mingw-w64, but 
also MinGW-w64. The same confusion exists in the description of the 
Debian packages, but there MinGW-w64 is more common.

So there seems to be no right or wrong.

>     - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
> -  - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu
> +  - mkdir build
> +  - cd build
> +  - ..\msys64\usr\bin\bash -lc '../configure --target-list=x86_64-softmmu
>         --enable-capstone --without-default-devices'
> -  - .\msys64\usr\bin\bash -lc 'make'
> -  - .\msys64\usr\bin\bash -lc 'make check'
> +  - ..\msys64\usr\bin\bash -lc 'make'
> +  - ..\msys64\usr\bin\bash -lc 'make check'
> +  - ..\msys64\usr\bin\bash -lc 'make installer'
>   
>   msys2-32bit:
>     extends: .shared_msys2_builder
> @@ -89,6 +98,7 @@ msys2-32bit:
>         mingw-w64-i686-lzo2
>         mingw-w64-i686-nettle
>         mingw-w64-i686-ninja
> +      mingw-w64-i686-nsis
>         mingw-w64-i686-pixman
>         mingw-w64-i686-pkgconf
>         mingw-w64-i686-python
> @@ -98,10 +108,11 @@ msys2-32bit:
>         mingw-w64-i686-usbredir
>         mingw-w64-i686-zstd "
>     - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
> -  - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinG environment
> +  - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinGW environment
>     - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
> -  - mkdir output
> -  - cd output
> +  - mkdir build
> +  - cd build
>     - ..\msys64\usr\bin\bash -lc "../configure --target-list=ppc64-softmmu"
>     - ..\msys64\usr\bin\bash -lc 'make'
>     - ..\msys64\usr\bin\bash -lc 'make check'
> +  - ..\msys64\usr\bin\bash -lc 'make installer'

Maybe it is sufficient to build only a 64 bit installer. Is there still 
need for QEMU on 32 bit Windows? For CI, most parts of the NSIS process 
(which requires a lot of resources) are covered by either 32 or 64 bit 
builds, so running both might be unnecessary.

Regards
Stefan
Re: [PATCH 7/7] .gitlab-ci.d/windows.yml: Test 'make installer' in the CI
Posted by Bin Meng 3 years, 3 months ago
On Sun, Oct 30, 2022 at 12:39 AM Stefan Weil <sw@weilnetz.de> wrote:
>
> Am 08.09.22 um 15:28 schrieb Bin Meng:
> > From: Bin Meng <bin.meng@windriver.com>
> >
> > Now that we have supported packaging DLLs automatically, let's add
> > the 'make installer' in the CI and publish the generated installer
> > file as an artifact.
> >
> > Increase the job timeout to 90 minutes to accommodate to it.
> >
> > Signed-off-by: Bin Meng <bin.meng@windriver.com>
> > ---
> >
> >   .gitlab-ci.d/windows.yml | 27 +++++++++++++++++++--------
> >   1 file changed, 19 insertions(+), 8 deletions(-)
> >
> > diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml
> > index fffb202658..3a94d40e73 100644
> > --- a/.gitlab-ci.d/windows.yml
> > +++ b/.gitlab-ci.d/windows.yml
> > @@ -10,7 +10,7 @@
> >         - ${CI_PROJECT_DIR}/msys64/var/cache
> >     needs: []
> >     stage: build
> > -  timeout: 70m
> > +  timeout: 90m
> >     before_script:
> >     - If ( !(Test-Path -Path msys64\var\cache ) ) {
> >         mkdir msys64\var\cache
> > @@ -28,6 +28,11 @@
> >     - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Core update
> >     - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Normal update
> >     - taskkill /F /FI "MODULES eq msys-2.0.dll"
> > +  artifacts:
> > +    name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
> > +    expire_in: 7 days
> > +    paths:
> > +      - build/qemu-setup*.exe
> >
> >   msys2-64bit:
> >     extends: .shared_msys2_builder
> > @@ -51,6 +56,7 @@ msys2-64bit:
> >         mingw-w64-x86_64-lzo2
> >         mingw-w64-x86_64-nettle
> >         mingw-w64-x86_64-ninja
> > +      mingw-w64-x86_64-nsis
> >         mingw-w64-x86_64-pixman
> >         mingw-w64-x86_64-pkgconf
> >         mingw-w64-x86_64-python
> > @@ -60,12 +66,15 @@ msys2-64bit:
> >         mingw-w64-x86_64-usbredir
> >         mingw-w64-x86_64-zstd "
> >     - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
> > -  - $env:MSYSTEM = 'MINGW64'     # Start a 64 bit Mingw environment
> > +  - $env:MSYSTEM = 'MINGW64'     # Start a 64-bit MinGW environment
>
> I use Mingw-w64, not MinGW. :-)
>
> https://www.mingw-w64.org/ uses inconsistent case, mostly Mingw-w64, but
> also MinGW-w64. The same confusion exists in the description of the
> Debian packages, but there MinGW-w64 is more common.
>
> So there seems to be no right or wrong.

I would suggest we either use mingw-w64, or MinGW-w64 :)

>
> >     - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
> > -  - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu
> > +  - mkdir build
> > +  - cd build
> > +  - ..\msys64\usr\bin\bash -lc '../configure --target-list=x86_64-softmmu
> >         --enable-capstone --without-default-devices'
> > -  - .\msys64\usr\bin\bash -lc 'make'
> > -  - .\msys64\usr\bin\bash -lc 'make check'
> > +  - ..\msys64\usr\bin\bash -lc 'make'
> > +  - ..\msys64\usr\bin\bash -lc 'make check'
> > +  - ..\msys64\usr\bin\bash -lc 'make installer'
> >
> >   msys2-32bit:
> >     extends: .shared_msys2_builder
> > @@ -89,6 +98,7 @@ msys2-32bit:
> >         mingw-w64-i686-lzo2
> >         mingw-w64-i686-nettle
> >         mingw-w64-i686-ninja
> > +      mingw-w64-i686-nsis
> >         mingw-w64-i686-pixman
> >         mingw-w64-i686-pkgconf
> >         mingw-w64-i686-python
> > @@ -98,10 +108,11 @@ msys2-32bit:
> >         mingw-w64-i686-usbredir
> >         mingw-w64-i686-zstd "
> >     - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
> > -  - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinG environment
> > +  - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinGW environment
> >     - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
> > -  - mkdir output
> > -  - cd output
> > +  - mkdir build
> > +  - cd build
> >     - ..\msys64\usr\bin\bash -lc "../configure --target-list=ppc64-softmmu"
> >     - ..\msys64\usr\bin\bash -lc 'make'
> >     - ..\msys64\usr\bin\bash -lc 'make check'
> > +  - ..\msys64\usr\bin\bash -lc 'make installer'
>
> Maybe it is sufficient to build only a 64 bit installer. Is there still
> need for QEMU on 32 bit Windows? For CI, most parts of the NSIS process
> (which requires a lot of resources) are covered by either 32 or 64 bit
> builds, so running both might be unnecessary.

I see no need to support QEMU on 32-bit Windows as it is less common.

Regards,
Bin
Re: [PATCH 7/7] .gitlab-ci.d/windows.yml: Test 'make installer' in the CI
Posted by Thomas Huth 3 years, 3 months ago
On 30/10/2022 04.21, Bin Meng wrote:
> On Sun, Oct 30, 2022 at 12:39 AM Stefan Weil <sw@weilnetz.de> wrote:
...
>> Maybe it is sufficient to build only a 64 bit installer. Is there still
>> need for QEMU on 32 bit Windows? For CI, most parts of the NSIS process
>> (which requires a lot of resources) are covered by either 32 or 64 bit
>> builds, so running both might be unnecessary.
> 
> I see no need to support QEMU on 32-bit Windows as it is less common.

If you feel confident that QEMU on 32-bit Windows is not worth to support 
anymore, could you please send a patch for docs/about/build-platforms.rst to 
state there that only 64-bit Windows versions are supported?

We could then also drop the 32-bit CI Windows jobs to save some precious CI 
minutes (since they are very limited nowadays on gitlab).

  Thomas
Re: [PATCH 7/7] .gitlab-ci.d/windows.yml: Test 'make installer' in the CI
Posted by Philippe Mathieu-Daudé via 3 years, 4 months ago
On 8/9/22 15:28, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
> 
> Now that we have supported packaging DLLs automatically, let's add
> the 'make installer' in the CI and publish the generated installer
> file as an artifact.
> 
> Increase the job timeout to 90 minutes to accommodate to it.
> 
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
> 
>   .gitlab-ci.d/windows.yml | 27 +++++++++++++++++++--------
>   1 file changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml
> index fffb202658..3a94d40e73 100644
> --- a/.gitlab-ci.d/windows.yml
> +++ b/.gitlab-ci.d/windows.yml
> @@ -10,7 +10,7 @@
>         - ${CI_PROJECT_DIR}/msys64/var/cache
>     needs: []
>     stage: build
> -  timeout: 70m
> +  timeout: 90m
>     before_script:
>     - If ( !(Test-Path -Path msys64\var\cache ) ) {
>         mkdir msys64\var\cache
> @@ -28,6 +28,11 @@
>     - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Core update
>     - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Normal update
>     - taskkill /F /FI "MODULES eq msys-2.0.dll"
> +  artifacts:
> +    name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
> +    expire_in: 7 days
> +    paths:
> +      - build/qemu-setup*.exe

Do you really want to test this binary? I think the CI is only to test
the installer. This is a stripped down version anyway (./configure
options). If someone want to package/test, this should not be done here
but locally.

However I agree testing the installer doesn't bitrot is helpful, so
*without* the "artifacts" section:

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>