ci: Update to current ci-templates
[piglit.git] / .gitlab-ci / debian-install.sh
blobc542327fe61d4d53afa8eaa8438ccc771b2af8f1
1 #!/bin/bash
2 set -eux
4 export DEBIAN_FRONTEND=noninteractive
6 apt-get install -y \
7 ca-certificates
9 sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
10 echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
12 # Use newer packages from backports by default
13 cat >/etc/apt/preferences <<EOF
14 Package: *
15 Pin: release a=buster-backports
16 Pin-Priority: 500
17 EOF
19 apt-get update
21 apt-get install -y \
22 bison \
23 bzip2 \
24 ccache \
25 cmake \
26 curl \
27 flex \
28 freeglut3-dev \
29 g++-multilib \
30 gcc-multilib \
31 gettext \
32 git \
33 jq \
34 libdrm-dev \
35 libdrm2 \
36 libegl1-mesa-dev \
37 libglvnd-dev \
38 libpciaccess-dev \
39 libvulkan-dev \
40 libwaffle-dev \
41 libwayland-dev \
42 libxkbcommon-dev \
43 libxrender-dev \
44 meson \
45 mingw-w64 \
46 ninja-build \
47 opencl-dev \
48 pkg-config \
49 python3 \
50 python3-dev \
51 python3-jsonschema \
52 python3-mako \
53 python3-mock \
54 python3-numpy \
55 python3-packaging \
56 python3-pil \
57 python3-pip \
58 python3-psutil \
59 python3-pytest \
60 python3-pytest-mock \
61 python3-pytest-timeout \
62 python3-requests \
63 python3-requests-mock \
64 python3-setuptools \
65 python3-wheel \
66 python3-yaml \
67 tox \
68 waffle-utils \
69 unzip
71 pip3 install pytest-pythonpath
72 pip3 install pytest-raises
74 # Download Waffle artifacts. See also
75 # https://gitlab.freedesktop.org/mesa/waffle/-/merge_requests/89
76 # https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html#downloading-the-latest-artifacts
77 for target in mingw32 mingw64
79 mkdir -p /opt/waffle/$target
80 curl -s -L "https://gitlab.freedesktop.org/mesa/waffle/-/jobs/artifacts/${WAFFLE_BRANCH:-maint-1.7}/raw/publish/$target/waffle-$target.zip?job=cmake-mingw" -o /tmp/waffle-$target.zip
81 unzip -qo /tmp/waffle-$target.zip -d /opt/waffle/$target
82 test -d /opt/waffle/$target/waffle
83 rm /tmp/waffle-$target.zip
84 done
86 curl -s -L "https://dri.freedesktop.org/libdrm/libdrm-2.4.98.tar.bz2" -o /tmp/libdrm-2.4.98.tar.bz2
88 apt-get purge -y \
89 curl \
90 unzip