ci: Include trace replay support in ARM rootfses.
[mesa.git] / .gitlab-ci / container / baremetal_build.sh
1 #!/bin/bash
2
3 set -e
4 set -o xtrace
5
6 ROOTFS=/lava-files/rootfs-${arch}
7
8 dpkg --add-architecture $arch
9 apt-get update
10
11 # Cross-build test deps
12 BAREMETAL_EPHEMERAL=" \
13 autoconf \
14 automake \
15 crossbuild-essential-$arch \
16 git-lfs \
17 libdrm-dev:$arch \
18 libboost-dev:$arch \
19 libegl1-mesa-dev:$arch \
20 libelf-dev:$arch \
21 libexpat1-dev:$arch \
22 libffi-dev:$arch \
23 libgbm-dev:$arch \
24 libgles2-mesa-dev:$arch \
25 libpcre3-dev:$arch \
26 libpng-dev:$arch \
27 libpython3-dev:$arch \
28 libstdc++6:$arch \
29 libtinfo-dev:$arch \
30 libegl1-mesa-dev:$arch \
31 libvulkan-dev:$arch \
32 libxcb-keysyms1-dev:$arch \
33 libpython3-dev:$arch \
34 python3-dev \
35 qt5-default \
36 qt5-qmake \
37 qtbase5-dev:$arch \
38 "
39
40 apt-get install -y --no-remove $BAREMETAL_EPHEMERAL
41
42 mkdir /var/cache/apt/archives/$arch
43
44 ############### Create cross-files
45
46 . .gitlab-ci/create-cross-file.sh $arch
47
48 . .gitlab-ci/container/container_pre_build.sh
49
50 ############### Create rootfs
51
52 DEBIAN_ARCH=$arch INCLUDE_VK_CTS=1 . .gitlab-ci/container/lava_arm.sh
53
54 ############### Store traces
55 # Clone the traces-db at container build time so we don't have to pull traces
56 # per run (too much egress cost for fd.o).
57 git clone \
58 --depth 1 \
59 -b mesa-ci-2020-06-08 \
60 https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db.git \
61 $ROOTFS/traces-db
62 rm -rf $ROOTFS/traces-db/.git
63 find $ROOTFS/traces-db -type f \
64 -a -not -name '*.trace' \
65 -a -not -name '*.rdc' \
66 -delete
67
68 ccache --show-stats
69
70 . .gitlab-ci/container/container_post_build.sh
71
72 apt-get purge -y $BAREMETAL_EPHEMERAL