]> git.proxmox.com Git - mirror_qemu.git/blame - .cirrus.yml
cirrus.yml: Fix the MSYS2 task
[mirror_qemu.git] / .cirrus.yml
CommitLineData
4966c5bd
TH
1env:
2 CIRRUS_CLONE_DEPTH: 1
3
114daec3 4freebsd_12_task:
7162fbb4 5 freebsd_instance:
e5b024b9 6 image_family: freebsd-12-2
114daec3
YL
7 cpu: 8
8 memory: 8G
9 install_script:
10 - ASSUME_ALWAYS_YES=yes pkg bootstrap -f ;
11 - pkg install -y bash curl cyrus-sasl git glib gmake gnutls gsed
345d7053 12 nettle perl5 pixman pkgconf png usbredir ninja
7162fbb4
EM
13 script:
14 - mkdir build
15 - cd build
e5b024b9
TH
16 # TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed
17 # See: https://gitlab.com/gnutls/libtasn1/-/merge_requests/71
18 - ../configure --enable-werror --disable-gnutls
19 || { cat config.log meson-logs/meson-log.txt; exit 1; }
45f7b7b9 20 - gmake -j$(sysctl -n hw.ncpu)
2a5a79d1 21 - gmake -j$(sysctl -n hw.ncpu) check V=1
4966c5bd
TH
22
23macos_task:
24 osx_instance:
7498e6af 25 image: catalina-base
4966c5bd 26 install_script:
345d7053 27 - brew install pkg-config python gnu-sed glib pixman make sdl2 bash ninja
4966c5bd 28 script:
bc4486fb
PB
29 - mkdir build
30 - cd build
d76efeda
TH
31 - ../configure --python=/usr/local/bin/python3 --enable-werror
32 --extra-cflags='-Wno-error=deprecated-declarations'
c47110d9 33 || { cat config.log meson-logs/meson-log.txt; exit 1; }
4966c5bd 34 - gmake -j$(sysctl -n hw.ncpu)
af229fc3
DB
35 - gmake check-unit V=1
36 - gmake check-block V=1
37 - gmake check-qapi-schema V=1
38 - gmake check-softfloat V=1
39 - gmake check-qtest-x86_64 V=1
fc84471a
AB
40
41macos_xcode_task:
42 osx_instance:
43 # this is an alias for the latest Xcode
7498e6af 44 image: catalina-xcode
fc84471a 45 install_script:
345d7053 46 - brew install pkg-config gnu-sed glib pixman make sdl2 bash ninja
fc84471a 47 script:
bc4486fb
PB
48 - mkdir build
49 - cd build
da0dfe25 50 - ../configure --extra-cflags='-Wno-error=deprecated-declarations' --enable-modules
c47110d9 51 --enable-werror --cc=clang || { cat config.log meson-logs/meson-log.txt; exit 1; }
fc84471a 52 - gmake -j$(sysctl -n hw.ncpu)
af229fc3
DB
53 - gmake check-unit V=1
54 - gmake check-block V=1
55 - gmake check-qapi-schema V=1
56 - gmake check-softfloat V=1
57 - gmake check-qtest-x86_64 V=1
b1788880
YL
58
59windows_msys2_task:
0026b339 60 timeout_in: 90m
b1788880 61 windows_container:
0026b339 62 image: cirrusci/windowsservercore:2019
b1788880
YL
63 os_version: 2019
64 cpu: 8
65 memory: 8G
66 env:
0026b339 67 CIRRUS_SHELL: powershell
b1788880
YL
68 MSYS: winsymlinks:nativestrict
69 MSYSTEM: MINGW64
568740be 70 MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/2021-04-19/msys2-base-x86_64-20210419.sfx.exe
29c7ac48
YL
71 MSYS2_FINGERPRINT: 0
72 MSYS2_PACKAGES: "
73 diffutils git grep make pkg-config sed
74 mingw-w64-x86_64-python
75 mingw-w64-x86_64-python-sphinx
76 mingw-w64-x86_64-toolchain
77 mingw-w64-x86_64-SDL2
78 mingw-w64-x86_64-SDL2_image
79 mingw-w64-x86_64-gtk3
80 mingw-w64-x86_64-glib2
81 mingw-w64-x86_64-ninja
82 mingw-w64-x86_64-jemalloc
83 mingw-w64-x86_64-lzo2
84 mingw-w64-x86_64-zstd
85 mingw-w64-x86_64-libjpeg-turbo
86 mingw-w64-x86_64-pixman
87 mingw-w64-x86_64-libgcrypt
88 mingw-w64-x86_64-libpng
89 mingw-w64-x86_64-libssh
90 mingw-w64-x86_64-libxml2
91 mingw-w64-x86_64-snappy
92 mingw-w64-x86_64-libusb
93 mingw-w64-x86_64-usbredir
94 mingw-w64-x86_64-libtasn1
95 mingw-w64-x86_64-nettle
96 mingw-w64-x86_64-cyrus-sasl
97 mingw-w64-x86_64-curl
98 mingw-w64-x86_64-gnutls
99 mingw-w64-x86_64-libnfs
100 "
b1788880 101 CHERE_INVOKING: 1
0026b339
YL
102 msys2_cache:
103 folder: C:\tools\archive
104 reupload_on_changes: false
29c7ac48
YL
105 # These env variables are used to generate fingerprint to trigger the cache procedure
106 # If wanna to force re-populate msys2, increase MSYS2_FINGERPRINT
107 fingerprint_script:
108 - |
109 echo $env:CIRRUS_TASK_NAME
110 echo $env:MSYS2_URL
111 echo $env:MSYS2_FINGERPRINT
112 echo $env:MSYS2_PACKAGES
0026b339
YL
113 populate_script:
114 - |
29c7ac48 115 md -Force C:\tools\archive\pkg
0026b339 116 $start_time = Get-Date
29c7ac48
YL
117 bitsadmin /transfer msys_download /dynamic /download /priority FOREGROUND $env:MSYS2_URL C:\tools\archive\base.exe
118 Write-Output "Download time taken: $((Get-Date).Subtract($start_time))"
0026b339 119 cd C:\tools
29c7ac48
YL
120 C:\tools\archive\base.exe -y
121 del -Force C:\tools\archive\base.exe
122 Write-Output "Base install time taken: $((Get-Date).Subtract($start_time))"
123 $start_time = Get-Date
124
0026b339
YL
125 ((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
126 C:\tools\msys64\usr\bin\bash.exe -lc "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
127 C:\tools\msys64\usr\bin\bash.exe -lc "export"
0026b339
YL
128 C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Sy
129 echo Y | C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Suu --overwrite=*
130 taskkill /F /FI "MODULES eq msys-2.0.dll"
131 tasklist
132 C:\tools\msys64\usr\bin\bash.exe -lc "mv -f /etc/pacman.conf.pacnew /etc/pacman.conf || true"
568740be 133 C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syuu --overwrite=*"
29c7ac48
YL
134 Write-Output "Core install time taken: $((Get-Date).Subtract($start_time))"
135 $start_time = Get-Date
136
137 C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed $env:MSYS2_PACKAGES"
138 Write-Output "Package install time taken: $((Get-Date).Subtract($start_time))"
139 $start_time = Get-Date
140
141 del -Force -ErrorAction SilentlyContinue C:\tools\msys64\etc\mtab
142 del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\fd
143 del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stderr
144 del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stdin
145 del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stdout
146 del -Force -Recurse -ErrorAction SilentlyContinue C:\tools\msys64\var\cache\pacman\pkg
147 tar cf C:\tools\archive\msys64.tar -C C:\tools\ msys64
148
149 Write-Output "Package archive time taken: $((Get-Date).Subtract($start_time))"
150 del -Force -Recurse -ErrorAction SilentlyContinue c:\tools\msys64
b1788880 151 install_script:
0026b339 152 - |
29c7ac48 153 $start_time = Get-Date
0026b339 154 cd C:\tools
29c7ac48
YL
155 ls C:\tools\archive\msys64.tar
156 tar xf C:\tools\archive\msys64.tar
157 Write-Output "Extract msys2 time taken: $((Get-Date).Subtract($start_time))"
b1788880
YL
158 script:
159 - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build"
6ebd89cf 160 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3"
0026b339 161 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j8"
dc835398 162 - exit $LastExitCode
b1788880
YL
163 test_script:
164 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check"
dc835398 165 - exit $LastExitCode