scipy

Форк
0
/
.cirrus.star 
45 строк · 1.9 Кб
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 scipy/scipy repository
14
    # Test if the run was triggered by:
15
    # - a cron job called "nightly". The cron job is not set in this file,
16
    #   but on the cirrus-ci repo page
17
    # - commit message containing [wheel build]
18
    ######################################################################
19

20
    if env.get("CIRRUS_REPO_FULL_NAME") != "scipy/scipy":
21
        return []
22

23
    if env.get("CIRRUS_CRON", "") == "nightly":
24
        return fs.read("ci/cirrus_wheels.yml")
25

26
    # Obtain commit message for the event. Unfortunately CIRRUS_CHANGE_MESSAGE
27
    # only contains the actual commit message on a non-PR trigger event.
28
    # For a PR event it contains the PR title and description.
29
    SHA = env.get("CIRRUS_CHANGE_IN_REPO")
30
    url = "https://api.github.com/repos/scipy/scipy/git/commits/" + SHA
31
    dct = http.get(url).json()
32
    if "[wheel build]" in dct["message"]:
33
        return fs.read("ci/cirrus_wheels.yml")
34

35
    # this configuration runs a single linux_aarch64 + macosx_arm64 run.
36
    # there's no need to do this during a wheel run as they automatically build
37
    # and test over a wider range of Pythons.
38
    PR = int(env.get("CIRRUS_PR", -1))
39
    if PR < 0:
40
        return []
41

42
    if "[skip cirrus]" in dct["message"] or "[skip ci]" in dct["message"] or "[lint only]" in dct["message"] or "[docs only]" in dct["message"]:
43
        return []
44

45
    return fs.read("ci/cirrus_general_ci.yml")
46

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

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

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

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