11FROM ubuntu:16.04
22
3- RUN dpkg --add-architecture i386 && \
4- apt-get update && \
3+ RUN apt-get update && \
54 apt-get install -y --no-install-recommends \
65 g++ \
76 make \
@@ -12,35 +11,54 @@ RUN dpkg --add-architecture i386 && \
1211 git \
1312 cmake \
1413 unzip \
15- expect \
16- openjdk-9-jre-headless \
1714 sudo \
18- libstdc++6:i386 \
1915 xz-utils \
2016 libssl-dev \
2117 pkg-config
2218
23- WORKDIR /android/
24- ENV PATH=$PATH:/android/ndk-arm-9/bin:/android/sdk/tools:/android/sdk/platform-tools
25-
26- COPY install-ndk.sh install-sdk.sh accept-licenses.sh /android/
27- RUN sh /android/install-ndk.sh
28- RUN sh /android/install-sdk.sh
29-
3019RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
3120 dpkg -i dumb-init_*.deb && \
3221 rm dumb-init_*.deb
3322
34- COPY start-emulator.sh /android/
23+ RUN curl -o /usr/local/bin/sccache \
24+ https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
25+ chmod +x /usr/local/bin/sccache
3526
36- ENTRYPOINT ["/usr/bin/dumb-init" , "--" , "/android/start-emulator.sh" ]
27+ # Install NDK
28+ COPY install-ndk.sh /tmp
29+ RUN . /tmp/install-ndk.sh && \
30+ download_ndk android-ndk-r13b-linux-x86_64.zip && \
31+ make_standalone_toolchain arm 9 && \
32+ remove_ndk
3733
38- RUN curl -o /usr/local/bin/sccache \
39- https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-24-sccache-x86_64-unknown-linux-gnu && \
40- chmod +x /usr/local/bin/sccache
34+ # Install SDK
35+ RUN dpkg --add-architecture i386 && \
36+ apt-get update && \
37+ apt-get install -y --no-install-recommends \
38+ openjdk-9-jre-headless \
39+ tzdata \
40+ libstdc++6:i386 \
41+ libgl1-mesa-glx \
42+ libpulse0
43+
44+ COPY install-sdk.sh /tmp
45+ RUN . /tmp/install-sdk.sh && \
46+ download_sdk tools_r25.2.5-linux.zip && \
47+ download_sysimage armeabi-v7a 18 && \
48+ create_avd armeabi-v7a 18
49+
50+ # Setup env
51+ ENV PATH=$PATH:/android/sdk/tools
52+ ENV PATH=$PATH:/android/sdk/platform-tools
53+
54+ ENV TARGETS=arm-linux-androideabi
4155
4256ENV RUST_CONFIGURE_ARGS \
43- --target=arm-linux-androideabi \
44- --arm-linux-androideabi-ndk=/android/ndk-arm-9
57+ --target=$TARGETS \
58+ --arm-linux-androideabi-ndk=/android/ndk/arm-9
59+
60+ ENV SCRIPT python2.7 ../x.py test --target $TARGETS --verbose
4561
46- ENV SCRIPT python2.7 ../x.py test --target arm-linux-androideabi
62+ # Entrypoint
63+ COPY start-emulator.sh /android/
64+ ENTRYPOINT ["/usr/bin/dumb-init" , "--" , "/android/start-emulator.sh" ]
0 commit comments