chiark / gitweb /
travis-ci: update OSX CI build to work again
[fdroidserver.git] / .travis.yml
1
2 # Use the Android base system since it provides the SDK, etc.
3 language: java
4
5 matrix:
6   allow_failures:
7     - os: linux # this is really about OSX, Ubuntu is just bonus
8   include:
9     - os: linux
10       language: android
11       sudo: required
12       # this doesn't actually work yet https://github.com/travis-ci/travis-ci/issues/5337
13       dist: trusty
14     - os: osx
15       osx_image: xcode9
16       env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
17       env: ANDROID_HOME=/usr/local/share/android-sdk
18
19 licenses:
20   - 'android-sdk-preview-license-52d11cd2'
21   - 'android-sdk-license-.+'
22
23 # the PPA is needed on Ubuntu 14.04 precise, and with python3, trusty too
24 # the pip thing is a hack that can go away with trusty
25 install:
26   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
27       brew update > /dev/null;
28       brew install dash bash python3 gradle;
29       brew install gnu-sed --with-default-names;
30       brew cask install android-sdk;
31
32       mkdir -p "$ANDROID_HOME/licenses";
33       echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license";
34       echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license";
35       echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools";
36       echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2";
37       echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-23";
38
39       sudo pip3 install -e  .;
40       sudo rm -rf fdroidserver.egg-info;
41
42       echo $PATH;
43       echo $JAVA_HOME;
44       /usr/libexec/java_home;
45       java -version;
46       which java;
47       javac -version;
48       which javac;
49       jarsigner -help;
50       which jarsigner;
51       keytool -help;
52       which keytool;
53     fi
54
55 script:
56   - cd tests
57   - ./complete-ci-tests
58
59 after_failure:
60   - cd $TRAVIS_BUILD_DIR
61   - ls -lR | curl -F 'clbin=<-' https://clbin.com