1b55af81c7b9a590b3e0f9f9f12f61f4ab13af7b
[platform/upstream/mesa.git] / .gitlab-ci / container / debian / x86_test-vk.sh
1 #!/bin/bash
2 # The relative paths in this file only become valid at runtime.
3 # shellcheck disable=SC1091
4 # shellcheck disable=SC2086 # we want word splitting
5
6 set -e
7 set -o xtrace
8
9 export DEBIAN_FRONTEND=noninteractive
10
11 # Ephemeral packages (installed for this script and removed again at the end)
12 STABLE_EPHEMERAL=" \
13       ccache \
14       cmake \
15       g++ \
16       g++-mingw-w64-i686-posix \
17       g++-mingw-w64-x86-64-posix \
18       glslang-tools \
19       libexpat1-dev \
20       gnupg2 \
21       libgbm-dev \
22       libgles2-mesa-dev \
23       liblz4-dev \
24       libpciaccess-dev \
25       libudev-dev \
26       libvulkan-dev \
27       libwaffle-dev \
28       libx11-xcb-dev \
29       libxcb-ewmh-dev \
30       libxcb-keysyms1-dev \
31       libxkbcommon-dev \
32       libxrandr-dev \
33       libxrender-dev \
34       libzstd-dev \
35       meson \
36       mingw-w64-i686-dev \
37       mingw-w64-tools \
38       mingw-w64-x86-64-dev \
39       p7zip \
40       patch \
41       pkg-config \
42       python3-dev \
43       python3-distutils \
44       python3-pip \
45       python3-setuptools \
46       python3-wheel \
47       software-properties-common \
48       wget \
49       wine64-tools \
50       xz-utils \
51       "
52
53 apt-get install -y --no-remove --no-install-recommends \
54       $STABLE_EPHEMERAL \
55       libepoxy0 \
56       libxcb-shm0 \
57       pciutils \
58       python3-lxml \
59       python3-simplejson \
60       xinit \
61       xserver-xorg-video-amdgpu \
62       xserver-xorg-video-ati
63
64 # Install a more recent version of Wine than exists in Debian.
65 apt-key add .gitlab-ci/container/debian/winehq.gpg.key
66 apt-add-repository https://dl.winehq.org/wine-builds/debian/
67 apt-get update -q
68
69 # Needed for Valve's tracing jobs to collect information about the graphics
70 # hardware on the test devices.
71 pip3 install gfxinfo-mupuf==0.0.9
72
73 # workaround wine needing 32-bit
74 # https://bugs.winehq.org/show_bug.cgi?id=53393
75 apt-get install -y --no-remove wine-stable-amd64  # a requirement for wine-stable
76 WINE_PKG="wine-stable"
77 WINE_PKG_DROP="wine-stable-i386"
78 apt-get download "${WINE_PKG}"
79 dpkg --ignore-depends="${WINE_PKG_DROP}" -i "${WINE_PKG}"*.deb
80 rm "${WINE_PKG}"*.deb
81 sed -i "/${WINE_PKG_DROP}/d" /var/lib/dpkg/status
82 apt-get install -y --no-remove winehq-stable  # symlinks-only, depends on wine-stable
83
84 ############### Install DXVK
85
86 . .gitlab-ci/container/setup-wine.sh "/dxvk-wine64"
87 . .gitlab-ci/container/install-wine-dxvk.sh
88
89 ############### Install apitrace binaries for wine
90
91 . .gitlab-ci/container/install-wine-apitrace.sh
92 # Add the apitrace path to the registry
93 wine64 \
94     reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
95     /v Path \
96     /t REG_EXPAND_SZ \
97     /d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\apitrace-msvc-win64\bin" \
98     /f
99
100 ############### Building ...
101
102 . .gitlab-ci/container/container_pre_build.sh
103
104 ############### Build parallel-deqp-runner's hang-detection tool
105
106 . .gitlab-ci/container/build-hang-detection.sh
107
108 ############### Build piglit
109
110 PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh
111
112 ############### Build Fossilize
113
114 . .gitlab-ci/container/build-fossilize.sh
115
116 ############### Build dEQP VK
117
118 . .gitlab-ci/container/build-deqp.sh
119
120 ############### Build apitrace
121
122 . .gitlab-ci/container/build-apitrace.sh
123
124 ############### Build gfxreconstruct
125
126 . .gitlab-ci/container/build-gfxreconstruct.sh
127
128 ############### Build VKD3D-Proton
129
130 . .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
131
132 . .gitlab-ci/container/build-vkd3d-proton.sh
133
134 ############### Uninstall the build software
135
136 ccache --show-stats
137
138 apt-get purge -y \
139       $STABLE_EPHEMERAL
140
141 apt-get autoremove -y --purge