0f544b3913e6bd86825f063868bfbda2c00c4075
[mesa.git] / .gitlab-ci / container / x86_test-vk.sh
1 #!/bin/bash
2
3 set -e
4 set -o xtrace
5
6 export DEBIAN_FRONTEND=noninteractive
7
8 # Ephemeral packages (installed for this script and removed again at the end)
9 STABLE_EPHEMERAL=" \
10 ccache \
11 cmake \
12 libgbm-dev \
13 libgles2-mesa-dev \
14 liblz4-dev \
15 libpng-dev \
16 libvulkan-dev \
17 libxcb-ewmh-dev \
18 libxcb-keysyms1-dev \
19 libxkbcommon-dev \
20 libxrandr-dev \
21 libxrender-dev \
22 meson \
23 p7zip \
24 pkg-config \
25 python3-distutils \
26 wget \
27 "
28
29 TESTING_EPHEMERAL=" \
30 g++ \
31 libc6-dev \
32 "
33
34 apt-get update
35
36 apt-get install -y --no-remove \
37 $STABLE_EPHEMERAL
38
39 # We need multiarch for Wine
40 dpkg --add-architecture i386
41
42 apt-get update
43
44 apt-get install -y --no-remove \
45 wine \
46 wine32 \
47 wine64
48
49 # Install packages we need from Debian testing last, to avoid pulling in more
50 apt-get install -y -t testing \
51 $TESTING_EPHEMERAL
52
53
54 ############### Set up Wine env variables
55
56 export WINEDEBUG="-all"
57 export WINEPREFIX="/dxvk-wine64"
58
59 ############### Install DXVK
60
61 DXVK_VERSION="1.6"
62
63 # We don't want crash dialogs
64 cat >crashdialog.reg <<EOF
65 Windows Registry Editor Version 5.00
66
67 [HKEY_CURRENT_USER\Software\Wine\WineDbg]
68 "ShowCrashDialog"=dword:00000000
69
70 EOF
71
72 # Set the wine prefix and disable the crash dialog
73 wine regedit crashdialog.reg
74 rm crashdialog.reg
75
76 # DXVK's setup often fails with:
77 # "${WINEPREFIX}: Not a valid wine prefix."
78 # and that is just spit because of checking the existance of the
79 # system.reg file, which fails.
80 # Just giving it a bit more of time for it to be created solves the
81 # problem ...
82 test -f "${WINEPREFIX}/system.reg" || sleep 2
83
84 wget "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
85 tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
86 dxvk-"${DXVK_VERSION}"/setup_dxvk.sh install
87 rm -rf dxvk-"${DXVK_VERSION}"
88 rm dxvk-"${DXVK_VERSION}".tar.gz
89
90 ############### Install Windows' apitrace binaries
91
92 APITRACE_VERSION="9.0"
93 APITRACE_VERSION_DATE="20191126"
94
95 wget "https://github.com/apitrace/apitrace/releases/download/${APITRACE_VERSION}/apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64.7z"
96 7zr x "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64.7z" \
97 "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64/bin/apitrace.exe" \
98 "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64/bin/d3dretrace.exe"
99 mv "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64" /apitrace-msvc-win64
100 rm "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64.7z"
101
102 # Add the apitrace path to the registry
103 wine \
104 reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
105 /v Path \
106 /t REG_EXPAND_SZ \
107 /d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\apitrace-msvc-win64\bin" \
108 /f
109
110 ############### Building ...
111
112 . .gitlab-ci/container/container_pre_build.sh
113
114 ############### Build dEQP runner
115
116 . .gitlab-ci/build-cts-runner.sh
117
118 ############### Build Fossilize
119
120 . .gitlab-ci/build-fossilize.sh
121
122 ############### Build dEQP VK
123
124 . .gitlab-ci/build-deqp-vk.sh
125
126 ############### Build gfxreconstruct
127
128 . .gitlab-ci/build-gfxreconstruct.sh
129
130 ############### Build VulkanTools
131
132 . .gitlab-ci/build-vulkantools.sh
133
134 ############### Uninstall the build software
135
136 ccache --show-stats
137
138 apt-get purge -y \
139 $STABLE_EPHEMERAL \
140 $TESTING_EPHEMERAL
141
142 apt-get autoremove -y --purge