forked from MDAnalysis/mdanalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.star
30 lines (22 loc) · 1.2 KB
/
.cirrus.star
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# See https://cirrus-ci.org/guide/programming-tasks/ for more information on
# starlark CirrusCI files
# Inspired by scipy's .cirrus.star script https://github.com/scipy/scipy/blob/main/.cirrus.star
# In the spirit of ensuring this can also be freely used in derviative works by
# the community, we release the contents of this file under the MIT license.
load("cirrus", "env", "fs")
def main(ctx):
# Default case: don't do anything if not in the core repo
if env.get("CIRRUS_REPO_FULL_NAME") != "MDAnalysis/mdanalysis":
return []
# Some debugging to know what state you are in, by default everything is None but PR
print(env.get("CIRRUS_TAG") == None)
print(env.get("CIRRUS_RELEASE") == None)
print(env.get("CIRRUS_PR") != None)
print(env.get("CIRRUS_BASE_BRANCH") == "develop")
# If it's a CRON job named twiceweekly
if ((env.get("CIRRUS_CRON") == "twiceweekly") and (env.get("CIRRUS_BRANCH") == "develop")):
return fs.read("maintainer/ci/cirrus-ci.yml")
# If you've tagged a package or released something, deploy
if ((env.get("CIRRUS_TAG") != None) or (env.get("CIRRUS_RELEASE") != None)):
return fs.read("maintainer/ci/cirrus-deploy.yml")
return []