Thomas Huth | 4966c5b | 2019-03-03 15:42:59 +0100 | [diff] [blame] | 1 | env: |
| 2 | CIRRUS_CLONE_DEPTH: 1 |
| 3 | |
Yonggang Luo | b178888 | 2020-09-15 20:13:16 +0800 | [diff] [blame] | 4 | windows_msys2_task: |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 5 | timeout_in: 90m |
Yonggang Luo | b178888 | 2020-09-15 20:13:16 +0800 | [diff] [blame] | 6 | windows_container: |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 7 | image: cirrusci/windowsservercore:2019 |
Yonggang Luo | b178888 | 2020-09-15 20:13:16 +0800 | [diff] [blame] | 8 | os_version: 2019 |
| 9 | cpu: 8 |
| 10 | memory: 8G |
| 11 | env: |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 12 | CIRRUS_SHELL: powershell |
Bin Meng | 6ad5208 | 2022-07-25 15:05:11 +0100 | [diff] [blame] | 13 | MSYS: winsymlinks:native |
Yonggang Luo | b178888 | 2020-09-15 20:13:16 +0800 | [diff] [blame] | 14 | MSYSTEM: MINGW64 |
Yonggang Luo | fc2cc19 | 2022-07-29 04:04:22 +0800 | [diff] [blame] | 15 | MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/2022-06-03/msys2-base-x86_64-20220603.sfx.exe |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 16 | MSYS2_FINGERPRINT: 0 |
| 17 | MSYS2_PACKAGES: " |
| 18 | diffutils git grep make pkg-config sed |
| 19 | mingw-w64-x86_64-python |
| 20 | mingw-w64-x86_64-python-sphinx |
| 21 | mingw-w64-x86_64-toolchain |
| 22 | mingw-w64-x86_64-SDL2 |
| 23 | mingw-w64-x86_64-SDL2_image |
| 24 | mingw-w64-x86_64-gtk3 |
| 25 | mingw-w64-x86_64-glib2 |
| 26 | mingw-w64-x86_64-ninja |
| 27 | mingw-w64-x86_64-jemalloc |
| 28 | mingw-w64-x86_64-lzo2 |
| 29 | mingw-w64-x86_64-zstd |
| 30 | mingw-w64-x86_64-libjpeg-turbo |
| 31 | mingw-w64-x86_64-pixman |
| 32 | mingw-w64-x86_64-libgcrypt |
| 33 | mingw-w64-x86_64-libpng |
| 34 | mingw-w64-x86_64-libssh |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 35 | mingw-w64-x86_64-snappy |
| 36 | mingw-w64-x86_64-libusb |
| 37 | mingw-w64-x86_64-usbredir |
| 38 | mingw-w64-x86_64-libtasn1 |
| 39 | mingw-w64-x86_64-nettle |
| 40 | mingw-w64-x86_64-cyrus-sasl |
| 41 | mingw-w64-x86_64-curl |
| 42 | mingw-w64-x86_64-gnutls |
| 43 | mingw-w64-x86_64-libnfs |
| 44 | " |
Yonggang Luo | b178888 | 2020-09-15 20:13:16 +0800 | [diff] [blame] | 45 | CHERE_INVOKING: 1 |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 46 | msys2_cache: |
| 47 | folder: C:\tools\archive |
| 48 | reupload_on_changes: false |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 49 | # These env variables are used to generate fingerprint to trigger the cache procedure |
| 50 | # If wanna to force re-populate msys2, increase MSYS2_FINGERPRINT |
| 51 | fingerprint_script: |
| 52 | - | |
| 53 | echo $env:CIRRUS_TASK_NAME |
| 54 | echo $env:MSYS2_URL |
| 55 | echo $env:MSYS2_FINGERPRINT |
| 56 | echo $env:MSYS2_PACKAGES |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 57 | populate_script: |
| 58 | - | |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 59 | md -Force C:\tools\archive\pkg |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 60 | $start_time = Get-Date |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 61 | bitsadmin /transfer msys_download /dynamic /download /priority FOREGROUND $env:MSYS2_URL C:\tools\archive\base.exe |
| 62 | Write-Output "Download time taken: $((Get-Date).Subtract($start_time))" |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 63 | cd C:\tools |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 64 | C:\tools\archive\base.exe -y |
| 65 | del -Force C:\tools\archive\base.exe |
| 66 | Write-Output "Base install time taken: $((Get-Date).Subtract($start_time))" |
| 67 | $start_time = Get-Date |
| 68 | |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 69 | ((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 |
| 70 | C:\tools\msys64\usr\bin\bash.exe -lc "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf" |
| 71 | C:\tools\msys64\usr\bin\bash.exe -lc "export" |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 72 | C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Sy |
| 73 | echo Y | C:\tools\msys64\usr\bin\pacman.exe --noconfirm -Suu --overwrite=* |
| 74 | taskkill /F /FI "MODULES eq msys-2.0.dll" |
| 75 | tasklist |
| 76 | C:\tools\msys64\usr\bin\bash.exe -lc "mv -f /etc/pacman.conf.pacnew /etc/pacman.conf || true" |
Thomas Huth | 568740b | 2021-04-27 20:55:24 +0200 | [diff] [blame] | 77 | C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syuu --overwrite=*" |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 78 | Write-Output "Core install time taken: $((Get-Date).Subtract($start_time))" |
| 79 | $start_time = Get-Date |
| 80 | |
| 81 | C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed $env:MSYS2_PACKAGES" |
| 82 | Write-Output "Package install time taken: $((Get-Date).Subtract($start_time))" |
| 83 | $start_time = Get-Date |
| 84 | |
| 85 | del -Force -ErrorAction SilentlyContinue C:\tools\msys64\etc\mtab |
| 86 | del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\fd |
| 87 | del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stderr |
| 88 | del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stdin |
| 89 | del -Force -ErrorAction SilentlyContinue C:\tools\msys64\dev\stdout |
| 90 | del -Force -Recurse -ErrorAction SilentlyContinue C:\tools\msys64\var\cache\pacman\pkg |
| 91 | tar cf C:\tools\archive\msys64.tar -C C:\tools\ msys64 |
| 92 | |
| 93 | Write-Output "Package archive time taken: $((Get-Date).Subtract($start_time))" |
| 94 | del -Force -Recurse -ErrorAction SilentlyContinue c:\tools\msys64 |
Yonggang Luo | b178888 | 2020-09-15 20:13:16 +0800 | [diff] [blame] | 95 | install_script: |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 96 | - | |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 97 | $start_time = Get-Date |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 98 | cd C:\tools |
Yonggang Luo | 29c7ac4 | 2021-01-07 02:19:16 -0800 | [diff] [blame] | 99 | ls C:\tools\archive\msys64.tar |
| 100 | tar xf C:\tools\archive\msys64.tar |
| 101 | Write-Output "Extract msys2 time taken: $((Get-Date).Subtract($start_time))" |
Yonggang Luo | b178888 | 2020-09-15 20:13:16 +0800 | [diff] [blame] | 102 | script: |
| 103 | - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build" |
Paolo Bonzini | 6ebd89c | 2020-10-15 03:20:45 -0400 | [diff] [blame] | 104 | - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3" |
Yonggang Luo | 0026b33 | 2020-10-07 17:00:20 +0100 | [diff] [blame] | 105 | - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j8" |
Yonggang Luo | dc83539 | 2021-01-07 02:19:15 -0800 | [diff] [blame] | 106 | - exit $LastExitCode |
Yonggang Luo | b178888 | 2020-09-15 20:13:16 +0800 | [diff] [blame] | 107 | test_script: |
| 108 | - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check" |
Yonggang Luo | dc83539 | 2021-01-07 02:19:15 -0800 | [diff] [blame] | 109 | - exit $LastExitCode |