From f4a3e8adb7711b22233974e46302e7328bda56ce Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Sun, 1 Nov 2015 17:30:27 -0500 Subject: [PATCH 1/3] Re-enable Android states on Travis The larger memory limits on the Trusty beta will hopefully make these less flaky. --- android-dependencies.sls | 5 ----- 1 file changed, 5 deletions(-) diff --git a/android-dependencies.sls b/android-dependencies.sls index bf7035d6..aacfcf92 100644 --- a/android-dependencies.sls +++ b/android-dependencies.sls @@ -1,6 +1,3 @@ -# Android is flaky on Travis -{% if not salt['pillar.get']('travis', False) %} - android-dependencies: pkg.installed: - pkgs: @@ -88,5 +85,3 @@ android-ndk-toolset-configuration: - user: servo - group: servo - mode: 0644 - -{% endif %} From ee7a0c9bbd8deac2679c884acd67033b481a244f Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Sun, 1 Nov 2015 17:57:13 -0500 Subject: [PATCH 2/3] Add i386 architecture for Android on 64-bit hosts Some of the dependencies for Android require 32-bit versions of certain package, so add the architecture and update the package database (via refresh: True) before installing them. --- android-dependencies.sls | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/android-dependencies.sls b/android-dependencies.sls index aacfcf92..f178ace8 100644 --- a/android-dependencies.sls +++ b/android-dependencies.sls @@ -1,10 +1,15 @@ +{% if '64' in grains['cpuarch'] %} +enable-i386-architecture: + cmd.run: + - name: 'dpkg --add-architecture i386' + - require_in: + - pkg: android-dependencies +{% endif %} + android-dependencies: pkg.installed: - pkgs: {% if '64' in grains['cpuarch'] %} - # TODO: need to do these first on new ubuntus. - # dpkg --add-architecture i386 - # apt-get update - libc6:i386 - libstdc++6:i386 {% endif %} @@ -16,6 +21,7 @@ android-dependencies: - lib32z1 - libstdc++6 - libgl1-mesa-dev + - refresh: True pip.installed: - name: s3cmd From b80f1bd296cef8d63dcb70b2b7517790d41fc39e Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Sun, 1 Nov 2015 20:10:10 -0500 Subject: [PATCH 3/3] Update Android versions, only download needed tools Use --filter to only download and extract necessary SDK components. This is faster, uses less resources and gets around Travis disk space limits. Update to latest SDK and NDK versions and use sha512 instead of sha1. Use archive.extracted for better semantics and concision. --- android-dependencies.sls | 58 +++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/android-dependencies.sls b/android-dependencies.sls index f178ace8..c02f9ddb 100644 --- a/android-dependencies.sls +++ b/android-dependencies.sls @@ -25,65 +25,57 @@ android-dependencies: pip.installed: - name: s3cmd -android-sdk-download: - file.managed: - - name: /home/servo/android-sdk_r23.0.2-linux.tgz - - source: http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz - - source_hash: sha1=6b79b05bc876a8126f5ba034602e01306706de75 - - user: servo - - group: servo - cmd.wait: - - name: tar xzf /home/servo/android-sdk_r23.0.2-linux.tgz - - user: servo - - watch: - - file: android-sdk-download - -android-sdk-chown: - cmd.wait: - - name: chown -R servo:servo /home/servo/android-sdk-linux - - watch: - - cmd: android-sdk-download - -android-sdk-update: +android-sdk: + archive.extracted: + - name: /home/servo # Directory to extract into + - source: http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz + - source_hash: sha512=96fb71d78a8c2833afeba6df617edcd6cc4e37ecd0c3bec38c39e78204ed3c2bd54b138a56086bf5ccd95e372e3c36e72c1550c13df8232ec19537da93049284 + - archive_format: tar + - archive_user: servo # 2015.8 moves these to the standard user and group parameters + - if_missing: /home/servo/android-sdk_r24.4.1-linux.tgz cmd.wait: + # The arguments to --filter are from running 'android list sdk' + # Currently these are: + # platform-tool: Android SDK Platform-tools, revision 23.0.1 + # 9: SDK Platform Android 4.3.1, API 18, revision 3 - name: | expect -c ' set timeout -1; - spawn /home/servo/android-sdk-linux/tools/android - update sdk --no-ui; + spawn /home/servo/android-sdk-linux/tools/android - update sdk --no-ui --filter platform-tool,9; expect { "Do you accept the license" { exp_send "y\r" ; exp_continue } eof } ' - user: servo - - watch: - - cmd: android-sdk-download - require: - pkg: android-dependencies + - watch: + - archive: android-sdk -android-ndk-download: +android-ndk: file.managed: - - name: /home/servo/android-ndk-r10c-linux-x86_64.bin - - source: http://dl.google.com/android/ndk/android-ndk-r10c-linux-x86_64.bin - - source_hash: sha1=87e159831a6759d5fb84545c445e551995185634 + - name: /home/servo/android-ndk-r10e-linux-x86_64.bin + - source: http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin + - source_hash: sha512=8948c7bd1621e32dce554d5cd1268ffda2e9c5e6b2dda5b8cf0266ea60aa2dd6fddf8d290683fc1ef0b69d66c898226c7f52cc567dbb14352b4191ac19dfb371 - user: servo - group: servo - mode: 777 - -android-ndk-install: cmd.wait: # Need to filter log output to avoid hitting log limits on Travis CI - - name: /home/servo/android-ndk-r10c-linux-x86_64.bin | grep -v Extracting + - name: /home/servo/android-ndk-r10e-linux-x86_64.bin | grep -v Extracting - user: servo - watch: - - file: android-ndk-download + - file: android-ndk android-ndk-toolset-configuration: cmd.wait: - - name: bash /home/servo/android-ndk-r10c/build/tools/make-standalone-toolchain.sh --platform=android-18 --toolchain=arm-linux-androideabi-4.8 --install-dir='/home/servo/ndk-toolchain' --ndk-dir='/home/servo/android-ndk-r10c' + - name: bash /home/servo/android-ndk-r10e/build/tools/make-standalone-toolchain.sh --platform=android-18 --toolchain=arm-linux-androideabi-4.8 --install-dir='/home/servo/ndk-toolchain' --ndk-dir='/home/servo/android-ndk-r10e' - user: servo + - require: + - cmd: android-sdk - watch: - - cmd: android-ndk-install + - cmd: android-ndk /home/servo/.bash_profile: file.managed: