• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# shellcheck disable=SC2086 # we want word splitting
3
4set -e
5
6. .gitlab-ci/setup-test-env.sh
7
8set -o xtrace
9
10uncollapsed_section_start debian_setup "Base Debian system setup"
11
12export DEBIAN_FRONTEND=noninteractive
13export LLVM_VERSION="${LLVM_VERSION:=15}"
14
15apt-get install -y libelogind0  # this interfere with systemd deps, install separately
16
17# Ephemeral packages (installed for this script and removed again at the end)
18EPHEMERAL=(
19    bzip2
20    ccache
21    "clang-${LLVM_VERSION}"
22    cmake
23    dpkg-dev
24    g++
25    glslang-tools
26    libasound2-dev
27    libcap-dev
28    "libclang-cpp${LLVM_VERSION}-dev"
29    libdrm-dev
30    libgles2-mesa-dev
31    libgtest-dev
32    libpciaccess-dev
33    libpng-dev
34    libudev-dev
35    libvulkan-dev
36    libwaffle-dev
37    libwayland-dev
38    libx11-xcb-dev
39    libxcb-dri2-0-dev
40    libxcb-dri3-dev
41    libxcb-present-dev
42    libxfixes-dev
43    libxkbcommon-dev
44    libxrandr-dev
45    libxrender-dev
46    "llvm-${LLVM_VERSION}-dev"
47    make
48    meson
49    ocl-icd-opencl-dev
50    patch
51    pkgconf
52    python3-distutils
53    xz-utils
54)
55
56DEPS=(
57    clinfo
58    iptables
59    kmod
60    "libclang-common-${LLVM_VERSION}-dev"
61    "libclang-cpp${LLVM_VERSION}"
62    libcap2
63    libegl1
64    libepoxy0
65    libfdt1
66    libxcb-shm0
67    ocl-icd-libopencl1
68    python3-lxml
69    python3-renderdoc
70    python3-simplejson
71    spirv-tools
72    sysvinit-core
73    weston
74    xwayland
75)
76
77apt-get update
78
79apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
80      $EXTRA_LOCAL_PACKAGES
81
82
83. .gitlab-ci/container/container_pre_build.sh
84
85section_end debian_setup
86
87############### Build piglit
88
89PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
90	     -DPIGLIT_USE_GBM=ON
91	     -DPIGLIT_USE_WAYLAND=ON
92	     -DPIGLIT_USE_X11=ON
93	     -DPIGLIT_BUILD_GLX_TESTS=ON
94	     -DPIGLIT_BUILD_EGL_TESTS=ON
95	     -DPIGLIT_BUILD_WGL_TESTS=OFF
96	     -DPIGLIT_BUILD_GL_TESTS=ON
97	     -DPIGLIT_BUILD_GLES1_TESTS=ON
98	     -DPIGLIT_BUILD_GLES2_TESTS=ON
99	     -DPIGLIT_BUILD_GLES3_TESTS=ON
100	     -DPIGLIT_BUILD_CL_TESTS=ON
101	     -DPIGLIT_BUILD_VK_TESTS=ON
102	     -DPIGLIT_BUILD_DMA_BUF_TESTS=ON" \
103  . .gitlab-ci/container/build-piglit.sh
104
105############### Build dEQP GL
106
107DEQP_API=tools \
108DEQP_TARGET=surfaceless \
109. .gitlab-ci/container/build-deqp.sh
110
111DEQP_API=GL \
112DEQP_TARGET=surfaceless \
113. .gitlab-ci/container/build-deqp.sh
114
115DEQP_API=GLES \
116DEQP_TARGET=surfaceless \
117. .gitlab-ci/container/build-deqp.sh
118
119rm -rf /VK-GL-CTS
120
121############### Build apitrace
122
123. .gitlab-ci/container/build-apitrace.sh
124
125############### Build validation layer for zink
126
127. .gitlab-ci/container/build-vulkan-validation.sh
128
129############### Build nine tests
130
131. .gitlab-ci/container/build-ninetests.sh
132
133############### Uninstall the build software
134
135uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
136
137apt-get purge -y "${EPHEMERAL[@]}"
138
139. .gitlab-ci/container/container_post_build.sh
140
141section_end debian_cleanup
142