chiark / gitweb /
lint: fix update check data https check
[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.1
11       env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
12       env: ANDROID_HOME=/usr/local/share/android-sdk
13     - os: osx
14       osx_image: xcode7.3
15       env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
16       env: ANDROID_HOME=/usr/local/share/android-sdk
17     - os: osx
18       osx_image: xcode6.4
19       env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
20       env: ANDROID_HOME=/usr/local/share/android-sdk
21
22 # On Ubuntu/trusty 14.04, the PPA is needed on to provide lots of the
23 # dependencies, but this then also serves as a test of the PPA, which
24 # is used on Windows Subsystem for Linux.
25 addons:
26   apt:
27     sources:
28       - sourceline: 'ppa:fdroid/fdroidserver'
29     packages:
30     - bash
31     - dash
32     - pylint
33     - pep8
34     - python3-babel
35     - python3-dev
36     - python3-pip
37     - python3-ruamel.yaml
38     - python3-setuptools
39     - python3.4-venv
40     - libjpeg-dev
41     - zlib1g-dev
42     - fdroidserver
43
44 android:
45   components:
46     - android-23  # required for `fdroid build` test
47     - build-tools-25.0.3  # required for `fdroid build` test
48   licenses:
49     - 'android-sdk-preview-.+'
50     - 'android-sdk-license-.+'
51
52 # * ensure java8 is installed since Android SDK doesn't work with Java9
53 # * Java needs to be at least 1.8.0_131 to have MD5 properly disabled
54 #   https://blogs.oracle.com/java-platform-group/oracle-jre-will-no-longer-trust-md5-signed-code-by-default
55 #   https://opsech.io/posts/2017/Jun/09/openjdk-april-2017-security-update-131-8u131-and-md5-signed-jars.html
56 install:
57   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
58       set -x;
59       brew update > /dev/null;
60       brew install dash bash python3 gradle jenv;
61       brew install gnu-sed --with-default-names;
62       if ! ruby -e 'v = `javac -version 2>&1`.split()[1].gsub("_", "."); exit Gem::Dependency.new("", "~> 1.8.0.131").match?("", v)'; then
63         brew cask uninstall java --force;
64         brew cask install caskroom/versions/java8;
65       fi;
66       brew cask install android-sdk;
67
68       export AAPT_VERSION=`sed -n "s,^MINIMUM_AAPT_VERSION\s*=\s*['\"]\(.*\)[['\"],\1,p" fdroidserver/common.py`;
69       mkdir -p "$ANDROID_HOME/licenses";
70       echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license";
71       echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license";
72       echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license";
73       echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools";
74       echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;$AAPT_VERSION";
75       echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-23";
76
77       sudo pip3 install babel;
78       sudo pip3 install --quiet --editable . ;
79       sudo rm -rf fdroidserver.egg-info;
80
81       ls -l /System/Library/Java/JavaVirtualMachines || true;
82       ls -l /Library/Java/JavaVirtualMachines || true;
83       echo $PATH;
84       echo $JAVA_HOME;
85       jenv versions;
86       /usr/libexec/java_home;
87       java -version;
88       which java;
89       javac -version;
90       which javac;
91       jarsigner -help;
92       which jarsigner;
93       keytool -help;
94       which keytool;
95       set +x;
96     fi
97
98 # The OSX tests seem to run slower, they often timeout.  So only run
99 # the test suite with the installed version of fdroid, instead of the
100 # three rounds that ./complete-ci-tests does.
101 script:
102   - cd tests
103   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
104       ./run-tests;
105     else
106       ./complete-ci-tests;
107     fi
108
109 after_failure:
110   - cd $TRAVIS_BUILD_DIR
111   - ls -lR | curl -F 'clbin=<-' https://clbin.com