• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# shellcheck disable=SC2086 # we want word splitting
3
4# When changing this file, you need to bump the following
5# .gitlab-ci/image-tags.yml tags:
6# DEBIAN_BASE_TAG
7
8set -e
9
10. .gitlab-ci/setup-test-env.sh
11
12set -o xtrace
13
14uncollapsed_section_start debian_setup "Base Debian system setup"
15
16export DEBIAN_FRONTEND=noninteractive
17
18apt-get install -y curl ca-certificates gnupg2 software-properties-common
19
20sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
21
22echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
23
24: "${LLVM_VERSION:?llvm version not set!}"
25
26. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
27
28# Ephemeral packages (installed for this script and removed again at the end)
29EPHEMERAL=(
30    autoconf
31    automake
32    bc
33    bison
34    bzip2
35    ccache
36    cmake
37    "clang-${LLVM_VERSION}"
38    dpkg-dev
39    flex
40    glslang-tools
41    g++
42    libasound2-dev
43    libcap-dev
44    "libclang-cpp${LLVM_VERSION}-dev"
45    "libclang-rt-${LLVM_VERSION}-dev"
46    libdrm-dev
47    libegl-dev
48    libelf-dev
49    libepoxy-dev
50    libgbm-dev
51    libpciaccess-dev
52    libssl-dev
53    libvulkan-dev
54    libwayland-dev
55    libx11-xcb-dev
56    libxext-dev
57    "llvm-${LLVM_VERSION}-dev"
58    make
59    meson
60    openssh-server
61    patch
62    pkgconf
63    protobuf-compiler
64    python3-dev
65    python3-pip
66    python3-setuptools
67    python3-wheel
68    spirv-tools
69    wayland-protocols
70    xz-utils
71)
72
73DEPS=(
74    apt-utils
75    curl
76    git
77    git-lfs
78    inetutils-syslogd
79    iptables
80    jq
81    libasan8
82    libdrm2
83    libexpat1
84    "libllvm${LLVM_VERSION}"
85    liblz4-1
86    libpng16-16
87    libpython3.11
88    libubsan1
89    libvulkan1
90    libwayland-client0
91    libwayland-server0
92    libxcb-ewmh2
93    libxcb-randr0
94    libxcb-xfixes0
95    libxkbcommon0
96    libxrandr2
97    libxrender1
98    python3-mako
99    python3-numpy
100    python3-packaging
101    python3-pil
102    python3-requests
103    python3-six
104    python3-yaml
105    socat
106    vulkan-tools
107    waffle-utils
108    xauth
109    xvfb
110    zlib1g
111    zstd
112)
113
114apt-get update
115apt-get dist-upgrade -y
116
117apt-get install --purge -y \
118      sysvinit-core libelogind0
119
120apt-get install -y --no-remove "${DEPS[@]}"
121
122apt-get install -y --no-install-recommends "${EPHEMERAL[@]}"
123
124. .gitlab-ci/container/container_pre_build.sh
125
126# Needed for ci-fairy, this revision is able to upload files to MinIO
127# and doesn't depend on git
128pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
129
130# Needed for manipulation with traces yaml files.
131pip3 install --break-system-packages yq
132
133section_end debian_setup
134
135############### Download prebuilt kernel
136
137if [ "$DEBIAN_ARCH" = amd64 ]; then
138  uncollapsed_section_start kernel "Downloading kernel"
139  export KERNEL_IMAGE_NAME=bzImage
140  mkdir -p /lava-files/
141  . .gitlab-ci/container/download-prebuilt-kernel.sh
142  section_end kernel
143fi
144
145############### Build mold
146
147. .gitlab-ci/container/build-mold.sh
148
149############### Build LLVM-SPIRV translator
150
151. .gitlab-ci/container/build-llvm-spirv.sh
152
153############### Build libclc
154
155. .gitlab-ci/container/build-libclc.sh
156
157############### Build Wayland
158
159. .gitlab-ci/container/build-wayland.sh
160
161############### Install Rust toolchain
162
163. .gitlab-ci/container/build-rust.sh
164
165############### Build Crosvm
166
167. .gitlab-ci/container/build-crosvm.sh
168
169############### Build dEQP runner
170
171. .gitlab-ci/container/build-deqp-runner.sh
172
173############### Uninstall the build software
174
175uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
176
177apt-get purge -y "${EPHEMERAL[@]}"
178
179rm -rf /root/.rustup
180
181. .gitlab-ci/container/container_post_build.sh
182
183section_end debian_cleanup
184