blob: 4895987da4e5fb3ba95db00dda22992de61bf920 [file] [log] [blame]
Thomas Huth4966c5b2019-03-03 15:42:59 +01001env:
2 CIRRUS_CLONE_DEPTH: 1
3
Yonggang Luob1788882020-09-15 20:13:16 +08004windows_msys2_task:
Yonggang Luo0026b332020-10-07 17:00:20 +01005 timeout_in: 90m
Yonggang Luob1788882020-09-15 20:13:16 +08006 windows_container:
Yonggang Luo0026b332020-10-07 17:00:20 +01007 image: cirrusci/windowsservercore:2019
Yonggang Luob1788882020-09-15 20:13:16 +08008 os_version: 2019
9 cpu: 8
10 memory: 8G
11 env:
Yonggang Luo0026b332020-10-07 17:00:20 +010012 CIRRUS_SHELL: powershell
Bin Meng6ad52082022-07-25 15:05:11 +010013 MSYS: winsymlinks:native
Yonggang Luob1788882020-09-15 20:13:16 +080014 MSYSTEM: MINGW64
Yonggang Luofc2cc192022-07-29 04:04:22 +080015 MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/2022-06-03/msys2-base-x86_64-20220603.sfx.exe
Yonggang Luo29c7ac42021-01-07 02:19:16 -080016 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 Luo29c7ac42021-01-07 02:19:16 -080035 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 Luob1788882020-09-15 20:13:16 +080045 CHERE_INVOKING: 1
Yonggang Luo0026b332020-10-07 17:00:20 +010046 msys2_cache:
47 folder: C:\tools\archive
48 reupload_on_changes: false
Yonggang Luo29c7ac42021-01-07 02:19:16 -080049 # 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 Luo0026b332020-10-07 17:00:20 +010057 populate_script:
58 - |
Yonggang Luo29c7ac42021-01-07 02:19:16 -080059 md -Force C:\tools\archive\pkg
Yonggang Luo0026b332020-10-07 17:00:20 +010060 $start_time = Get-Date
Yonggang Luo29c7ac42021-01-07 02:19:16 -080061 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 Luo0026b332020-10-07 17:00:20 +010063 cd C:\tools
Yonggang Luo29c7ac42021-01-07 02:19:16 -080064 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 Luo0026b332020-10-07 17:00:20 +010069 ((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 Luo0026b332020-10-07 17:00:20 +010072 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 Huth568740b2021-04-27 20:55:24 +020077 C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Syuu --overwrite=*"
Yonggang Luo29c7ac42021-01-07 02:19:16 -080078 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 Luob1788882020-09-15 20:13:16 +080095 install_script:
Yonggang Luo0026b332020-10-07 17:00:20 +010096 - |
Yonggang Luo29c7ac42021-01-07 02:19:16 -080097 $start_time = Get-Date
Yonggang Luo0026b332020-10-07 17:00:20 +010098 cd C:\tools
Yonggang Luo29c7ac42021-01-07 02:19:16 -080099 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 Luob1788882020-09-15 20:13:16 +0800102 script:
103 - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build"
Paolo Bonzini6ebd89c2020-10-15 03:20:45 -0400104 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3"
Yonggang Luo0026b332020-10-07 17:00:20 +0100105 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j8"
Yonggang Luodc835392021-01-07 02:19:15 -0800106 - exit $LastExitCode
Yonggang Luob1788882020-09-15 20:13:16 +0800107 test_script:
108 - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check"
Yonggang Luodc835392021-01-07 02:19:15 -0800109 - exit $LastExitCode