Improve cirrus msys2
v4 cover Improve cirrus msys2
Fixes the broken msys2/mingw ci and speed it up.
V3-V4
Using cirrus cache to speed up msys2 ci instead of downloading archive file
V2-V3
Add one more patch:
cirrus: msys2/mingw speed is up, add excluded target back Do not build sphinx on windows, that's failing set the number of parallel count to fixed number 8
V1-V2
Resolve the cirrus conflict
Yonggang Luo (2):
cirrus: Fixing and speedup the msys2/mingw CI
cirrus: msys2/mingw speed is up, add excluded target back
.cirrus.yml | 107 +++++++++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 47 deletions(-)
Signature · 1 line
2.28.0.windows.1
PATCH v4 1/2 cirrus: Fixing and speedup the msys2/mingw CI
Use cache of cirrus caching msys2
The install of msys2 are refer to https://github.com/msys2/setup-msys2
The first time install msys2 would be time consuming, so increase timeout_in to 90m according to https://cirrus-ci.org/faq/#instance-timed-out
Apply patch of https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg00072.html
--- .cirrus.yml | 104 +++++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 45 deletions(-)
.cirrus.yml +59 -45
@@ -46,64 +46,78 @@ macos_xcode_task: - gmake check windows_msys2_task: + timeout_in: 90m windows_container: - image: cirrusci/windowsservercore:cmake + image: cirrusci/windowsservercore:2019 os_version: 2019 cpu: 8 memory: 8G env: + CIRRUS_SHELL: powershell MSYS: winsymlinks:nativestrict MSYSTEM: MINGW64 CHERE_INVOKING: 1 - printenv_script: - - C:\tools\msys64\usr\bin\bash.exe -lc 'printenv' + msys2_cache: + folder: C:\tools\msys64 + reupload_on_changes: false + fingerprint_script: cat .cirrus.yml + populate_script: + - | + Write-Output $env:PATH + md C:\tools + $start_time = Get-Date + cd C:\tools + bitsadmin /transfer msys_download /dynamic /download /priority FOREGROUND https://github.com/msys2/msys2-installer/releases/download/2020-09-03/msys2-base-x86_64-20200903.sfx.exe C:\tools\base.exe + Write-Output "Download time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" + C:\tools\base.exe -y + ((Get-Content -path C:\tools\msys64\etc\\post-install\\07-pacman-key.post -Raw) -replace '--refresh-keys', '--version') | Set-Content -Path C:\tools\msys64\etc\\post-install\\07-pacman-key.post + C:\tools\msys64\usr\bin\bash.exe -lc "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf" + C:\tools\msys64\usr\bin\bash.exe -lc "export" + C:\tools\msys64\usr\bin\bash.exe -lc "grep -rl 'repo.msys2.org/' /etc/pacman.d/mirrorlist.* | xargs sed -i 's/repo.msys2.org\//mirrors.tuna.tsinghua.edu.cn\/msys2\//g'" + C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Sy + echo Y | C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Suu --overwrite '*' + taskkill /F /FI "MODULES eq msys-2.0.dll" + tasklist + C:\tools\msys64\usr\bin\bash.exe -lc "mv -f /etc/pacman.conf.pacnew /etc/pacman.conf || true" + C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Suu --overwrite '*'" + C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed \ + diffutils git grep make pkg-config sed \ + mingw-w64-x86_64-python \ + mingw-w64-x86_64-python-setuptools \ + mingw-w64-x86_64-toolchain \ + mingw-w64-x86_64-SDL2 \ + mingw-w64-x86_64-SDL2_image \ + mingw-w64-x86_64-gtk3 \ + mingw-w64-x86_64-glib2 \ + mingw-w64-x86_64-ninja \ + mingw-w64-x86_64-jemalloc \ + mingw-w64-x86_64-lzo2 \ + mingw-w64-x86_64-zstd \ + mingw-w64-x86_64-libjpeg-turbo \ + mingw-w64-x86_64-pixman \ + mingw-w64-x86_64-libgcrypt \ + mingw-w64-x86_64-libpng \ + mingw-w64-x86_64-libssh \ + mingw-w64-x86_64-libxml2 \ + mingw-w64-x86_64-snappy \ + mingw-w64-x86_64-libusb \ + mingw-w64-x86_64-usbredir \ + mingw-w64-x86_64-libtasn1 \ + mingw-w64-x86_64-nettle \ + mingw-w64-x86_64-cyrus-sasl \ + mingw-w64-x86_64-curl \ + mingw-w64-x86_64-gnutls \ + " install_script: - - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && - curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" - - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && - curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" - - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && - pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" - - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Sy" - - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed - bash pacman pacman-mirrors msys2-runtime" - - taskkill /F /IM gpg-agent.exe - - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su" - - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed - base-devel - git - mingw-w64-x86_64-python - mingw-w64-x86_64-python-setuptools - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-capstone - mingw-w64-x86_64-SDL2 - mingw-w64-x86_64-SDL2_image - mingw-w64-x86_64-gtk3 - mingw-w64-x86_64-glib2 - mingw-w64-x86_64-ninja - mingw-w64-x86_64-make - mingw-w64-x86_64-lzo2 - mingw-w64-x86_64-zstd - mingw-w64-x86_64-libjpeg-turbo - mingw-w64-x86_64-pixman - mingw-w64-x86_64-libgcrypt - mingw-w64-x86_64-libpng - mingw-w64-x86_64-libssh - mingw-w64-x86_64-libxml2 - mingw-w64-x86_64-snappy - mingw-w64-x86_64-libusb - mingw-w64-x86_64-usbredir - mingw-w64-x86_64-libtasn1 - mingw-w64-x86_64-nettle - mingw-w64-x86_64-cyrus-sasl - mingw-w64-x86_64-curl - mingw-w64-x86_64-gnutls - mingw-w64-x86_64-zstd" + - | + Write-Output $env:PATH + C:\tools\msys64\usr\bin\bash.exe -lc "export" + script: - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build" - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3 --ninja=ninja --target-list-exclude=i386-softmmu,arm-softmmu,ppc-softmmu,mips-softmmu" - - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j$NUMBER_OF_PROCESSORS" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j8" test_script: - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check"
Signature · 1 line
2.28.0.windows.1
Re: [PATCH v4 1/2] cirrus: Fixing and speedup the msys2/mingw CI
The building result are at
https://cirrus-ci.com/task/4899553256144896
Quoted 4 lines · Yonggang Luo
Use cache of cirrus caching msys2
The install of msys2 are refer to https://github.com/msys2/setup-msys2
The first time install msys2 would be time consuming, so increase
timeout_in to 90m
Quoted 3 lines
according to https://cirrus-ci.org/faq/#instance-timed-out
Apply patch of
https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg00072.html
Quoted 29 lines
Signed-off-by Yonggang Luo <[email protected]>--- .cirrus.yml | 104 +++++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 45 deletions(-).cirrus.yml +4
-3@@ -46,64 +46,78 @@ macos_xcode_task: - gmake check windows_msys2_task: + timeout_in: 90m windows_container: - image: cirrusci/windowsservercore:cmake + image: cirrusci/windowsservercore:2019 os_version: 2019 cpu: 8 memory: 8G env: + CIRRUS_SHELL: powershell MSYS: winsymlinks:nativestrict MSYSTEM: MINGW64 CHERE_INVOKING: 1 - printenv_script: - - C:\tools\msys64\usr\bin\bash.exe -lc 'printenv' + msys2_cache:
.cirrus.yml macos_xcode_task: · line 70
Quoted 10 lines
.cirrus.yml +10
-0+ folder: C:\tools\msys64 + reupload_on_changes: false + fingerprint_script: cat .cirrus.yml + populate_script: + - | + Write-Output $env:PATH + md C:\tools + $start_time = Get-Date + cd C:\tools + bitsadmin /transfer msys_download /dynamic /download /priority
FOREGROUND
https://github.com/msys2/msys2-installer/releases/download/2020-09-03/msys2-base-x86_64-20200903.sfx.exe
C:\tools\base.exe
.cirrus.yml macos_xcode_task: · line 71
Quoted 1 line
.cirrus.yml +1
-0+ Write-Output "Download time taken:
$((Get-Date).Subtract($start_time).Seconds) second(s)"
.cirrus.yml macos_xcode_task: · line 73
Quoted 2 lines
.cirrus.yml +2
-0+ C:\tools\base.exe -y + ((Get-Content -path C:\tools\msys64\etc\\post-install\\
07-pacman-key.post -Raw) -replace '--refresh-keys', '--version') | Set-Content -Path C:\tools\msys64\etc\\post-install\\07-pacman-key.post
.cirrus.yml macos_xcode_task: · line 74
Quoted 1 line
.cirrus.yml +1
-0+ C:\tools\msys64\usr\bin\bash.exe -lc "sed -i
's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
.cirrus.yml macos_xcode_task: · line 76
Quoted 2 lines
.cirrus.yml +2
-0+ C:\tools\msys64\usr\bin\bash.exe -lc "export" + C:\tools\msys64\usr\bin\bash.exe -lc "grep -rl 'repo.msys2.org/'
/etc/pacman.d/mirrorlist.* | xargs sed -i 's/repo.msys2.org\// mirrors.tuna.tsinghua.edu.cn\/msys2\//g'"
.cirrus.yml macos_xcode_task: · line 78
Quoted 2 lines
.cirrus.yml +2
-0+ C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Sy + echo Y | C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Suu
--overwrite '*'
.cirrus.yml macos_xcode_task:
Quoted 3 lines
.cirrus.yml +3
-0+ taskkill /F /FI "MODULES eq msys-2.0.dll" + tasklist + C:\tools\msys64\usr\bin\bash.exe -lc "mv -f
/etc/pacman.conf.pacnew /etc/pacman.conf || true"
.cirrus.yml macos_xcode_task: · line 82
Quoted 1 line
.cirrus.yml +1
-0+ C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Suu
--overwrite '*'"
.cirrus.yml macos_xcode_task: · line 83
Quoted 1 line
.cirrus.yml +1
-0+ C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S
--needed \
Quoted 20 lines
.cirrus.yml +20
-0+ diffutils git grep make pkg-config sed \ + mingw-w64-x86_64-python \ + mingw-w64-x86_64-python-setuptools \ + mingw-w64-x86_64-toolchain \ + mingw-w64-x86_64-SDL2 \ + mingw-w64-x86_64-SDL2_image \ + mingw-w64-x86_64-gtk3 \ + mingw-w64-x86_64-glib2 \ + mingw-w64-x86_64-ninja \ + mingw-w64-x86_64-jemalloc \ + mingw-w64-x86_64-lzo2 \ + mingw-w64-x86_64-zstd \ + mingw-w64-x86_64-libjpeg-turbo \ + mingw-w64-x86_64-pixman \ + mingw-w64-x86_64-libgcrypt \ + mingw-w64-x86_64-libpng \ + mingw-w64-x86_64-libssh \ + mingw-w64-x86_64-libxml2 \ + mingw-w64-x86_64-snappy \ + mingw-w64-x86_64-libusb \
.cirrus.yml macos_xcode_task:
Quoted 10 lines
.cirrus.yml +7
-2+ mingw-w64-x86_64-usbredir \ + mingw-w64-x86_64-libtasn1 \ + mingw-w64-x86_64-nettle \ + mingw-w64-x86_64-cyrus-sasl \ + mingw-w64-x86_64-curl \ + mingw-w64-x86_64-gnutls \ + " install_script: - - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && - curl -O
http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
"
.cirrus.yml macos_xcode_task: · line 64
Quoted 2 lines
.cirrus.yml +0
-2- - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && - curl -O
http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
"
.cirrus.yml macos_xcode_task:
Quoted 4 lines
.cirrus.yml +0
-4- - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && - pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" - - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Sy" - - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S
--needed
.cirrus.yml macos_xcode_task:
Quoted 4 lines
.cirrus.yml +0
-4- bash pacman pacman-mirrors msys2-runtime" - - taskkill /F /IM gpg-agent.exe - - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su" - - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S
--needed
Quoted 28 lines
.cirrus.yml +0
-28- base-devel - git - mingw-w64-x86_64-python - mingw-w64-x86_64-python-setuptools - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-capstone - mingw-w64-x86_64-SDL2 - mingw-w64-x86_64-SDL2_image - mingw-w64-x86_64-gtk3 - mingw-w64-x86_64-glib2 - mingw-w64-x86_64-ninja - mingw-w64-x86_64-make - mingw-w64-x86_64-lzo2 - mingw-w64-x86_64-zstd - mingw-w64-x86_64-libjpeg-turbo - mingw-w64-x86_64-pixman - mingw-w64-x86_64-libgcrypt - mingw-w64-x86_64-libpng - mingw-w64-x86_64-libssh - mingw-w64-x86_64-libxml2 - mingw-w64-x86_64-snappy - mingw-w64-x86_64-libusb - mingw-w64-x86_64-usbredir - mingw-w64-x86_64-libtasn1 - mingw-w64-x86_64-nettle - mingw-w64-x86_64-cyrus-sasl - mingw-w64-x86_64-curl - mingw-w64-x86_64-gnutls
.cirrus.yml macos_xcode_task:
Quoted 10 lines
.cirrus.yml +4
-1- mingw-w64-x86_64-zstd" + - | + Write-Output $env:PATH + C:\tools\msys64\usr\bin\bash.exe -lc "export" + script: - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build" - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3 --ninja=ninja
--target-list-exclude=i386-softmmu,arm-softmmu,ppc-softmmu,mips-softmmu"
.cirrus.yml macos_xcode_task: · line 107
Quoted 1 line
.cirrus.yml +0
-1- - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make
-j$NUMBER_OF_PROCESSORS"
Quoted 6 lines
.cirrus.yml +1
-1+ - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j8" test_script: - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check" --2.28.0.windows.1
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
PATCH v4 2/2 cirrus: msys2/mingw speed is up, add excluded target back
In reply to Yonggang LuoThe following target are add back:
i386-softmmu,arm-softmmu,ppc-softmmu,mips-softmmu
--- .cirrus.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
.cirrus.yml +1 -2
@@ -116,8 +116,7 @@ windows_msys2_task: script: - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build" - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure - --python=python3 --ninja=ninja - --target-list-exclude=i386-softmmu,arm-softmmu,ppc-softmmu,mips-softmmu" + --python=python3 --ninja=ninja" - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j8" test_script: - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check"
Signature · 1 line
2.28.0.windows.1
Quoted 1 line · Yonggang Luo
Fixes the broken msys2/mingw ci and speed it up.
Queued to testing/next, thanks.
<snip>
Signature · 1 line
Alex Bennée
Quoted 7 lines · Alex Bennée
Quoted 1 line · Yonggang Luo
Fixes the broken msys2/mingw ci and speed it up.
Queued to testing/next, thanks.
Hi alex, still have issue, the cirrus cache are rather slow, waiting for my v5 version
Quoted 5 lines
<snip>
--
Alex Bennée
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Quoted 10 lines · 罗勇刚(Yonggang Luo)
Quoted 7 lines · Alex Bennée
Quoted 1 line · Yonggang Luo
Fixes the broken msys2/mingw ci and speed it up.
Queued to testing/next, thanks.
Hi alex, still have issue, the cirrus cache are rather slow, waiting for my v5 version
OK, will keep an eye out.
Quoted 5 lines
Quoted 5 lines
<snip>
--
Alex Bennée
Signature · 1 line
Alex Bennée