mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Use travis' new conditional branches (#670)
See https://github.com/travis-ci/travis-ci/issues/2778#issuecomment-329968553 See https://docs.travis-ci.com/user/conditional-builds-stages-jobs/#Conditional-Jobs
This commit is contained in:
parent
18a4f93c97
commit
e2583ededf
2 changed files with 50 additions and 50 deletions
71
.travis.yml
71
.travis.yml
|
|
@ -17,142 +17,145 @@
|
|||
"matrix": {
|
||||
"include": [
|
||||
{
|
||||
"env": "BUILD=style BUILD_PRS=true",
|
||||
"env": "BUILD=style",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel ",
|
||||
"python": "3.3"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel ",
|
||||
"python": "3.3"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ",
|
||||
"python": "3.3"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
|
||||
"python": "3.3"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ",
|
||||
"python": "3.3"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal ",
|
||||
"python": "3.3"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel ",
|
||||
"python": "3.4"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel ",
|
||||
"python": "3.4"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ",
|
||||
"python": "3.4"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
|
||||
"python": "3.4"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ",
|
||||
"python": "3.4"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal ",
|
||||
"python": "3.4"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel ",
|
||||
"python": "3.5"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel ",
|
||||
"python": "3.5"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ",
|
||||
"python": "3.5"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
|
||||
"python": "3.5"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ",
|
||||
"python": "3.5"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal ",
|
||||
"python": "3.5"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=release ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=release BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=release ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=release BUILD_PRS=false ",
|
||||
"env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=release ",
|
||||
"if": "NOT (type IN (pull_request))",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=icloud REQUIREMENTS=release BUILD_PRS=false ",
|
||||
"env": "BUILD=test DAV_SERVER=icloud REQUIREMENTS=release ",
|
||||
"if": "NOT (type IN (pull_request))",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=fastmail REQUIREMENTS=release BUILD_PRS=false ",
|
||||
"env": "BUILD=test DAV_SERVER=fastmail REQUIREMENTS=release ",
|
||||
"if": "NOT (type IN (pull_request))",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal BUILD_PRS=true ",
|
||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal ",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test ETESYNC_TESTS=true REQUIREMENTS=latest BUILD_PRS=true ",
|
||||
"env": "BUILD=test ETESYNC_TESTS=true REQUIREMENTS=latest",
|
||||
"python": "3.6"
|
||||
},
|
||||
{
|
||||
"env": "BUILD=test BUILD_PRS=true",
|
||||
"env": "BUILD=test",
|
||||
"language": "generic",
|
||||
"os": "osx"
|
||||
}
|
||||
]
|
||||
},
|
||||
"script": [
|
||||
"\nif [ \"$TRAVIS_PULL_REQUEST\" = \"false\" ] || [ \"$BUILD_PRS\" != \"false\" ];\nthen make -e $BUILD;\nfi"
|
||||
"make -e $BUILD"
|
||||
],
|
||||
"sudo": true
|
||||
}
|
||||
|
|
@ -28,19 +28,14 @@ make -e install-dev;
|
|||
make -e install-$BUILD;
|
||||
"""]
|
||||
|
||||
script = """
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] || [ "$BUILD_PRS" != "false" ];
|
||||
then {};
|
||||
fi""".format
|
||||
|
||||
cfg['script'] = [script("make -e $BUILD")]
|
||||
cfg['script'] = ["make -e $BUILD"]
|
||||
|
||||
matrix = []
|
||||
cfg['matrix'] = {'include': matrix}
|
||||
|
||||
matrix.append({
|
||||
'python': latest_python,
|
||||
'env': 'BUILD=style BUILD_PRS=true'
|
||||
'env': 'BUILD=style'
|
||||
})
|
||||
|
||||
|
||||
|
|
@ -53,30 +48,32 @@ for python, requirements in itertools.product(python_versions,
|
|||
"fastmail")
|
||||
|
||||
for dav_server in dav_servers:
|
||||
build_prs = dav_server not in ("fastmail", "davical", "icloud")
|
||||
matrix.append({
|
||||
job = {
|
||||
'python': python,
|
||||
'env': ("BUILD=test "
|
||||
"DAV_SERVER={dav_server} "
|
||||
"REQUIREMENTS={requirements} "
|
||||
"BUILD_PRS={build_prs} "
|
||||
.format(dav_server=dav_server,
|
||||
requirements=requirements,
|
||||
build_prs=build_prs and "true" or "false"))
|
||||
})
|
||||
requirements=requirements))
|
||||
}
|
||||
|
||||
build_prs = dav_server not in ("fastmail", "davical", "icloud")
|
||||
if not build_prs:
|
||||
job['if'] = 'NOT (type IN (pull_request))'
|
||||
|
||||
matrix.append(job)
|
||||
|
||||
matrix.append({
|
||||
'python': latest_python,
|
||||
'env': ("BUILD=test "
|
||||
"ETESYNC_TESTS=true "
|
||||
"REQUIREMENTS=latest "
|
||||
"BUILD_PRS=true ")
|
||||
"REQUIREMENTS=latest")
|
||||
})
|
||||
|
||||
matrix.append({
|
||||
'language': 'generic',
|
||||
'os': 'osx',
|
||||
'env': 'BUILD=test BUILD_PRS=true'
|
||||
'env': 'BUILD=test'
|
||||
})
|
||||
|
||||
json.dump(cfg, sys.stdout, sort_keys=True, indent=2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue