1bf215546Sopenharmony_ci#!/bin/bash
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_ciset -e
4bf215546Sopenharmony_ciset -o xtrace
5bf215546Sopenharmony_ci
6bf215546Sopenharmony_ciexport DEBIAN_FRONTEND=noninteractive
7bf215546Sopenharmony_ci
8bf215546Sopenharmony_ciapt-get install -y ca-certificates gnupg2 software-properties-common
9bf215546Sopenharmony_ci
10bf215546Sopenharmony_cised -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
11bf215546Sopenharmony_ci
12bf215546Sopenharmony_ci# Ephemeral packages (installed for this script and removed again at
13bf215546Sopenharmony_ci# the end)
14bf215546Sopenharmony_ciSTABLE_EPHEMERAL=" \
15bf215546Sopenharmony_ci      cargo \
16bf215546Sopenharmony_ci      python3-dev \
17bf215546Sopenharmony_ci      python3-pip \
18bf215546Sopenharmony_ci      python3-setuptools \
19bf215546Sopenharmony_ci      python3-wheel \
20bf215546Sopenharmony_ci      "
21bf215546Sopenharmony_ci
22bf215546Sopenharmony_ci# Add llvm 13 to the build image
23bf215546Sopenharmony_ciapt-key add .gitlab-ci/container/debian/llvm-snapshot.gpg.key
24bf215546Sopenharmony_ciadd-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
25bf215546Sopenharmony_ci
26bf215546Sopenharmony_ciapt-get update
27bf215546Sopenharmony_ciapt-get dist-upgrade -y
28bf215546Sopenharmony_ci
29bf215546Sopenharmony_ciapt-get install -y --no-remove \
30bf215546Sopenharmony_ci      git \
31bf215546Sopenharmony_ci      git-lfs \
32bf215546Sopenharmony_ci      libasan6 \
33bf215546Sopenharmony_ci      libexpat1 \
34bf215546Sopenharmony_ci      libllvm13 \
35bf215546Sopenharmony_ci      libllvm11 \
36bf215546Sopenharmony_ci      libllvm9 \
37bf215546Sopenharmony_ci      liblz4-1 \
38bf215546Sopenharmony_ci      libpng16-16 \
39bf215546Sopenharmony_ci      libpython3.9 \
40bf215546Sopenharmony_ci      libvulkan1 \
41bf215546Sopenharmony_ci      libwayland-client0 \
42bf215546Sopenharmony_ci      libwayland-server0 \
43bf215546Sopenharmony_ci      libxcb-ewmh2 \
44bf215546Sopenharmony_ci      libxcb-randr0 \
45bf215546Sopenharmony_ci      libxcb-xfixes0 \
46bf215546Sopenharmony_ci      libxkbcommon0 \
47bf215546Sopenharmony_ci      libxrandr2 \
48bf215546Sopenharmony_ci      libxrender1 \
49bf215546Sopenharmony_ci      python3-mako \
50bf215546Sopenharmony_ci      python3-numpy \
51bf215546Sopenharmony_ci      python3-packaging \
52bf215546Sopenharmony_ci      python3-pil \
53bf215546Sopenharmony_ci      python3-requests \
54bf215546Sopenharmony_ci      python3-six \
55bf215546Sopenharmony_ci      python3-yaml \
56bf215546Sopenharmony_ci      vulkan-tools \
57bf215546Sopenharmony_ci      waffle-utils \
58bf215546Sopenharmony_ci      xauth \
59bf215546Sopenharmony_ci      xvfb \
60bf215546Sopenharmony_ci      zlib1g
61bf215546Sopenharmony_ci
62bf215546Sopenharmony_ciapt-get install -y --no-install-recommends \
63bf215546Sopenharmony_ci      $STABLE_EPHEMERAL
64bf215546Sopenharmony_ci
65bf215546Sopenharmony_ci# Needed for ci-fairy, this revision is able to upload files to MinIO
66bf215546Sopenharmony_ci# and doesn't depend on git
67bf215546Sopenharmony_cipip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
68bf215546Sopenharmony_ci
69bf215546Sopenharmony_ci############### Build dEQP runner
70bf215546Sopenharmony_ci. .gitlab-ci/container/build-deqp-runner.sh
71bf215546Sopenharmony_cirm -rf ~/.cargo
72bf215546Sopenharmony_ci
73bf215546Sopenharmony_ciapt-get purge -y $STABLE_EPHEMERAL
74bf215546Sopenharmony_ci
75bf215546Sopenharmony_ciapt-get autoremove -y --purge
76