xref: /openbmc/qemu/.gitlab-ci.d/windows.yml (revision dbdf841b)
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: 80m
14  artifacts:
15    name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
16    expire_in: 7 days
17    paths:
18      - build/meson-logs/testlog.txt
19    reports:
20      junit: "build/meson-logs/testlog.junit.xml"
21  before_script:
22  - If ( !(Test-Path -Path msys64\var\cache ) ) {
23      mkdir msys64\var\cache
24    }
25  - If ( !(Test-Path -Path msys64\var\cache\msys2.exe ) ) {
26      Invoke-WebRequest
27      "https://github.com/msys2/msys2-installer/releases/download/2022-06-03/msys2-base-x86_64-20220603.sfx.exe"
28      -outfile "msys64\var\cache\msys2.exe"
29    }
30  - msys64\var\cache\msys2.exe -y
31  - ((Get-Content -path .\msys64\etc\\post-install\\07-pacman-key.post -Raw)
32      -replace '--refresh-keys', '--version') |
33     Set-Content -Path ${CI_PROJECT_DIR}\msys64\etc\\post-install\\07-pacman-key.post
34  - .\msys64\usr\bin\bash -lc "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
35  - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Core update
36  - .\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'  # Normal update
37  - taskkill /F /FI "MODULES eq msys-2.0.dll"
38
39msys2-64bit:
40  extends: .shared_msys2_builder
41  script:
42  - .\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm --needed
43      bison diffutils flex
44      git grep make sed
45      mingw-w64-x86_64-capstone
46      mingw-w64-x86_64-curl
47      mingw-w64-x86_64-cyrus-sasl
48      mingw-w64-x86_64-dtc
49      mingw-w64-x86_64-gcc
50      mingw-w64-x86_64-glib2
51      mingw-w64-x86_64-gnutls
52      mingw-w64-x86_64-gtk3
53      mingw-w64-x86_64-libgcrypt
54      mingw-w64-x86_64-libjpeg-turbo
55      mingw-w64-x86_64-libnfs
56      mingw-w64-x86_64-libpng
57      mingw-w64-x86_64-libssh
58      mingw-w64-x86_64-libtasn1
59      mingw-w64-x86_64-libusb
60      mingw-w64-x86_64-lzo2
61      mingw-w64-x86_64-nettle
62      mingw-w64-x86_64-ninja
63      mingw-w64-x86_64-pixman
64      mingw-w64-x86_64-pkgconf
65      mingw-w64-x86_64-python
66      mingw-w64-x86_64-SDL2
67      mingw-w64-x86_64-SDL2_image
68      mingw-w64-x86_64-snappy
69      mingw-w64-x86_64-spice
70      mingw-w64-x86_64-usbredir
71      mingw-w64-x86_64-zstd "
72  - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
73  - $env:MSYSTEM = 'MINGW64'     # Start a 64-bit MinGW environment
74  - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
75  - mkdir build
76  - cd build
77  # Note: do not remove "--without-default-devices"!
78  # commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices"
79  # changed to compile QEMU with the --without-default-devices switch
80  # for the msys2 64-bit job, due to the build could not complete within
81  # the project timeout.
82  - ..\msys64\usr\bin\bash -lc '../configure --target-list=x86_64-softmmu
83      --without-default-devices --enable-fdt=system'
84  - ..\msys64\usr\bin\bash -lc 'make'
85  # qTests don't run successfully with "--without-default-devices",
86  # so let's exclude the qtests from CI for now.
87  - ..\msys64\usr\bin\bash -lc 'make check MTESTARGS=\"--no-suite qtest\" || { cat meson-logs/testlog.txt; exit 1; } ;'
88
89msys2-32bit:
90  extends: .shared_msys2_builder
91  script:
92  - .\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm --needed
93      bison diffutils flex
94      git grep make sed
95      mingw-w64-i686-capstone
96      mingw-w64-i686-curl
97      mingw-w64-i686-cyrus-sasl
98      mingw-w64-i686-dtc
99      mingw-w64-i686-gcc
100      mingw-w64-i686-glib2
101      mingw-w64-i686-gnutls
102      mingw-w64-i686-gtk3
103      mingw-w64-i686-libgcrypt
104      mingw-w64-i686-libjpeg-turbo
105      mingw-w64-i686-libnfs
106      mingw-w64-i686-libpng
107      mingw-w64-i686-libssh
108      mingw-w64-i686-libtasn1
109      mingw-w64-i686-libusb
110      mingw-w64-i686-lzo2
111      mingw-w64-i686-nettle
112      mingw-w64-i686-ninja
113      mingw-w64-i686-pixman
114      mingw-w64-i686-pkgconf
115      mingw-w64-i686-python
116      mingw-w64-i686-SDL2
117      mingw-w64-i686-SDL2_image
118      mingw-w64-i686-snappy
119      mingw-w64-i686-spice
120      mingw-w64-i686-usbredir
121      mingw-w64-i686-zstd "
122  - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
123  - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinGW environment
124  - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
125  - mkdir build
126  - cd build
127  - ..\msys64\usr\bin\bash -lc '../configure --target-list=ppc64-softmmu
128                                --enable-fdt=system'
129  - ..\msys64\usr\bin\bash -lc 'make'
130  - ..\msys64\usr\bin\bash -lc 'make check MTESTARGS=\"--no-suite qtest\" ||
131                                { cat meson-logs/testlog.txt; exit 1; }'
132