view .gitlab-ci.yml @ 5679:843e1df7912f

head-checking: micro-optimize _filter_obsolete_heads We move the branch name retrieval after the early continue: it was not needed before. On my PyPy clone, this saves about 1.4ms in the time to run _filter_obsolete_heads() for the branchmap entries of the default branch. PyPy having lots of closed branches, for the complete analysis that Heptapod currently performs on each push for PyPy, this gains around 100ms (2.5% for a total time around 4s). All those figures on my workstation.
author Georges Racinet <georges.racinet@octobus.net>
date Tue, 01 Dec 2020 21:05:53 +0100
parents bec8a04d2f6a
children 9a16cf248b05
line wrap: on
line source

.prepare_hg: &prepare_hg
    - hg pull -R /ci/repos/mercurial/
    - hg_branch=$(tests/testlib/map-hg-rev.sh "$(hg identify --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: octobus/ci-py3-hgext3rd
    script:
        - *prepare_hg
        - pytype --version
        - jobs=$(python -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: py2
    PYTHON: python
    RUNTEST_ARGS: ""
    TEST_HGMODULEPOLICY: "allow"

.runtests_template: &runtests
    image: octobus/ci-$PY-hgext3rd
    before_script:
        - (cd tests; ls -1 test-check-*.t > /tmp/check-tests.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:
        RUNTEST_ARGS: "--test-list /tmp/check-tests.txt"

checks-py3:
    <<: *runtests
    variables:
        PY: py3
        PYTHON: python3
        RUNTEST_ARGS: "--test-list /tmp/check-tests.txt"

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

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

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

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

doc:
    image: octobus/ci-py3-evolve-doc
    script:
        - cd docs/
        - make
    variables:
        LANG: en_US.UTF-8
        PYTHON: python3
        PYTHONPATH: "/ci/repos/mercurial:$PYTHONPATH"
        SPHINXBUILD: python3 -m sphinx -b html
    artifacts:
        paths:
            - html/*