mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Merge branch 'full-bsd-osx-port' into 'master'
Full BSD/OSX port This finishes up the OSX port by getting the full test suite running on OSX. It also sets up an OSX CI job travis-ci.org, run as part of the github mirror here: https://github.com/f-droid/fdroidserver You can see those CI builds here: https://travis-ci.org/f-droid/fdroidserver This should translate entirely to *BSD since OSX's user land is merged with FreeBSD. See merge request !100
This commit is contained in:
commit
f861faa86d
7 changed files with 71 additions and 14 deletions
49
.travis.yml
Normal file
49
.travis.yml
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
|
||||||
|
# Use the Android base system since it provides the SDK, etc.
|
||||||
|
language: java
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- os: linux # this is really about OSX, Ubuntu is just bonus
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
language: android
|
||||||
|
sudo: required
|
||||||
|
# this doesn't actually work yet https://github.com/travis-ci/travis-ci/issues/5337
|
||||||
|
dist: trusty
|
||||||
|
- os: osx
|
||||||
|
env: ANDROID_HOME=/usr/local/opt/android-sdk
|
||||||
|
|
||||||
|
licenses:
|
||||||
|
- 'android-sdk-preview-license-52d11cd2'
|
||||||
|
- 'android-sdk-license-.+'
|
||||||
|
|
||||||
|
# the PPA is needed on Ubuntu 14.04 precise, and with python3, trusty too
|
||||||
|
# the pip thing is a hack that can go away with trusty
|
||||||
|
install:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
|
brew update;
|
||||||
|
brew install android-sdk dash gnu-sed jpeg python;
|
||||||
|
sudo pip install pep8 pyflakes pylint;
|
||||||
|
sudo pip install -e .;
|
||||||
|
sudo rm -rf fdroidserver.egg-info;
|
||||||
|
echo y | android --verbose update sdk --no-ui --filter platform-tools,build-tools-23.0.2;
|
||||||
|
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||||
|
sudo add-apt-repository ppa:guardianproject/fdroidserver -y;
|
||||||
|
sudo apt-get -q update -y;
|
||||||
|
sudo apt-get -q install -y --no-install-recommends python
|
||||||
|
python-git python-imaging python-libcloud python-logilab-astng
|
||||||
|
python-paramiko python-pip python-pyasn1 python-pyasn1-modules
|
||||||
|
python-requests python-virtualenv python-yaml rsync
|
||||||
|
pylint pep8 dash bash ruby
|
||||||
|
python-dev libjpeg-dev zlib1g-dev;
|
||||||
|
fi
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cd tests
|
||||||
|
- ./complete-ci-tests
|
||||||
|
|
||||||
|
after_failure:
|
||||||
|
- cd $TRAVIS_BUILD_DIR
|
||||||
|
- ls -lRa env
|
||||||
|
- ls -lR | curl -F 'clbin=<-' https://clbin.com
|
||||||
|
|
@ -66,17 +66,17 @@ def main():
|
||||||
|
|
||||||
# find root install prefix
|
# find root install prefix
|
||||||
tmp = os.path.dirname(sys.argv[0])
|
tmp = os.path.dirname(sys.argv[0])
|
||||||
|
examplesdir = None
|
||||||
if os.path.basename(tmp) == 'bin':
|
if os.path.basename(tmp) == 'bin':
|
||||||
prefix = None
|
|
||||||
egg_link = os.path.join(tmp, '..', 'local/lib/python2.7/site-packages/fdroidserver.egg-link')
|
egg_link = os.path.join(tmp, '..', 'local/lib/python2.7/site-packages/fdroidserver.egg-link')
|
||||||
if os.path.exists(egg_link):
|
if os.path.exists(egg_link):
|
||||||
# installed from local git repo
|
# installed from local git repo
|
||||||
examplesdir = os.path.join(open(egg_link).readline().rstrip(), 'examples')
|
examplesdir = os.path.join(open(egg_link).readline().rstrip(), 'examples')
|
||||||
else:
|
else:
|
||||||
prefix = os.path.dirname(os.path.dirname(__file__)) # use .egg layout
|
# try .egg layout
|
||||||
if not prefix.endswith('.egg'): # use UNIX layout
|
examplesdir = os.path.dirname(os.path.dirname(__file__)) + '/share/doc/fdroidserver/examples'
|
||||||
prefix = os.path.dirname(tmp)
|
if not os.path.exists(examplesdir): # use UNIX layout
|
||||||
examplesdir = prefix + '/share/doc/fdroidserver/examples'
|
examplesdir = os.path.dirname(tmp) + '/share/doc/fdroidserver/examples'
|
||||||
else:
|
else:
|
||||||
# we're running straight out of the git repo
|
# we're running straight out of the git repo
|
||||||
prefix = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
|
prefix = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,10 @@ err() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warn() {
|
||||||
|
echo WARNING: "$@"
|
||||||
|
}
|
||||||
|
|
||||||
cmd_exists() {
|
cmd_exists() {
|
||||||
command -v $1 1>/dev/null
|
command -v $1 1>/dev/null
|
||||||
}
|
}
|
||||||
|
|
@ -72,7 +76,8 @@ if cmd_exists pyflakes-python2; then
|
||||||
elif cmd_exists pyflakes; then
|
elif cmd_exists pyflakes; then
|
||||||
PYFLAKES=pyflakes
|
PYFLAKES=pyflakes
|
||||||
else
|
else
|
||||||
err "pyflakes is not installed!"
|
PYFLAKES=echo
|
||||||
|
warn "pyflakes is not installed, using dummy placeholder!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if cmd_exists pep8-python2; then
|
if cmd_exists pep8-python2; then
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
if [ `dirname $0` != "." ]; then
|
if [ `dirname $0` != "." ]; then
|
||||||
echo "only run this script like ./`basename $0`"
|
echo "only run this script like ./`basename $0`"
|
||||||
exit
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
@ -22,7 +22,7 @@ if [ -z $ANDROID_HOME ]; then
|
||||||
. ~/.android/bashrc
|
. ~/.android/bashrc
|
||||||
else
|
else
|
||||||
echo "ANDROID_HOME must be set!"
|
echo "ANDROID_HOME must be set!"
|
||||||
exit
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ create_fake_android_home() {
|
||||||
|
|
||||||
create_test_dir() {
|
create_test_dir() {
|
||||||
test -e $WORKSPACE/.testfiles || mkdir $WORKSPACE/.testfiles
|
test -e $WORKSPACE/.testfiles || mkdir $WORKSPACE/.testfiles
|
||||||
TMPDIR=$WORKSPACE/.testfiles mktemp -d
|
mktemp -d $WORKSPACE/.testfiles/run-tests.XXXX
|
||||||
}
|
}
|
||||||
|
|
||||||
create_test_file() {
|
create_test_file() {
|
||||||
|
|
@ -115,7 +115,10 @@ $fdroid --version
|
||||||
echo_header "build the TeX manual"
|
echo_header "build the TeX manual"
|
||||||
|
|
||||||
cd $WORKSPACE/docs
|
cd $WORKSPACE/docs
|
||||||
|
# this is only ever generated officially on GNU/Linux
|
||||||
|
if [ `uname -s` == "Linux" ]; then
|
||||||
./gendocs.sh -o html --email admin@f-droid.org fdroid "F-Droid Server Manual"
|
./gendocs.sh -o html --email admin@f-droid.org fdroid "F-Droid Server Manual"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
|
|
@ -503,7 +506,7 @@ test -e repo/index.jar
|
||||||
grep -F '<application id=' repo/index.xml > /dev/null
|
grep -F '<application id=' repo/index.xml > /dev/null
|
||||||
|
|
||||||
# now set fake repo_keyalias
|
# now set fake repo_keyalias
|
||||||
sed -i 's,^ *repo_keyalias.*,repo_keyalias = "fake",' $REPOROOT/config.py
|
sed -i.tmp 's,^ *repo_keyalias.*,repo_keyalias = "fake",' $REPOROOT/config.py
|
||||||
set +e
|
set +e
|
||||||
$fdroid update
|
$fdroid update
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue