chiark / gitweb /
travis-ci: make Trusty builds a first class citizen
[fdroidserver.git] / .travis.yml
1
2 # Use the Android base system since it provides the SDK, etc.
3 language: java
4
5 matrix:
6   include:
7     - os: linux
8       language: android
9     - os: osx
10       osx_image: xcode9
11       env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
12       env: ANDROID_HOME=/usr/local/share/android-sdk
13
14 addons:
15   apt:
16     sources:
17       - sourceline: 'ppa:fdroid/fdroidserver'
18     packages:
19     - bash
20     - dash
21     - pylint
22     - pep8
23     - python3-dev
24     - python3-pip
25     - python3-ruamel.yaml
26     - python3-setuptools
27     - python3.4-venv
28     - libjpeg-dev
29     - zlib1g-dev
30     - fdroidserver
31
32 android:
33   components:
34     - android-23  # required for `fdroid build` test
35     - build-tools-25.0.3  # required for `fdroid build` test
36   licenses:
37     - 'android-sdk-preview-.+'
38     - 'android-sdk-license-.+'
39
40 # the PPA is needed on Ubuntu 14.04 precise, and with python3, trusty too
41 # the pip thing is a hack that can go away with trusty
42 install:
43   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
44       brew update > /dev/null;
45       brew install dash bash python3 gradle;
46       brew install gnu-sed --with-default-names;
47       brew cask install android-sdk;
48
49       mkdir -p "$ANDROID_HOME/licenses";
50       echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license";
51       echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license";
52       echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools";
53       echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2";
54       echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-23";
55
56       sudo pip3 install -e  .;
57       sudo rm -rf fdroidserver.egg-info;
58
59       echo $PATH;
60       echo $JAVA_HOME;
61       /usr/libexec/java_home;
62       java -version;
63       which java;
64       javac -version;
65       which javac;
66       jarsigner -help;
67       which jarsigner;
68       keytool -help;
69       which keytool;
70     fi
71
72 script:
73   - cd tests
74   - ./complete-ci-tests
75
76 after_failure:
77   - cd $TRAVIS_BUILD_DIR
78   - ls -lR | curl -F 'clbin=<-' https://clbin.com