~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to .gitlab-ci/container/debian/x86_test-vk.sh

  • Committer: mmach
  • Date: 2022-09-22 19:56:13 UTC
  • Revision ID: netbit73@gmail.com-20220922195613-wtik9mmy20tmor0i
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
      g++ \
13
 
      g++-mingw-w64-i686-posix \
14
 
      g++-mingw-w64-x86-64-posix \
15
 
      glslang-tools \
16
 
      libexpat1-dev \
17
 
      libgbm-dev \
18
 
      libgles2-mesa-dev \
19
 
      liblz4-dev \
20
 
      libpciaccess-dev \
21
 
      libudev-dev \
22
 
      libvulkan-dev \
23
 
      libwaffle-dev \
24
 
      libx11-xcb-dev \
25
 
      libxcb-ewmh-dev \
26
 
      libxcb-keysyms1-dev \
27
 
      libxkbcommon-dev \
28
 
      libxrandr-dev \
29
 
      libxrender-dev \
30
 
      libzstd-dev \
31
 
      meson \
32
 
      mingw-w64-i686-dev \
33
 
      mingw-w64-tools \
34
 
      mingw-w64-x86-64-dev \
35
 
      p7zip \
36
 
      patch \
37
 
      pkg-config \
38
 
      python3-distutils \
39
 
      wget \
40
 
      xz-utils \
41
 
      "
42
 
 
43
 
apt-get install -y --no-remove \
44
 
      $STABLE_EPHEMERAL \
45
 
      libxcb-shm0 \
46
 
      python3-lxml \
47
 
      python3-simplejson \
48
 
      xinit \
49
 
      xserver-xorg-video-amdgpu \
50
 
      xserver-xorg-video-ati
51
 
 
52
 
# We need multiarch for Wine
53
 
dpkg --add-architecture i386
54
 
 
55
 
apt-get update
56
 
 
57
 
apt-get install -y --no-remove \
58
 
      wine \
59
 
      wine32 \
60
 
      wine64
61
 
 
62
 
function setup_wine() {
63
 
    export WINEDEBUG="-all"
64
 
    export WINEPREFIX="$1"
65
 
 
66
 
    # We don't want crash dialogs
67
 
    cat >crashdialog.reg <<EOF
68
 
Windows Registry Editor Version 5.00
69
 
 
70
 
[HKEY_CURRENT_USER\Software\Wine\WineDbg]
71
 
"ShowCrashDialog"=dword:00000000
72
 
 
73
 
EOF
74
 
 
75
 
    # Set the wine prefix and disable the crash dialog
76
 
    wine regedit crashdialog.reg
77
 
    rm crashdialog.reg
78
 
 
79
 
    # An immediate wine command may fail with: "${WINEPREFIX}: Not a
80
 
    # valid wine prefix."  and that is just spit because of checking
81
 
    # the existance of the system.reg file, which fails.  Just giving
82
 
    # it a bit more of time for it to be created solves the problem
83
 
    # ...
84
 
    while ! test -f  "${WINEPREFIX}/system.reg"; do sleep 1; done
85
 
}
86
 
 
87
 
############### Install DXVK
88
 
 
89
 
DXVK_VERSION="1.8.1"
90
 
 
91
 
setup_wine "/dxvk-wine64"
92
 
 
93
 
wget "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
94
 
tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
95
 
dxvk-"${DXVK_VERSION}"/setup_dxvk.sh install
96
 
rm -rf dxvk-"${DXVK_VERSION}"
97
 
rm dxvk-"${DXVK_VERSION}".tar.gz
98
 
 
99
 
############### Install Windows' apitrace binaries
100
 
 
101
 
APITRACE_VERSION="10.0"
102
 
APITRACE_VERSION_DATE=""
103
 
 
104
 
wget "https://github.com/apitrace/apitrace/releases/download/${APITRACE_VERSION}/apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
105
 
7zr x "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z" \
106
 
      "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/apitrace.exe" \
107
 
      "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/d3dretrace.exe"
108
 
mv "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64" /apitrace-msvc-win64
109
 
rm "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
110
 
 
111
 
# Add the apitrace path to the registry
112
 
wine \
113
 
    reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
114
 
    /v Path \
115
 
    /t REG_EXPAND_SZ \
116
 
    /d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\apitrace-msvc-win64\bin" \
117
 
    /f
118
 
 
119
 
############### Building ...
120
 
 
121
 
. .gitlab-ci/container/container_pre_build.sh
122
 
 
123
 
############### Build libdrm
124
 
 
125
 
. .gitlab-ci/container/build-libdrm.sh
126
 
 
127
 
############### Build Wayland
128
 
 
129
 
. .gitlab-ci/container/build-wayland.sh
130
 
 
131
 
############### Build parallel-deqp-runner's hang-detection tool
132
 
 
133
 
. .gitlab-ci/container/build-hang-detection.sh
134
 
 
135
 
############### Build piglit
136
 
 
137
 
PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh
138
 
 
139
 
############### Build Fossilize
140
 
 
141
 
. .gitlab-ci/container/build-fossilize.sh
142
 
 
143
 
############### Build dEQP VK
144
 
 
145
 
. .gitlab-ci/container/build-deqp.sh
146
 
 
147
 
############### Build gfxreconstruct
148
 
 
149
 
. .gitlab-ci/container/build-gfxreconstruct.sh
150
 
 
151
 
############### Build VKD3D-Proton
152
 
 
153
 
setup_wine "/vkd3d-proton-wine64"
154
 
 
155
 
. .gitlab-ci/container/build-vkd3d-proton.sh
156
 
 
157
 
############### Uninstall the build software
158
 
 
159
 
ccache --show-stats
160
 
 
161
 
apt-get purge -y \
162
 
      $STABLE_EPHEMERAL
163
 
 
164
 
apt-get autoremove -y --purge