summaryrefslogtreecommitdiffstats
path: root/src/ci/docker/host-x86_64/dist-android/Dockerfile
blob: 2f0496d7dd4ba06ab3a7f8e79bb9a26950c829a0 (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
FROM ubuntu:16.04

COPY scripts/android-base-apt-get.sh /scripts/
RUN sh /scripts/android-base-apt-get.sh

# ndk
COPY scripts/android-ndk.sh /scripts/
RUN . /scripts/android-ndk.sh && \
    download_ndk android-ndk-r15c-linux-x86_64.zip && \
    make_standalone_toolchain arm 14 && \
    make_standalone_toolchain x86 14 && \
    make_standalone_toolchain arm 21 && \
    make_standalone_toolchain x86 21 && \
    make_standalone_toolchain arm64 21 && \
    make_standalone_toolchain x86_64 21 && \
    remove_ndk

# env
ENV TARGETS=arm-linux-androideabi
ENV TARGETS=$TARGETS,armv7-linux-androideabi
ENV TARGETS=$TARGETS,thumbv7neon-linux-androideabi
ENV TARGETS=$TARGETS,i686-linux-android
ENV TARGETS=$TARGETS,aarch64-linux-android
ENV TARGETS=$TARGETS,x86_64-linux-android

ENV RUST_CONFIGURE_ARGS \
      --enable-extended \
      --enable-profiler \
      --arm-linux-androideabi-ndk=/android/ndk/arm-14 \
      --armv7-linux-androideabi-ndk=/android/ndk/arm-14 \
      --thumbv7neon-linux-androideabi-ndk=/android/ndk/arm-14 \
      --i686-linux-android-ndk=/android/ndk/x86-14 \
      --aarch64-linux-android-ndk=/android/ndk/arm64-21 \
      --x86_64-linux-android-ndk=/android/ndk/x86_64-21 \
      --disable-docs

ENV SCRIPT python3 ../x.py dist --host='' --target $TARGETS

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh