2016-02-15 14:00:52 +01:00
|
|
|
|
|
|
|
# Use the Android base system since it provides the SDK, etc.
|
|
|
|
language: java
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
|
|
|
language: android
|
|
|
|
- os: osx
|
2017-10-18 13:40:32 +02:00
|
|
|
osx_image: xcode9.1
|
2017-09-19 19:58:31 +02:00
|
|
|
env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
|
|
|
|
env: ANDROID_HOME=/usr/local/share/android-sdk
|
2017-09-17 12:54:43 +02:00
|
|
|
- os: osx
|
|
|
|
osx_image: xcode7.3
|
|
|
|
env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
|
|
|
|
env: ANDROID_HOME=/usr/local/share/android-sdk
|
|
|
|
- os: osx
|
|
|
|
osx_image: xcode6.4
|
|
|
|
env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
|
|
|
|
env: ANDROID_HOME=/usr/local/share/android-sdk
|
2016-02-15 14:00:52 +01:00
|
|
|
|
2017-10-20 08:59:56 +02:00
|
|
|
# On Ubuntu/trusty 14.04, the PPA is needed on to provide lots of the
|
|
|
|
# dependencies, but this then also serves as a test of the PPA, which
|
|
|
|
# is used on Windows Subsystem for Linux.
|
2017-09-19 19:58:45 +02:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- sourceline: 'ppa:fdroid/fdroidserver'
|
|
|
|
packages:
|
|
|
|
- bash
|
|
|
|
- dash
|
|
|
|
- pylint
|
|
|
|
- pep8
|
2017-10-19 18:00:04 +02:00
|
|
|
- python3-babel
|
2017-09-19 19:58:45 +02:00
|
|
|
- python3-dev
|
|
|
|
- python3-pip
|
|
|
|
- python3-ruamel.yaml
|
|
|
|
- python3-setuptools
|
|
|
|
- python3.4-venv
|
|
|
|
- libjpeg-dev
|
|
|
|
- zlib1g-dev
|
|
|
|
- fdroidserver
|
|
|
|
|
|
|
|
android:
|
|
|
|
components:
|
|
|
|
- android-23 # required for `fdroid build` test
|
|
|
|
- build-tools-25.0.3 # required for `fdroid build` test
|
|
|
|
licenses:
|
|
|
|
- 'android-sdk-preview-.+'
|
|
|
|
- 'android-sdk-license-.+'
|
2016-02-15 14:00:52 +01:00
|
|
|
|
2017-10-18 13:40:32 +02:00
|
|
|
# * ensure java8 is installed since Android SDK doesn't work with Java9
|
|
|
|
# * Java needs to be at least 1.8.0_131 to have MD5 properly disabled
|
|
|
|
# https://blogs.oracle.com/java-platform-group/oracle-jre-will-no-longer-trust-md5-signed-code-by-default
|
|
|
|
# https://opsech.io/posts/2017/Jun/09/openjdk-april-2017-security-update-131-8u131-and-md5-signed-jars.html
|
2016-02-15 14:00:52 +01:00
|
|
|
install:
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
2017-10-20 08:59:56 +02:00
|
|
|
set -x;
|
2016-03-14 11:02:01 +01:00
|
|
|
brew update > /dev/null;
|
2017-09-19 20:10:25 +02:00
|
|
|
brew install dash bash python3 gradle jenv;
|
2017-09-19 19:58:31 +02:00
|
|
|
brew install gnu-sed --with-default-names;
|
2017-10-18 13:40:32 +02:00
|
|
|
if ! ruby -e 'v = `javac -version 2>&1`.split()[1].gsub("_", "."); exit Gem::Dependency.new("", "~> 1.8.0.131").match?("", v)'; then
|
|
|
|
brew cask uninstall java --force;
|
|
|
|
brew cask install caskroom/versions/java8;
|
|
|
|
fi;
|
2017-09-19 19:58:31 +02:00
|
|
|
brew cask install android-sdk;
|
|
|
|
|
|
|
|
mkdir -p "$ANDROID_HOME/licenses";
|
|
|
|
echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license";
|
2017-12-20 17:04:19 +01:00
|
|
|
echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license";
|
2017-09-19 19:58:31 +02:00
|
|
|
echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license";
|
2017-12-20 13:18:31 +01:00
|
|
|
echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools";
|
|
|
|
echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2";
|
|
|
|
echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-23";
|
2017-09-19 19:58:31 +02:00
|
|
|
|
2017-12-20 18:04:37 +01:00
|
|
|
sudo pip3 install babel;
|
2017-09-20 15:54:50 +02:00
|
|
|
sudo pip3 install --quiet --editable . ;
|
2016-02-15 23:06:23 +01:00
|
|
|
sudo rm -rf fdroidserver.egg-info;
|
2017-09-19 19:58:31 +02:00
|
|
|
|
2017-10-20 11:35:48 +02:00
|
|
|
ls -l /System/Library/Java/JavaVirtualMachines || true;
|
|
|
|
ls -l /Library/Java/JavaVirtualMachines || true;
|
2017-09-19 19:58:31 +02:00
|
|
|
echo $PATH;
|
|
|
|
echo $JAVA_HOME;
|
2017-09-19 20:10:25 +02:00
|
|
|
jenv versions;
|
2017-09-19 19:58:31 +02:00
|
|
|
/usr/libexec/java_home;
|
|
|
|
java -version;
|
|
|
|
which java;
|
|
|
|
javac -version;
|
|
|
|
which javac;
|
|
|
|
jarsigner -help;
|
|
|
|
which jarsigner;
|
|
|
|
keytool -help;
|
|
|
|
which keytool;
|
2017-10-20 08:59:56 +02:00
|
|
|
set +x;
|
2017-09-19 19:58:31 +02:00
|
|
|
fi
|
2016-02-15 14:00:52 +01:00
|
|
|
|
2017-10-20 08:59:56 +02:00
|
|
|
# The OSX tests seem to run slower, they often timeout. So only run
|
|
|
|
# the test suite with the installed version of fdroid, instead of the
|
|
|
|
# three rounds that ./complete-ci-tests does.
|
2016-02-15 14:00:52 +01:00
|
|
|
script:
|
|
|
|
- cd tests
|
2017-10-20 08:59:56 +02:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
./run-tests;
|
|
|
|
else
|
|
|
|
./complete-ci-tests;
|
|
|
|
fi
|
2016-02-15 14:00:52 +01:00
|
|
|
|
|
|
|
after_failure:
|
|
|
|
- cd $TRAVIS_BUILD_DIR
|
|
|
|
- ls -lR | curl -F 'clbin=<-' https://clbin.com
|