view .gitlab-ci.yml @ 6911:e14ae43aed88 mercurial-5.9

test-compat: merge mercurial-6.0 into mercurial-5.9
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 25 Oct 2024 16:09:37 +0400
parents 038df334d51a
children a7929709e89f
line wrap: on
line source

.prepare_hg: &prepare_hg
    - hg pull -R /ci/repos/mercurial/ https://repo.mercurial-scm.org/hg
    - hg_branch=${HG_BRANCH:-$(tests/testlib/map-hg-rev.sh $CI_COMMIT_HG_BRANCH)}
    - hg -R /ci/repos/mercurial/ update "$hg_branch"
    - hg_rev=$(hg log -R /ci/repos/mercurial/ -r . -T '{node}')
    - echo testing with mercurial branch="$hg_branch", revision="$hg_rev"

pytype:
    image: registry.heptapod.net/mercurial/ci-images/py3-hgext3rd
    script:
        - *prepare_hg
        - pytype --version
        - jobs=$(python3 -c 'import multiprocessing; print(multiprocessing.cpu_count())')
        - pytype -P /ci/repos/mercurial/:hgext3rd -k hgext3rd -x hgext3rd/evolve/thirdparty -j $jobs || true
    when: manual

variables:
    PY: py3
    PYTHON: python3
    RUNTEST_ARGS: ""
    TEST_HGMODULEPOLICY: "allow"

.runtests_template: &runtests
    image: registry.heptapod.net/mercurial/ci-images/$PY-hgext3rd
    before_script:
        - (cd tests; ls -1 test-check-*.t > /tmp/check-tests.txt)
        - (cd tests; ls -1 test-check-sdist.t test-doctest.py > /tmp/compat-blacklist.txt)
    script:
        - *prepare_hg
        - ($PYTHON --version)
        - (cd tests; set -x; HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON /ci/repos/mercurial/tests/run-tests.py --color=always $RUNTEST_ARGS)

checks-py2:
    <<: *runtests
    variables:
        PY: py2
        PYTHON: prlimit --nofile=1024:1024 python2
        RUNTEST_ARGS: "--test-list /tmp/check-tests.txt --blacklist /tmp/compat-blacklist.txt"
        CI_CLEVER_CLOUD_FLAVOR: S

checks-py3:
    <<: *runtests
    variables:
        RUNTEST_ARGS: "--test-list /tmp/check-tests.txt --blacklist /tmp/compat-blacklist.txt"
        CI_CLEVER_CLOUD_FLAVOR: S

tests-py2-cext:
    <<: *runtests
    variables:
        PY: py2
        PYTHON: prlimit --nofile=1024:1024 python2
        RUNTEST_ARGS: "--no-rust --blacklist /tmp/check-tests.txt --blacklist /tmp/compat-blacklist.txt"
        TEST_HGMODULEPOLICY: "c"

tests-py2-pure:
    <<: *runtests
    variables:
        PY: py2
        PYTHON: prlimit --nofile=1024:1024 python2
        RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt --blacklist /tmp/compat-blacklist.txt"
        TEST_HGMODULEPOLICY: "py"

tests-py3-cext:
    <<: *runtests
    variables:
        RUNTEST_ARGS: "--no-rust --blacklist /tmp/check-tests.txt --blacklist /tmp/compat-blacklist.txt"
        TEST_HGMODULEPOLICY: "c"

tests-py3-pure:
    <<: *runtests
    variables:
        RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt --blacklist /tmp/compat-blacklist.txt"
        TEST_HGMODULEPOLICY: "py"

.windows_runtests_template: &windows_runtests
    before_script:
        - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.t > C:/Temp/check-tests.txt'
    script:
        - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && tests/testlib/update-hg-repo.sh C:/Temp/hg'
        - >
          C:/MinGW/msys/1.0/bin/sh.exe --login -c '
          cd "$OLDPWD" &&
          evo_branch=$(hg identify --branch) &&
          hg_branch=${HG_BRANCH:-$(tests/testlib/map-hg-rev.sh "$evo_branch")} &&
          hg -R C:/Temp/hg update "$hg_branch" &&
          hg_rev=$(hg log -R C:/Temp/hg -r . -T "\{node\}") &&
          echo testing with mercurial branch="$hg_branch", revision="$hg_rev"'
        - Invoke-Expression "$Env:PYTHON --version"
        - echo "$Env:RUNTEST_ARGS"
        - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON C:/Temp/hg/tests/run-tests.py --color=always $RUNTEST_ARGS'

windows-py3:
    <<: *windows_runtests
    tags:
        - windows
    variables:
        PYTHON: py -3
        RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt"
        TEST_HGMODULEPOLICY: "c"
    when: manual