aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/container/arm_test-base.sh
blob: b59f6daa6ed213a875500c3e9762a2faabf71472 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash

set -e
set -o xtrace

# etnaviv will eventually need armhf too.
CROSS_ARCHITECTURES="arm64"

for arch in $CROSS_ARCHITECTURES; do
    dpkg --add-architecture $arch
done

############### Install packages for building
apt-get install -y ca-certificates
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
apt-get update

apt-get install -y --no-remove \
        abootimg \
        android-sdk-ext4-utils \
        bc \
        bison \
        bzip2 \
        ccache \
        cmake \
        cpio \
        g++ \
        debootstrap \
        fastboot \
        flex \
        git \
        netcat \
        python3-distutils \
        python3-minimal \
        python3-serial \
        python3.7 \
        pkg-config \
        procps \
        u-boot-tools \
        unzip

apt install -t buster-backports -y --no-remove \
    meson

# Cross-build test deps
for arch in $CROSS_ARCHITECTURES; do
    apt-get install -y --no-remove \
        crossbuild-essential-${arch} \
        libdrm-dev:${arch} \
        libegl1-mesa-dev:${arch} \
        libelf-dev:${arch} \
        libexpat1-dev:${arch} \
        libffi-dev:${arch} \
        libgbm-dev:${arch} \
        libgles2-mesa-dev:${arch} \
        libpng-dev:${arch} \
        libstdc++6:${arch} \
        libtinfo-dev:${arch} \
        libegl1-mesa-dev:${arch} \
        libvulkan-dev:${arch}

    mkdir /var/cache/apt/archives/${arch}
done

############### Create cross-files

for arch in $CROSS_ARCHITECTURES; do
  . .gitlab-ci/create-cross-file.sh $arch
done

. .gitlab-ci/container/container_post_build.sh