OSDN Git Service

gitlab: remove duplication between msys jobs
[qmiga/qemu.git] / .gitlab-ci.d / windows.yml
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   script:
39   - .\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm --needed
40       bison diffutils flex
41       git grep make sed
42       $MINGW_TARGET-capstone
43       $MINGW_TARGET-curl
44       $MINGW_TARGET-cyrus-sasl
45       $MINGW_TARGET-dtc
46       $MINGW_TARGET-gcc
47       $MINGW_TARGET-glib2
48       $MINGW_TARGET-gnutls
49       $MINGW_TARGET-gtk3
50       $MINGW_TARGET-libgcrypt
51       $MINGW_TARGET-libjpeg-turbo
52       $MINGW_TARGET-libnfs
53       $MINGW_TARGET-libpng
54       $MINGW_TARGET-libssh
55       $MINGW_TARGET-libtasn1
56       $MINGW_TARGET-libusb
57       $MINGW_TARGET-lzo2
58       $MINGW_TARGET-nettle
59       $MINGW_TARGET-ninja
60       $MINGW_TARGET-pixman
61       $MINGW_TARGET-pkgconf
62       $MINGW_TARGET-python
63       $MINGW_TARGET-SDL2
64       $MINGW_TARGET-SDL2_image
65       $MINGW_TARGET-snappy
66       $MINGW_TARGET-spice
67       $MINGW_TARGET-usbredir
68       $MINGW_TARGET-zstd "
69   - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
70   - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
71   - mkdir build
72   - cd build
73   - ..\msys64\usr\bin\bash -lc "../configure --enable-fdt=system $CONFIGURE_ARGS"
74   - ..\msys64\usr\bin\bash -lc "make"
75   - ..\msys64\usr\bin\bash -lc "make check MTESTARGS='$TEST_ARGS' || { cat meson-logs/testlog.txt; exit 1; } ;"
76
77 msys2-64bit:
78   extends: .shared_msys2_builder
79   variables:
80     MINGW_TARGET: mingw-w64-x86_64
81     MSYSTEM: MINGW64
82     # do not remove "--without-default-devices"!
83     # commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices"
84     # changed to compile QEMU with the --without-default-devices switch
85     # for the msys2 64-bit job, due to the build could not complete within
86     CONFIGURE_ARGS:  --target-list=x86_64-softmmu --without-default-devices
87     # qTests don't run successfully with "--without-default-devices",
88     # so let's exclude the qtests from CI for now.
89     TEST_ARGS: --no-suite qtest
90
91 msys2-32bit:
92   extends: .shared_msys2_builder
93   variables:
94     MINGW_TARGET: mingw-w64-i686
95     MSYSTEM: MINGW32
96     CONFIGURE_ARGS:  --target-list=ppc64-softmmu
97     TEST_ARGS: --no-suite qtest