numpy

Форк
0
/
.cirrus.star 
54 строки · 1.8 Кб
1
# The guide to programming cirrus-ci tasks using starlark is found at
2
# https://cirrus-ci.org/guide/programming-tasks/
3
#
4
# In this simple starlark script we simply check conditions for whether
5
# a CI run should go ahead. If the conditions are met, then we just
6
# return the yaml containing the tasks to be run.
7

8
load("cirrus", "env", "fs", "http")
9

10
def main(ctx):
11
    ######################################################################
12
    # Should wheels be built?
13
    # Only test on the numpy/numpy repository
14
    ######################################################################
15

16
    if env.get("CIRRUS_REPO_FULL_NAME") != "numpy/numpy":
17
        return []
18

19
    # only run the wheels entry on a cron job
20
    if env.get("CIRRUS_CRON", "") == "nightly":
21
        return fs.read("tools/ci/cirrus_wheels.yml")
22

23
    # Obtain commit message for the event. Unfortunately CIRRUS_CHANGE_MESSAGE
24
    # only contains the actual commit message on a non-PR trigger event.
25
    # For a PR event it contains the PR title and description.
26
    SHA = env.get("CIRRUS_CHANGE_IN_REPO")
27
    url = "https://api.github.com/repos/numpy/numpy/git/commits/" + SHA
28
    dct = http.get(url).json()
29

30
    commit_msg = dct["message"]
31
    if "[skip cirrus]" in  commit_msg or "[skip ci]" in commit_msg:
32
        return []
33

34
    wheel = False
35
    labels = env.get("CIRRUS_PR_LABELS", "")
36
    pr_number = env.get("CIRRUS_PR", "-1")
37
    tag = env.get("CIRRUS_TAG", "")
38

39
    if "[wheel build]" in commit_msg:
40
        wheel = True
41

42
    # if int(pr_number) > 0 and ("14 - Release" in labels or "36 - Build" in labels):
43
    #     wheel = True
44

45
    if tag.startswith("v") and "dev0" not in tag:
46
        wheel = True
47

48
    if wheel:
49
        return fs.read("tools/ci/cirrus_wheels.yml")
50

51
    if int(pr_number) < 0:
52
        return []
53

54
    return fs.read("tools/ci/cirrus_arm.yml")
55

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.