mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
74 lines
1.8 KiB
Python
74 lines
1.8 KiB
Python
import contextlib
|
|
import itertools
|
|
|
|
print("# Generated by scripts/make_travisconf.py")
|
|
print("")
|
|
|
|
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('- ". scripts/travis-install.sh"')
|
|
|
|
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", "davical")
|
|
rs_servers = ("mysteryshack",)
|
|
else:
|
|
dav_servers = ("radicale",)
|
|
rs_servers = ()
|
|
|
|
for (server_type, server), requirements in itertools.product(
|
|
itertools.chain(
|
|
(("REMOTESTORAGE", x) for x in rs_servers),
|
|
(("DAV", x) for x in dav_servers)
|
|
),
|
|
("devel", "release", "minimal")
|
|
):
|
|
h()
|
|
p(" env: "
|
|
"BUILD=test "
|
|
"{server_type}_SERVER={server} "
|
|
"REQUIREMENTS={requirements}"
|
|
.format(server_type=server_type,
|
|
server=server,
|
|
requirements=requirements))
|
|
|
|
p("- language: generic")
|
|
p(" os: osx")
|
|
p(" env: BUILD=test")
|
|
|
|
with section("branches"):
|
|
with section("only"):
|
|
p('- auto')
|