forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#40135 - alexcrichton:split-android, r=aturon
travis: Split Android into dist/test images PRs can't land againt beta right now because the android bot is filling up on disk space. I don't really know what's going on but the android bot is the longest one to run anyway so it'll benefit from being split up regardless.
- Loading branch information
Showing
9 changed files
with
84 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN dpkg --add-architecture i386 && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
g++ \ | ||
make \ | ||
file \ | ||
curl \ | ||
ca-certificates \ | ||
python2.7 \ | ||
git \ | ||
cmake \ | ||
unzip \ | ||
expect \ | ||
openjdk-9-jre \ | ||
sudo \ | ||
libstdc++6:i386 \ | ||
xz-utils \ | ||
libssl-dev \ | ||
pkg-config | ||
|
||
WORKDIR /android/ | ||
ENV PATH=$PATH:/android/ndk-arm-9/bin:/android/sdk/tools:/android/sdk/platform-tools | ||
|
||
COPY install-ndk.sh install-sdk.sh accept-licenses.sh /android/ | ||
RUN sh /android/install-ndk.sh | ||
RUN sh /android/install-sdk.sh | ||
|
||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \ | ||
dpkg -i dumb-init_*.deb && \ | ||
rm dumb-init_*.deb | ||
|
||
COPY start-emulator.sh /android/ | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/android/start-emulator.sh"] | ||
|
||
RUN curl -o /usr/local/bin/sccache \ | ||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-24-sccache-x86_64-unknown-linux-gnu && \ | ||
chmod +x /usr/local/bin/sccache | ||
|
||
ENV RUST_CONFIGURE_ARGS \ | ||
--target=arm-linux-androideabi \ | ||
--arm-linux-androideabi-ndk=/android/ndk-arm-9 | ||
|
||
ENV SCRIPT python2.7 ../x.py test --target arm-linux-androideabi |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT | ||
# file at the top-level directory of this distribution and at | ||
# http://rust-lang.org/COPYRIGHT. | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
set -ex | ||
|
||
cpgdb() { | ||
cp android-ndk-r11c/prebuilt/linux-x86_64/bin/gdb /android/$1/bin/$2-gdb | ||
cp android-ndk-r11c/prebuilt/linux-x86_64/bin/gdb-orig /android/$1/bin/gdb-orig | ||
cp -r android-ndk-r11c/prebuilt/linux-x86_64/share /android/$1/share | ||
} | ||
|
||
# Prep the Android NDK | ||
# | ||
# See https://github.com/servo/servo/wiki/Building-for-Android | ||
curl -O https://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip | ||
unzip -q android-ndk-r11c-linux-x86_64.zip | ||
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \ | ||
--platform=android-9 \ | ||
--toolchain=arm-linux-androideabi-4.9 \ | ||
--install-dir=/android/ndk-arm-9 \ | ||
--ndk-dir=/android/android-ndk-r11c \ | ||
--arch=arm | ||
cpgdb ndk-arm-9 arm-linux-androideabi | ||
|
||
rm -rf ./android-ndk-r11c-linux-x86_64.zip ./android-ndk-r11c |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters