• 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_BUILD_TAG
7
8set -e
9set -o xtrace
10
11export DEBIAN_FRONTEND=noninteractive
12export LLVM_VERSION="${LLVM_VERSION:=15}"
13
14apt-get install -y ca-certificates
15sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
16echo "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
17
18# Ephemeral packages (installed for this script and removed again at
19# the end)
20EPHEMERAL=(
21)
22
23DEPS=(
24    apt-utils
25    bison
26    ccache
27    curl
28    "clang-${LLVM_VERSION}"
29    "clang-format-${LLVM_VERSION}"
30    dpkg-cross
31    findutils
32    flex
33    flatbuffers-compiler
34    g++
35    cmake
36    gcc
37    git
38    glslang-tools
39    kmod
40    "libclang-${LLVM_VERSION}-dev"
41    "libclang-cpp${LLVM_VERSION}-dev"
42    "libclang-common-${LLVM_VERSION}-dev"
43    libelf-dev
44    libepoxy-dev
45    libexpat1-dev
46    libflatbuffers-dev
47    libgtk-3-dev
48    "libllvm${LLVM_VERSION}"
49    libomxil-bellagio-dev
50    libpciaccess-dev
51    libunwind-dev
52    libva-dev
53    libvdpau-dev
54    libvulkan-dev
55    libx11-dev
56    libx11-xcb-dev
57    libxext-dev
58    libxml2-utils
59    libxrandr-dev
60    libxrender-dev
61    libxshmfence-dev
62    libxtensor-dev
63    libxxf86vm-dev
64    libwayland-egl-backend-dev
65    make
66    ninja-build
67    openssh-server
68    pkgconf
69    python3-mako
70    python3-pil
71    python3-pip
72    python3-ply
73    python3-requests
74    python3-setuptools
75    qemu-user
76    valgrind
77    x11proto-dri2-dev
78    x11proto-gl-dev
79    x11proto-randr-dev
80    xz-utils
81    zlib1g-dev
82    zstd
83)
84
85apt-get update
86
87apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
88        $EXTRA_LOCAL_PACKAGES
89
90. .gitlab-ci/container/build-llvm-spirv.sh
91
92. .gitlab-ci/container/build-libclc.sh
93
94# Needed for ci-fairy, this revision is able to upload files to S3
95pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
96
97# We need at least 1.3.1 for rusticl
98pip3 install --break-system-packages 'meson==1.3.1'
99
100. .gitlab-ci/container/build-rust.sh
101
102############### Uninstall ephemeral packages
103
104apt-get purge -y "${EPHEMERAL[@]}"
105
106. .gitlab-ci/container/container_post_build.sh
107