mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Merge pull request #305 from untitaker/build-improvements
Improve builds
This commit is contained in:
commit
2782186421
3 changed files with 132 additions and 39 deletions
102
.travis.yml
102
.travis.yml
|
|
@ -1,48 +1,72 @@
|
||||||
|
# Generated by scripts/make_travisconf.py
|
||||||
|
|
||||||
sudo: true
|
sudo: true
|
||||||
language: python
|
language: python
|
||||||
python:
|
|
||||||
- "2.7"
|
|
||||||
- "pypy"
|
|
||||||
- "3.3"
|
|
||||||
- "3.4"
|
|
||||||
- "3.5"
|
|
||||||
env:
|
|
||||||
- BUILD=test
|
|
||||||
# Default build, see Makefile
|
|
||||||
|
|
||||||
- BUILD=style
|
|
||||||
# flake8 with plugins
|
|
||||||
|
|
||||||
# REMOTESTORAGE TESTS
|
|
||||||
|
|
||||||
# - BUILD=test REMOTESTORAGE_SERVER=restore
|
|
||||||
# Testing against reStore
|
|
||||||
# https://github.com/jcoglan/restore/issues/38
|
|
||||||
# https://github.com/jcoglan/restore/issues/37
|
|
||||||
|
|
||||||
# DAV TESTS
|
|
||||||
|
|
||||||
- BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem
|
|
||||||
# Radicale-release with filesystem storage
|
|
||||||
|
|
||||||
- BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem
|
|
||||||
PKGS='lxml==3.0 requests==2.4.1 requests_toolbelt==0.4.0 click==5.0'
|
|
||||||
# Minimal requirements
|
|
||||||
|
|
||||||
- BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=devel
|
|
||||||
# Radicale-git with filesystem storage
|
|
||||||
|
|
||||||
- BUILD=test DAV_SERVER=owncloud
|
|
||||||
# Latest ownCloud release
|
|
||||||
|
|
||||||
- BUILD=test DAV_SERVER=baikal
|
|
||||||
# Latest Baikal release
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- "pip install -U pip"
|
- "pip install -U pip"
|
||||||
- "pip install wheel"
|
- "pip install wheel"
|
||||||
- "pip install -e ."
|
- "make -e install-dev"
|
||||||
- "make -e install-$BUILD"
|
- "make -e install-$BUILD"
|
||||||
- '[ -z "$PKGS" ] || pip install $PKGS'
|
|
||||||
script:
|
script:
|
||||||
- "make -e $BUILD"
|
- "make -e $BUILD"
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=style
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=release
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=test DAV_SERVER=owncloud REQUIREMENTS=devel
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=test DAV_SERVER=owncloud REQUIREMENTS=minimal
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=test DAV_SERVER=baikal REQUIREMENTS=devel
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=test DAV_SERVER=baikal REQUIREMENTS=release
|
||||||
|
- python: 2.7
|
||||||
|
env: BUILD=test DAV_SERVER=baikal REQUIREMENTS=minimal
|
||||||
|
- python: 3.3
|
||||||
|
env: BUILD=style
|
||||||
|
- python: 3.3
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel
|
||||||
|
- python: 3.3
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=release
|
||||||
|
- python: 3.4
|
||||||
|
env: BUILD=style
|
||||||
|
- python: 3.4
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel
|
||||||
|
- python: 3.4
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=release
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=style
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=release
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=test DAV_SERVER=owncloud REQUIREMENTS=devel
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=test DAV_SERVER=owncloud REQUIREMENTS=minimal
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=test DAV_SERVER=baikal REQUIREMENTS=devel
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=test DAV_SERVER=baikal REQUIREMENTS=release
|
||||||
|
- python: 3.5
|
||||||
|
env: BUILD=test DAV_SERVER=baikal REQUIREMENTS=minimal
|
||||||
|
- python: pypy
|
||||||
|
env: BUILD=style
|
||||||
|
- python: pypy
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel
|
||||||
|
- python: pypy
|
||||||
|
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=release
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
13
Makefile
13
Makefile
|
|
@ -50,6 +50,11 @@ style:
|
||||||
flake8
|
flake8
|
||||||
! grep -ri syncroniz */*
|
! grep -ri syncroniz */*
|
||||||
sphinx-build -W -b html ./docs/ ./docs/_build/html/
|
sphinx-build -W -b html ./docs/ ./docs/_build/html/
|
||||||
|
$(MAKE) travis-conf
|
||||||
|
git diff --exit-code
|
||||||
|
|
||||||
|
travis-conf:
|
||||||
|
python3 scripts/make_travisconf.py > .travis.yml
|
||||||
|
|
||||||
install-docs:
|
install-docs:
|
||||||
pip install sphinx sphinx_rtd_theme
|
pip install sphinx sphinx_rtd_theme
|
||||||
|
|
@ -69,4 +74,12 @@ all:
|
||||||
release:
|
release:
|
||||||
python setup.py sdist bdist_wheel upload
|
python setup.py sdist bdist_wheel upload
|
||||||
|
|
||||||
|
install-dev:
|
||||||
|
pip install -e .
|
||||||
|
set -xe && if [ "$$REQUIREMENTS" = "devel" ]; then \
|
||||||
|
pip install -U --force-reinstall git+https://github.com/kennethreitz/requests; \
|
||||||
|
elif [ "$$REQUIREMENTS" = "minimal" ]; then \
|
||||||
|
pip install -U --force-reinstall lxml==3.0 requests==2.4.1 requests_toolbelt==0.4.0 click==5.0; \
|
||||||
|
fi
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
|
|
|
||||||
56
scripts/make_travisconf.py
Normal file
56
scripts/make_travisconf.py
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
print("# Generated by scripts/make_travisconf.py")
|
||||||
|
print("")
|
||||||
|
|
||||||
|
import contextlib
|
||||||
|
import itertools
|
||||||
|
i = 0
|
||||||
|
|
||||||
|
|
||||||
|
def p(s):
|
||||||
|
print(" " * i + s)
|
||||||
|
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def section(name):
|
||||||
|
p("{}:".format(name))
|
||||||
|
global i
|
||||||
|
i += 1
|
||||||
|
yield
|
||||||
|
i -= 1
|
||||||
|
print("")
|
||||||
|
|
||||||
|
p("sudo: true")
|
||||||
|
p("language: python")
|
||||||
|
p("")
|
||||||
|
|
||||||
|
with section("install"):
|
||||||
|
p('- "pip install -U pip"')
|
||||||
|
p('- "pip install wheel"')
|
||||||
|
p('- "make -e install-dev"')
|
||||||
|
p('- "make -e install-$BUILD"')
|
||||||
|
|
||||||
|
with section("script"):
|
||||||
|
p('- "make -e $BUILD"')
|
||||||
|
|
||||||
|
with section("matrix"):
|
||||||
|
with section("include"):
|
||||||
|
for python in ("2.7", "3.3", "3.4", "3.5", "pypy"):
|
||||||
|
h = lambda: p("- python: {}".format(python))
|
||||||
|
h()
|
||||||
|
p(" env: BUILD=style")
|
||||||
|
|
||||||
|
if python in ("2.7", "3.5"):
|
||||||
|
dav_servers = ("radicale", "owncloud", "baikal")
|
||||||
|
else:
|
||||||
|
dav_servers = ("radicale",)
|
||||||
|
|
||||||
|
for dav_server, requirements in itertools.product(
|
||||||
|
dav_servers,
|
||||||
|
("devel", "release", "minimal")
|
||||||
|
):
|
||||||
|
if dav_server == "radicale" and requirements == "minimal":
|
||||||
|
# only the latest radicale is supported
|
||||||
|
continue
|
||||||
|
h()
|
||||||
|
p(" env: BUILD=test DAV_SERVER={} REQUIREMENTS={}"
|
||||||
|
.format(dav_server, requirements))
|
||||||
Loading…
Reference in a new issue