File: .cirrus.star

package info (click to toggle)
mdanalysis 2.9.0-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 115,708 kB
  • sloc: python: 86,757; ansic: 8,156; makefile: 215; sh: 138
file content (30 lines) | stat: -rw-r--r-- 1,233 bytes parent folder | download | duplicates (3)
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 []