blob: f4bf49b7044e7e0ed3361740ee2f6b0ea9c10641 [file] [log] [blame]
Thomas Huth4966c5b2019-03-03 15:42:59 +01001env:
2 CIRRUS_CLONE_DEPTH: 1
3
Yonggang Luo114daec2020-09-15 20:13:07 +08004freebsd_12_task:
Ed Maste7162fbb2019-01-22 17:25:58 +00005 freebsd_instance:
Thomas Huthe5b024b2021-03-23 16:52:58 +00006 image_family: freebsd-12-2
Yonggang Luo114daec2020-09-15 20:13:07 +08007 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
Paolo Bonzini345d7052020-08-13 09:58:50 -040012 nettle perl5 pixman pkgconf png usbredir ninja
Ed Maste7162fbb2019-01-22 17:25:58 +000013 script:
14 - mkdir build
15 - cd build
Thomas Huthe5b024b2021-03-23 16:52:58 +000016 # 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; }
Thomas Huth45f7b7b2020-08-24 08:25:21 +020020 - gmake -j$(sysctl -n hw.ncpu)
Paolo Bonzini2a5a79d2020-10-07 17:00:37 +010021 - gmake -j$(sysctl -n hw.ncpu) check V=1
Thomas Huth4966c5b2019-03-03 15:42:59 +010022
23macos_task:
24 osx_instance:
Thomas Huth7498e6a2020-07-24 15:18:56 +020025 image: catalina-base
Thomas Huth4966c5b2019-03-03 15:42:59 +010026 install_script:
Paolo Bonzini345d7052020-08-13 09:58:50 -040027 - brew install pkg-config python gnu-sed glib pixman make sdl2 bash ninja
Thomas Huth4966c5b2019-03-03 15:42:59 +010028 script:
Paolo Bonzinibc4486f2019-12-11 15:33:49 +010029 - mkdir build
30 - cd build
Thomas Huthd76efed2020-07-27 17:24:26 +020031 - ../configure --python=/usr/local/bin/python3 --enable-werror
32 --extra-cflags='-Wno-error=deprecated-declarations'
Paolo Bonzinic47110d2020-10-16 05:49:28 -040033 || { cat config.log meson-logs/meson-log.txt; exit 1; }
Thomas Huth4966c5b2019-03-03 15:42:59 +010034 - gmake -j$(sysctl -n hw.ncpu)
Daniel P. Berrangéaf229fc2021-01-06 11:41:59 +000035 - 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
Alex Bennéefc844712019-10-16 19:27:13 +010040
41macos_xcode_task:
42 osx_instance:
43 # this is an alias for the latest Xcode
Thomas Huth7498e6a2020-07-24 15:18:56 +020044 image: catalina-xcode
Alex Bennéefc844712019-10-16 19:27:13 +010045 install_script:
Paolo Bonzini345d7052020-08-13 09:58:50 -040046 - brew install pkg-config gnu-sed glib pixman make sdl2 bash ninja
Alex Bennéefc844712019-10-16 19:27:13 +010047 script:
Paolo Bonzinibc4486f2019-12-11 15:33:49 +010048 - mkdir build
49 - cd build
Paolo Bonzinida0dfe22020-10-20 05:18:17 -040050 - ../configure --extra-cflags='-Wno-error=deprecated-declarations' --enable-modules
Paolo Bonzinic47110d2020-10-16 05:49:28 -040051 --enable-werror --cc=clang || { cat config.log meson-logs/meson-log.txt; exit 1; }
Alex Bennéefc844712019-10-16 19:27:13 +010052 - gmake -j$(sysctl -n hw.ncpu)
Daniel P. Berrangéaf229fc2021-01-06 11:41:59 +000053 - 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
Yonggang Luob1788882020-09-15 20:13:16 +080058
59windows_msys2_task:
Yonggang Luo0026b332020-10-07 17:00:20 +010060 timeout_in: 90m
Yonggang Luob1788882020-09-15 20:13:16 +080061 windows_container:
Yonggang Luo0026b332020-10-07 17:00:20 +010062 image: cirrusci/windowsservercore:2019
Yonggang Luob1788882020-09-15 20:13:16 +080063 os_version: 2019
64 cpu: 8
65 memory: 8G
66 env:
Yonggang Luo0026b332020-10-07 17:00:20 +010067 CIRRUS_SHELL: powershell
Yonggang Luob1788882020-09-15 20:13:16 +080068 MSYS: winsymlinks:nativestrict
69 MSYSTEM: MINGW64
Thomas Huth568740b2021-04-27 20:55:24 +020070 MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/2021-04-19/msys2-base-x86_64-20210419.sfx.exe
Yonggang Luo29c7ac42021-01-07 02:19:16 -080071 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 "
Yonggang Luob1788882020-09-15 20:13:16 +0800101 CHERE_INVOKING: 1
Yonggang Luo0026b332020-10-07 17:00:20 +0100102 msys2_cache:
103 folder: C:\tools\archive
104 reupload_on_changes: false
Yonggang Luo29c7ac42021-01-07 02:19:16 -0800105 # 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
Yonggang Luo0026b332020-10-07 17:00:20 +0100113 populate_script:
114 - |
Yonggang Luo29c7ac42021-01-07 02:19:16 -0800115 md -Force C:\tools\archive\pkg
Yonggang Luo0026b332020-10-07 17:00:20 +0100116 $start_time = Get-Date
Yonggang Luo29c7ac42021-01-07 02:19:16 -0800117 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))"
Yonggang Luo0026b332020-10-07 17:00:20 +0100119 cd C:\tools
Yonggang Luo29c7ac42021-01-07 02:19:16 -0800120 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
Yonggang Luo0026b332020-10-07 17:00:20 +0100125 ((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"
Yonggang Luo0026b332020-10-07 17:00:20 +0100128 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"
Thomas Huth568740b2021-04-27 20:55:24 +0200133 C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syuu --overwrite=*"
Yonggang Luo29c7ac42021-01-07 02:19:16 -0800134 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
Yonggang Luob1788882020-09-15 20:13:16 +0800151 install_script:
Yonggang Luo0026b332020-10-07 17:00:20 +0100152 - |
Yonggang Luo29c7ac42021-01-07 02:19:16 -0800153 $start_time = Get-Date
Yonggang Luo0026b332020-10-07 17:00:20 +0100154 cd C:\tools
Yonggang Luo29c7ac42021-01-07 02:19:16 -0800155 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))"
Yonggang Luob1788882020-09-15 20:13:16 +0800158 script:
159 - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build"
Paolo Bonzini6ebd89c2020-10-15 03:20:45 -0400160 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3"
Yonggang Luo0026b332020-10-07 17:00:20 +0100161 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j8"
Yonggang Luodc835392021-01-07 02:19:15 -0800162 - exit $LastExitCode
Yonggang Luob1788882020-09-15 20:13:16 +0800163 test_script:
164 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check"
Yonggang Luodc835392021-01-07 02:19:15 -0800165 - exit $LastExitCode