xref: /openbmc/qemu/.gitlab-ci.d/windows.yml (revision d6cd3ae0)
1.shared_msys2_builder:
2  tags:
3  - shared-windows
4  - windows
5  - windows-1809
6  cache:
7    key: "${CI_JOB_NAME}-cache"
8    paths:
9      - ${CI_PROJECT_DIR}/msys64/var/cache
10  needs: []
11  stage: build
12  timeout: 70m
13  before_script:
14  - If ( !(Test-Path -Path msys64\var\cache ) ) {
15      mkdir msys64\var\cache
16    }
17  - If ( !(Test-Path -Path msys64\var\cache\msys2.exe ) ) {
18      Invoke-WebRequest
19      "https://github.com/msys2/msys2-installer/releases/download/2022-05-03/msys2-base-x86_64-20220503.sfx.exe"
20      -outfile "msys64\var\cache\msys2.exe"
21    }
22  - msys64\var\cache\msys2.exe -y
23  - ((Get-Content -path .\msys64\etc\\post-install\\07-pacman-key.post -Raw)
24      -replace '--refresh-keys', '--version') |
25     Set-Content -Path ${CI_PROJECT_DIR}\msys64\etc\\post-install\\07-pacman-key.post
26  - .\msys64\usr\bin\bash -lc "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
27  - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Core update
28  - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Normal update
29  - taskkill /F /FI "MODULES eq msys-2.0.dll"
30
31msys2-64bit:
32  extends: .shared_msys2_builder
33  script:
34  - .\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm --needed
35      diffutils git grep make sed
36      mingw-w64-x86_64-capstone
37      mingw-w64-x86_64-curl
38      mingw-w64-x86_64-cyrus-sasl
39      mingw-w64-x86_64-gcc
40      mingw-w64-x86_64-glib2
41      mingw-w64-x86_64-gnutls
42      mingw-w64-x86_64-libnfs
43      mingw-w64-x86_64-libpng
44      mingw-w64-x86_64-libssh
45      mingw-w64-x86_64-libtasn1
46      mingw-w64-x86_64-libusb
47      mingw-w64-x86_64-nettle
48      mingw-w64-x86_64-ninja
49      mingw-w64-x86_64-pixman
50      mingw-w64-x86_64-pkgconf
51      mingw-w64-x86_64-python
52      mingw-w64-x86_64-SDL2
53      mingw-w64-x86_64-SDL2_image
54      mingw-w64-x86_64-snappy
55      mingw-w64-x86_64-usbredir
56      mingw-w64-x86_64-zstd "
57  - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
58  - $env:MSYSTEM = 'MINGW64'     # Start a 64 bit Mingw environment
59  - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu
60      --enable-capstone --without-default-devices'
61  - .\msys64\usr\bin\bash -lc "sed -i '/^ROMS=/d' build/config-host.mak"
62  - .\msys64\usr\bin\bash -lc 'make -j2'
63  - .\msys64\usr\bin\bash -lc 'make check'
64
65msys2-32bit:
66  extends: .shared_msys2_builder
67  script:
68  - .\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm --needed
69      diffutils git grep make sed
70      mingw-w64-i686-capstone
71      mingw-w64-i686-curl
72      mingw-w64-i686-cyrus-sasl
73      mingw-w64-i686-gcc
74      mingw-w64-i686-glib2
75      mingw-w64-i686-gnutls
76      mingw-w64-i686-gtk3
77      mingw-w64-i686-libgcrypt
78      mingw-w64-i686-libjpeg-turbo
79      mingw-w64-i686-libssh
80      mingw-w64-i686-libtasn1
81      mingw-w64-i686-libusb
82      mingw-w64-i686-lzo2
83      mingw-w64-i686-ninja
84      mingw-w64-i686-pixman
85      mingw-w64-i686-pkgconf
86      mingw-w64-i686-python
87      mingw-w64-i686-snappy
88      mingw-w64-i686-usbredir "
89  - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
90  - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinG environment
91  - mkdir output
92  - cd output
93  - ..\msys64\usr\bin\bash -lc "../configure --target-list=ppc64-softmmu"
94  - ..\msys64\usr\bin\bash -lc 'make -j2'
95  - ..\msys64\usr\bin\bash -lc 'make check'
96