File tree Expand file tree Collapse file tree 7 files changed +121
-9
lines changed
docker/arm-linux-androideabi Expand file tree Collapse file tree 7 files changed +121
-9
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,8 @@ matrix:
119
119
script : sh ci/run-docker.sh $TARGET
120
120
install :
121
121
122
+ cache : cargo
123
+
122
124
notifications :
123
125
email :
124
126
on_success : never
Original file line number Diff line number Diff line change 1
- FROM alexcrichton/rust-slave-android:2015-11-22
2
- ENV CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
3
- PATH=$PATH:/rust/bin
4
- ENTRYPOINT ["sh" ]
1
+ FROM ubuntu:16.04
2
+
3
+ RUN dpkg --add-architecture i386 && \
4
+ apt-get update && \
5
+ apt-get install -y --no-install-recommends \
6
+ file \
7
+ curl \
8
+ ca-certificates \
9
+ python \
10
+ unzip \
11
+ expect \
12
+ openjdk-9-jre \
13
+ libstdc++6:i386 \
14
+ gcc \
15
+ libc6-dev
16
+
17
+ WORKDIR /android/
18
+
19
+ COPY install-ndk.sh /android/
20
+ RUN sh /android/install-ndk.sh
21
+
22
+ ENV PATH=$PATH:/android/ndk-arm/bin:/android/sdk/tools:/android/sdk/platform-tools
23
+
24
+ COPY install-sdk.sh accept-licenses.sh /android/
25
+ RUN sh /android/install-sdk.sh
26
+
27
+ ENV PATH=$PATH:/rust/bin \
28
+ CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
29
+ ANDROID_EMULATOR_FORCE_32BIT=1 \
30
+ HOME=/tmp
31
+ RUN chmod 755 /android/sdk/tools/*
32
+
33
+ RUN cp -r /root/.android /tmp
34
+ RUN chmod 777 -R /tmp/.android
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/expect -f
2
+ # ignore-license
3
+
4
+ set timeout 1800
5
+ set cmd [lindex $argv 0]
6
+ set licenses [lindex $argv 1]
7
+
8
+ spawn {* }$cmd
9
+ expect {
10
+ " Do you accept the license '*'*" {
11
+ exp_send " y\r"
12
+ exp_continue
13
+ }
14
+ eof
15
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3
+ # file at the top-level directory of this distribution and at
4
+ # http://rust-lang.org/COPYRIGHT.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7
+ # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8
+ # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9
+ # option. This file may not be copied, modified, or distributed
10
+ # except according to those terms.
11
+
12
+ set -ex
13
+
14
+ curl -O https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
15
+ unzip -q android-ndk-r13b-linux-x86_64.zip
16
+ android-ndk-r13b/build/tools/make_standalone_toolchain.py \
17
+ --install-dir /android/ndk-arm \
18
+ --arch arm \
19
+ --api 24
20
+
21
+ rm -rf ./android-ndk-r13b-linux-x86_64.zip ./android-ndk-r13b
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3
+ # file at the top-level directory of this distribution and at
4
+ # http://rust-lang.org/COPYRIGHT.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7
+ # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8
+ # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9
+ # option. This file may not be copied, modified, or distributed
10
+ # except according to those terms.
11
+
12
+ set -ex
13
+
14
+ # Prep the SDK and emulator
15
+ #
16
+ # Note that the update process requires that we accept a bunch of licenses, and
17
+ # we can't just pipe `yes` into it for some reason, so we take the same strategy
18
+ # located in https://github.com/appunite/docker by just wrapping it in a script
19
+ # which apparently magically accepts the licenses.
20
+
21
+ mkdir sdk
22
+ curl https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz | \
23
+ tar xzf - -C sdk --strip-components=1
24
+
25
+ filter=" platform-tools,android-21"
26
+ filter=" $filter ,sys-img-armeabi-v7a-android-21"
27
+
28
+ ./accept-licenses.sh " android - update sdk -a --no-ui --filter $filter "
29
+
30
+ echo " no" | android create avd \
31
+ --name arm-21 \
32
+ --target android-21 \
33
+ --abi armeabi-v7a
Original file line number Diff line number Diff line change @@ -6,14 +6,21 @@ set -ex
6
6
run () {
7
7
echo $1
8
8
docker build -t libc ci/docker/$1
9
+ mkdir -p target
9
10
docker run \
11
+ --user ` id -u` :` id -g` \
10
12
--rm \
11
- -v ` rustc --print sysroot` :/rust:ro \
12
- -v ` pwd` :/checkout:ro \
13
- -e CARGO_TARGET_DIR=/tmp/target \
14
- -w /checkout \
13
+ --volume $HOME /.cargo:/cargo \
14
+ --env CARGO_HOME=/cargo \
15
+ --volume ` rustc --print sysroot` :/rust:ro \
16
+ --volume ` pwd` :/checkout:ro \
17
+ --volume ` pwd` /target:/checkout/target \
18
+ --env CARGO_TARGET_DIR=/checkout/target \
19
+ --workdir /checkout \
15
20
--privileged \
16
- -it libc \
21
+ --interactive \
22
+ --tty \
23
+ libc \
17
24
ci/run.sh $1
18
25
}
19
26
Original file line number Diff line number Diff line change @@ -451,6 +451,10 @@ fn main() {
451
451
"lio_listio" if freebsd => true ,
452
452
"lio_listio" if musl => true ,
453
453
454
+ // Apparently the NDK doesn't have this defined on android, but
455
+ // it's in a header file?
456
+ "endpwent" if android => true ,
457
+
454
458
_ => false ,
455
459
}
456
460
} ) ;
You can’t perform that action at this time.
0 commit comments