ci: Move container files into their own dir
[platform/upstream/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 INCLUDE_PIGLIT=1
9
10 dpkg --add-architecture $arch
11 apt-get update
12
13 # Cross-build test deps
14 BAREMETAL_EPHEMERAL=" \
15         autoconf \
16         automake \
17         crossbuild-essential-$arch \
18         git-lfs \
19         libboost-dev:$arch \
20         libdrm-dev:$arch \
21         libegl1-mesa-dev:$arch \
22         libelf-dev:$arch \
23         libexpat1-dev:$arch \
24         libffi-dev:$arch \
25         libgbm-dev:$arch \
26         libgles2-mesa-dev:$arch \
27         libpciaccess-dev:$arch \
28         libpcre3-dev:$arch \
29         libpng-dev:$arch \
30         libpython3-dev:$arch \
31         libstdc++6:$arch \
32         libtinfo-dev:$arch \
33         libudev-dev:$arch \
34         libvulkan-dev:$arch \
35         libwaffle-dev:$arch \
36         libxcb-keysyms1-dev:$arch \
37         libxkbcommon-dev:$arch \
38         python3-dev \
39         qt5-default \
40         qt5-qmake \
41         qtbase5-dev:$arch \
42         "
43
44 apt-get install -y --no-remove $BAREMETAL_EPHEMERAL
45
46 mkdir /var/cache/apt/archives/$arch
47
48 ############### Create cross-files
49
50 . .gitlab-ci/container/create-cross-file.sh $arch
51
52 . .gitlab-ci/container/container_pre_build.sh
53
54 ############### Create rootfs
55 KERNEL_URL=https://github.com/anholt/linux/archive/mesa-ci-2021-01-27-5.11rc5.tar.gz
56
57 DEBIAN_ARCH=$arch INCLUDE_VK_CTS=1 . .gitlab-ci/container/lava_build.sh
58
59 ############### Uninstall the build software
60
61 apt-get purge -y $BAREMETAL_EPHEMERAL
62
63 . .gitlab-ci/container/container_post_build.sh