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 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 24export LLVM_VERSION="${LLVM_VERSION:=15}" 25 26# Ephemeral packages (installed for this script and removed again at the end) 27EPHEMERAL=( 28 autoconf 29 automake 30 bc 31 bison 32 bzip2 33 ccache 34 cmake 35 "clang-${LLVM_VERSION}" 36 dpkg-dev 37 flex 38 glslang-tools 39 g++ 40 libasound2-dev 41 libcap-dev 42 "libclang-cpp${LLVM_VERSION}-dev" 43 libdrm-dev 44 libegl-dev 45 libelf-dev 46 libepoxy-dev 47 libgbm-dev 48 libpciaccess-dev 49 libssl-dev 50 libvulkan-dev 51 libwayland-dev 52 libx11-xcb-dev 53 libxext-dev 54 "llvm-${LLVM_VERSION}-dev" 55 make 56 meson 57 openssh-server 58 patch 59 pkgconf 60 protobuf-compiler 61 python3-dev 62 python3-pip 63 python3-setuptools 64 python3-wheel 65 spirv-tools 66 wayland-protocols 67 xz-utils 68) 69 70DEPS=( 71 apt-utils 72 curl 73 git 74 git-lfs 75 inetutils-syslogd 76 iptables 77 jq 78 libasan8 79 libdrm2 80 libexpat1 81 "libllvm${LLVM_VERSION}" 82 liblz4-1 83 libpng16-16 84 libpython3.11 85 libubsan1 86 libvulkan1 87 libwayland-client0 88 libwayland-server0 89 libxcb-ewmh2 90 libxcb-randr0 91 libxcb-xfixes0 92 libxkbcommon0 93 libxrandr2 94 libxrender1 95 python3-mako 96 python3-numpy 97 python3-packaging 98 python3-pil 99 python3-requests 100 python3-six 101 python3-yaml 102 socat 103 vulkan-tools 104 waffle-utils 105 xauth 106 xvfb 107 zlib1g 108 zstd 109) 110 111apt-get update 112apt-get dist-upgrade -y 113 114apt-get install --purge -y \ 115 sysvinit-core libelogind0 116 117apt-get install -y --no-remove "${DEPS[@]}" 118 119apt-get install -y --no-install-recommends "${EPHEMERAL[@]}" 120 121. .gitlab-ci/container/container_pre_build.sh 122 123# Needed for ci-fairy, this revision is able to upload files to MinIO 124# and doesn't depend on git 125pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2 126 127# Needed for manipulation with traces yaml files. 128pip3 install --break-system-packages yq 129 130section_end debian_setup 131 132############### Download prebuilt kernel 133 134if [ "$DEBIAN_ARCH" = amd64 ]; then 135 uncollapsed_section_switch kernel "Downloading kernel" 136 export KERNEL_IMAGE_NAME=bzImage 137 mkdir -p /lava-files/ 138 . .gitlab-ci/container/download-prebuilt-kernel.sh 139fi 140 141############### Build mold 142 143. .gitlab-ci/container/build-mold.sh 144 145############### Build LLVM-SPIRV translator 146 147. .gitlab-ci/container/build-llvm-spirv.sh 148 149############### Build libclc 150 151. .gitlab-ci/container/build-libclc.sh 152 153############### Build Wayland 154 155. .gitlab-ci/container/build-wayland.sh 156 157############### Install Rust toolchain 158 159. .gitlab-ci/container/build-rust.sh 160 161############### Build Crosvm 162 163. .gitlab-ci/container/build-crosvm.sh 164 165############### Build dEQP runner 166 167. .gitlab-ci/container/build-deqp-runner.sh 168 169############### Uninstall the build software 170 171uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system" 172 173apt-get purge -y "${EPHEMERAL[@]}" 174 175rm -rf /root/.rustup 176 177. .gitlab-ci/container/container_post_build.sh 178 179section_end debian_cleanup 180