• 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
9set -o xtrace
10
11export DEBIAN_FRONTEND=noninteractive
12
13apt-get install -y ca-certificates gnupg2 software-properties-common
14
15sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
16
17echo "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
18
19export LLVM_VERSION="${LLVM_VERSION:=15}"
20
21# Ephemeral packages (installed for this script and removed again at the end)
22EPHEMERAL=(
23    autoconf
24    automake
25    bc
26    bison
27    bzip2
28    ccache
29    cmake
30    "clang-${LLVM_VERSION}"
31    flex
32    glslang-tools
33    g++
34    libasound2-dev
35    libcap-dev
36    "libclang-cpp${LLVM_VERSION}-dev"
37    libdrm-dev
38    libegl-dev
39    libelf-dev
40    libepoxy-dev
41    libgbm-dev
42    libpciaccess-dev
43    libssl-dev
44    libvulkan-dev
45    libwayland-dev
46    libx11-xcb-dev
47    libxext-dev
48    "llvm-${LLVM_VERSION}-dev"
49    make
50    meson
51    openssh-server
52    patch
53    pkgconf
54    protobuf-compiler
55    python3-dev
56    python3-pip
57    python3-setuptools
58    python3-wheel
59    spirv-tools
60    wayland-protocols
61    xz-utils
62)
63
64DEPS=(
65    apt-utils
66    curl
67    git
68    git-lfs
69    inetutils-syslogd
70    iptables
71    jq
72    libasan8
73    libdrm2
74    libexpat1
75    "libllvm${LLVM_VERSION}"
76    liblz4-1
77    libpng16-16
78    libpython3.11
79    libvulkan1
80    libwayland-client0
81    libwayland-server0
82    libxcb-ewmh2
83    libxcb-randr0
84    libxcb-xfixes0
85    libxkbcommon0
86    libxrandr2
87    libxrender1
88    python3-mako
89    python3-numpy
90    python3-packaging
91    python3-pil
92    python3-requests
93    python3-six
94    python3-yaml
95    socat
96    vulkan-tools
97    waffle-utils
98    xauth
99    xvfb
100    zlib1g
101    zstd
102)
103
104apt-get update
105apt-get dist-upgrade -y
106
107apt-get install --purge -y \
108      sysvinit-core libelogind0
109
110apt-get install -y --no-remove "${DEPS[@]}"
111
112apt-get install -y --no-install-recommends "${EPHEMERAL[@]}"
113
114. .gitlab-ci/container/container_pre_build.sh
115
116############### Build kernel
117
118export DEFCONFIG="arch/x86/configs/x86_64_defconfig"
119export KERNEL_IMAGE_NAME=bzImage
120export KERNEL_ARCH=x86_64
121export DEBIAN_ARCH=amd64
122
123mkdir -p /lava-files/
124. .gitlab-ci/container/build-kernel.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
133. .gitlab-ci/container/build-mold.sh
134
135############### Build LLVM-SPIRV translator
136
137. .gitlab-ci/container/build-llvm-spirv.sh
138
139############### Build libclc
140
141. .gitlab-ci/container/build-libclc.sh
142
143############### Build Wayland
144
145. .gitlab-ci/container/build-wayland.sh
146
147############### Build Crosvm
148
149. .gitlab-ci/container/build-rust.sh
150. .gitlab-ci/container/build-crosvm.sh
151
152############### Build dEQP runner
153. .gitlab-ci/container/build-deqp-runner.sh
154
155
156apt-get purge -y "${EPHEMERAL[@]}"
157
158rm -rf /root/.rustup
159
160. .gitlab-ci/container/container_post_build.sh
161