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