edfd4f980f06b060761b15d37a3fae2f7d0292dc
[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 libpciaccess-dev:$arch \
26 libpcre3-dev:$arch \
27 libpng-dev:$arch \
28 libpython3-dev:$arch \
29 libstdc++6:$arch \
30 libtinfo-dev:$arch \
31 libegl1-mesa-dev:$arch \
32 libvulkan-dev:$arch \
33 libxcb-keysyms1-dev:$arch \
34 libpython3-dev:$arch \
35 python3-dev \
36 qt5-default \
37 qt5-qmake \
38 qtbase5-dev:$arch \
39 "
40
41 apt-get install -y --no-remove $BAREMETAL_EPHEMERAL
42
43 mkdir /var/cache/apt/archives/$arch
44
45 ############### Create cross-files
46
47 . .gitlab-ci/create-cross-file.sh $arch
48
49 . .gitlab-ci/container/container_pre_build.sh
50
51 ############### Create rootfs
52 KERNEL_URL=https://gitlab.freedesktop.org/drm/msm/-/archive/drm-msm-fixes-2020-06-25/msm-drm-msm-fixes-2020-06-25.tar.gz
53
54 DEBIAN_ARCH=$arch INCLUDE_VK_CTS=1 . .gitlab-ci/container/lava_build.sh
55
56 ############### Store traces
57 # Clone the traces-db at container build time so we don't have to pull traces
58 # per run (too much egress cost for fd.o).
59 git clone \
60 --depth 1 \
61 -b mesa-ci-2020-06-08 \
62 https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db.git \
63 $ROOTFS/traces-db
64 rm -rf $ROOTFS/traces-db/.git
65 find $ROOTFS/traces-db -type f \
66 -a -not -name '*.trace' \
67 -a -not -name '*.rdc' \
68 -delete
69
70 ccache --show-stats
71
72 . .gitlab-ci/container/container_post_build.sh
73
74 apt-get purge -y $BAREMETAL_EPHEMERAL