##// END OF EJS Templates
rust-update: make `update_from_null` respect `worker.numcpu` config option...
rust-update: make `update_from_null` respect `worker.numcpu` config option This was overlooked in the original series. This is important for tests (because we run many at once), and for the occasional end user that wants to keep their CPU usage in check. A future series should clean up this `worker` parameter tunelling business by rewriting the config in Rust, but doing so on stable would be a very bad idea.

File last commit:

r53049:8766d47e stable
r53083:e6a44bc9 stable
Show More
heptapod-ci.yml
252 lines | 7.8 KiB | text/x-yaml | YamlLexer
Raphaël Gomès
heptapod-ci: don't run pipelines for topic-less branches...
r51630 # Don't run pipelines on branch "merge", since we're fast-forward only.
# Gitlab sees a new branch (since e.g. `topic/stable/my-topic` becomes
# `branch/stable`), but the hash hasn't changed. There is no reason to
# re-run the CI in our case, since we haven't built up any specific automation.
# Right now it's just wasted CI and developer time.
Raphaël Gomès
heptapod-ci: remove push exception for named branches...
r51632 # One can still run the pipeline manually via the web interface,
Raphaël Gomès
heptapod-ci: don't run pipelines for topic-less branches...
r51630 # like in the case of releases, to make *extra* sure that the actual branch
# has succeeded.
workflow:
rules:
Raphaël Gomès
heptapod-ci: remove push exception for named branches...
r51632 - if: $CI_COMMIT_BRANCH =~ /^branch\/.*/ && $CI_PIPELINE_SOURCE != "web"
Raphaël Gomès
heptapod-ci: don't run pipelines for topic-less branches...
r51630 when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
Raphaël Gomès
heptapod-ci: turn off pipelines for merge request events...
r51634 when: never
- if: $CI_PIPELINE_SOURCE == "push"
Raphaël Gomès
heptapod-ci: always make the default run condition explicit...
r51633 when: always
Raphaël Gomès
heptapod-ci: don't run pipelines for topic-less branches...
r51630 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
Raphaël Gomès
heptapod-ci: always make the default run condition explicit...
r51633 when: always
Raphaël Gomès
heptapod-ci: don't run pipelines for topic-less branches...
r51630
heptapod-ci: add a explicite "test" phases...
r46573 stages:
ci: split the jobs on more stage...
r53043 - build
- checks
heptapod-ci: add a explicite "test" phases...
r46573 - tests
ci: split the jobs on more stage...
r53043 - platform-compat
- py-version-compat
heptapod-ci: add a explicite "test" phases...
r46573
heptapod-ci: allow testing with docker image other than :latest...
r47041 image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG
heptapod-ci: add a basic file to be able to run tests with heptapod...
r44752
heptapod-ci: run test with python3 too...
r44754 variables:
PYTHON: python
Raphaël Gomès
heptapod-ci: use new v2.1 image...
r52606 HG_CI_IMAGE_TAG: "v2.1"
Joerg Sonnenberger
ci: hook network-io tests into the pipeline...
r47434 TEST_HGTESTS_ALLOW_NETIO: "0"
ci: display tool version more selectively...
r52895 SHOW_VERSION_OF: "$PYTHON"
heptapod-ci: run test with python3 too...
r44754
ci: add a "all" template to easily control "when" test run...
r48633 .all_template: &all
ci: do not trigger phabricator for merge-request...
r50076 when: on_success
ci: split the jobs on more stage...
r53043 needs: []
ci: add a "all" template to easily control "when" test run...
r48633
ci: build a wheel and use it to run c tests...
r53044 # TODO: we should use an image based on manylinux instead "all-in-one" image
# used for all test so far.
.build-wheel: &wheel
<<: *all
stage: build
variables:
WHEEL_TYPE: ""
FLAVOR: ""
before_script:
- echo "python used, $PYTHON"
- $PYTHON --version
- echo $WHEEL_TYPE
- test -n "$WHEEL_TYPE"
- echo $FLAVOR
- mkdir -p wheels/$WHEEL_TYPE
script:
- $PYTHON setup.py bdist_wheel $FLAVOR --dist-dir wheels/$WHEEL_TYPE
artifacts:
paths:
- wheels/$WHEEL_TYPE
expire_in: 1 week
build-c-wheel:
<<: *wheel
variables:
WHEEL_TYPE: "c"
# TODO: We should select the wheel compatible with the python (and plateform)
# we use. This is necessary to build multiple wheel.
heptapod-ci: run test with python3 too...
r44754 .runtests_template: &runtests
ci: add a "all" template to easily control "when" test run...
r48633 <<: *all
heptapod-ci: add a explicite "test" phases...
r46573 stage: tests
Dan Villiom Podlaski Christiansen
ci: avoid a global before_script definition...
r46861 # The runner made a clone as root.
# We make a new clone owned by user used to run the step.
before_script:
Raphaël Gomès
heptapod-ci: move version prints closer to the start...
r52605 - echo "python used, $PYTHON"
ci: display tool version more selectively...
r52895 - for tool in $SHOW_VERSION_OF ; do echo '#' version of $tool; $tool --version; done
Matt Harbison
ci: add a runner for macos...
r52907 - rm -rf /tmp/mercurial-ci/ # Clean slate if not using containers
Dan Villiom Podlaski Christiansen
ci: avoid a global before_script definition...
r46861 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
- hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
- cd /tmp/mercurial-ci/
- ls -1 tests/test-check-*.* > /tmp/check-tests.txt
heptapod-ci: add a basic file to be able to run tests with heptapod...
r44752 script:
heptapod-ci: run the normal test suite...
r44756 - echo "$RUNTEST_ARGS"
ci: build a wheel and use it to run c tests...
r53044 - echo "$WHEEL_TYPE"
- WHEEL=""
- if test -n "$WHEEL_TYPE"; then
WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$WHEEL_TYPE/*.whl`";
test -n "$WHEEL";
fi
- if test -n "$WHEEL"; then
echo installing from $WHEEL;
HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" "$PYTHON" tests/run-tests.py --hg-wheel $WHEEL --color=always $RUNTEST_ARGS;
else
echo installing from source;
HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS;
fi
heptapod-ci: run test with python3 too...
r44754
Raphaël Gomès
heptapod-ci: remove useless mentions of Python 3...
r49804 checks:
heptapod-ci: run test with python3 too...
r44754 <<: *runtests
ci: split the jobs on more stage...
r53043 stage: checks
heptapod-ci: run test with python3 too...
r44754 variables:
ci: display tool version more selectively...
r52895 SHOW_VERSION_OF: "$PYTHON black clang-format"
heptapod-ci: run the normal test suite...
r44756 RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
Raphaël Gomès
contrib: adjust heptapod CI flavor sizes...
r50840 CI_CLEVER_CLOUD_FLAVOR: S
heptapod-ci: also run the dedicated rust test for the rust code...
r44755
Raphaël Gomès
heptapod-ci: remove useless mentions of Python 3...
r49804 rust-cargo-test:
ci: have rust-cargo-test inherit from all...
r50083 <<: *all
ci: split the jobs on more stage...
r53043 stage: checks
heptapod-ci: also run the dedicated rust test for the rust code...
r44755 script:
- make rust-tests
Raphaël Gomès
heptapod-ci: add `clippy` to the CI...
r50837 - make cargo-clippy
heptapod-ci: also run the dedicated rust test for the rust code...
r44755 variables:
Raphaël Gomès
contrib: adjust heptapod CI flavor sizes...
r50840 CI_CLEVER_CLOUD_FLAVOR: S
heptapod-ci: also run the dedicated rust test for the rust code...
r44755
ci: build a wheel and use it to run c tests...
r53044 .test-c: &test_c
heptapod-ci: run the normal test suite...
r44756 <<: *runtests
variables:
heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
r44974 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
Joerg Sonnenberger
ci: hook network-io tests into the pipeline...
r47434 TEST_HGTESTS_ALLOW_NETIO: "1"
heptapod-ci: run the --pure test too...
r44757
ci: build a wheel and use it to run c tests...
r53044 test-c:
<<: *test_c
needs: [build-c-wheel]
variables:
WHEEL_TYPE: "c"
RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
TEST_HGTESTS_ALLOW_NETIO: "1"
Raphaël Gomès
heptapod-ci: remove useless mentions of Python 3...
r49804 test-pure:
heptapod-ci: run the --pure test too...
r44757 <<: *runtests
variables:
RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
heptapod-ci: add a job to test the rust version of Mercurial...
r44758
ci: also offer to test 3.12 with rust...
r52740 test-rust: &test_rust
heptapod-ci: add a job to test the rust version of Mercurial...
r44758 <<: *runtests
variables:
HGWITHRUSTEXT: cpython
heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
r44974 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
heptapod-ci: also run tests for chg on python 2...
r45462
Raphaël Gomès
heptapod-ci: remove useless mentions of Python 3...
r49804 test-rhg:
Simon Sapin
ci: Add a job testing with rhg installed as `hg`...
r47489 <<: *runtests
variables:
HGWITHRUSTEXT: cpython
RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt"
Raphaël Gomès
heptapod-ci: remove useless mentions of Python 3...
r49804 test-chg:
Pulkit Goyal
contrib: run python3+chg tests too in heptapod CI...
r46762 <<: *runtests
variables:
RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
Matt Harbison
heptapod-ci: enable pytype checking...
r47951
ci: add the option to test more Python versions...
r52739 # note: we should probably get a full matrix for flavor × py-version, but this
# is a simple start to be able to check if we break the lowest supported
# version (and 3.12 have been giving us various troubles)
test-3.8-c:
<<: *test_c
ci: split the jobs on more stage...
r53043 stage: py-version-compat
ci: add the option to test more Python versions...
r52739 when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.8
test-3.12-c:
<<: *test_c
ci: split the jobs on more stage...
r53043 stage: py-version-compat
ci: add the option to test more Python versions...
r52739 when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.12
ci: also offer to test 3.12 with rust...
r52740 test-3.12-rust:
<<: *test_rust
ci: split the jobs on more stage...
r53043 stage: py-version-compat
ci: also offer to test 3.12 with rust...
r52740 when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.12
ci: also offer tests with Python 3.13...
r52887 test-3.13-c:
<<: *test_c
ci: split the jobs on more stage...
r53043 stage: py-version-compat
ci: also offer tests with Python 3.13...
r52887 when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.13
test-3.13-rust:
<<: *test_rust
ci: split the jobs on more stage...
r53043 stage: py-version-compat
ci: also offer tests with Python 3.13...
r52887 when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.13
Raphaël Gomès
heptapod-ci: remove useless mentions of Python 3...
r49804 check-pytype:
ci: unify the way `check-pytype` inherit the common setting...
r53042 <<: *test_rust
ci: split the jobs on more stage...
r53043 stage: checks
Matt Harbison
heptapod-ci: enable pytype checking...
r47951 before_script:
Raphaël Gomès
heptapod-ci: use new v2.1 image...
r52606 - export PATH="/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/shims:/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/bin:$PATH"
- echo "PATH, $PATH"
Matt Harbison
heptapod-ci: enable pytype checking...
r47951 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
- hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
- cd /tmp/mercurial-ci/
- make local PYTHON=$PYTHON
Matt Harbison
ci: run the script to add vendored type stubs to typeshed...
r50548 - ./contrib/setup-pytype.sh
Raphaël Gomès
heptapod-ci: use shell script in pytype step
r50397 script:
- echo "Entering script section"
- sh contrib/check-pytype.sh
Raphaël Gomès
ci-windows: introduce manual windows CI...
r48370
# `sh.exe --login` sets a couple of extra environment variables that are defined
# in the MinGW shell, but switches CWD to /home/$username. The previous value
# is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running
# run-tests.py- it is needed to make run-tests.py generate a `python3` script
# that satisfies the various shebang lines and delegates to `py -3`.
.window_runtests_template: &windows_runtests
ci: add a "all" template to easily control "when" test run...
r48633 <<: *all
Raphaël Gomès
heptapod-ci: make Windows jobs manual again...
r49354 when: manual # we don't have any Windows runners anymore at the moment
ci: split the jobs on more stage...
r53043 stage: platform-compat
Raphaël Gomès
ci-windows: introduce manual windows CI...
r48370 before_script:
Matt Harbison
ci: add a runner for Windows 10...
r53049 - C:/hgdev/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/hgdev/tmp/check-tests.txt'
Raphaël Gomès
ci-windows: introduce manual windows CI...
r48370 # TODO: find/install cvs, bzr, perforce, gpg, sqlite3
script:
- echo "Entering script section"
- echo "python used, $Env:PYTHON"
- Invoke-Expression "$Env:PYTHON -V"
- echo "$Env:RUNTEST_ARGS"
Raphaël Gomès
windows-ci: clean up the Heptapod CI file now that the baseline is solid...
r48606 - echo "$Env:TMP"
- echo "$Env:TEMP"
Raphaël Gomès
ci-windows: introduce manual windows CI...
r48370
Matt Harbison
ci: add a runner for Windows 10...
r53049 - C:/hgdev/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" $PYTHON tests/run-tests.py --color=always $RUNTEST_ARGS'
Raphaël Gomès
ci-windows: introduce manual windows CI...
r48370
Raphaël Gomès
heptapod-ci: remove useless mentions of Python 3...
r49804 windows:
Raphaël Gomès
ci-windows: introduce manual windows CI...
r48370 <<: *windows_runtests
Matt Harbison
ci: add a runner for Windows 10...
r53049 when: manual
Raphaël Gomès
ci-windows: introduce manual windows CI...
r48370 tags:
- windows
variables:
Matt Harbison
ci: add a runner for Windows 10...
r53049 RUNTEST_ARGS: "-j 8 --blacklist C:/hgdev/tmp/check-tests.txt"
PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe
Matt Harbison
ci: run --pyoxidized tests on Windows...
r48635
Raphaël Gomès
heptapod-ci: remove useless mentions of Python 3...
r49804 windows-pyox:
Matt Harbison
ci: run --pyoxidized tests on Windows...
r48635 <<: *windows_runtests
Matt Harbison
ci: add a runner for Windows 10...
r53049 when: manual # pyoxidizer builds seem broken with --no-use-pep517
Matt Harbison
ci: run --pyoxidized tests on Windows...
r48635 tags:
- windows
variables:
Matt Harbison
ci: add a runner for Windows 10...
r53049 RUNTEST_ARGS: "--blacklist C:/hgdev/tmp/check-tests.txt --pyoxidized"
PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe
Matt Harbison
ci: add a runner for macos...
r52907
macos:
<<: *test_c
ci: split the jobs on more stage...
r53043 stage: platform-compat
Matt Harbison
ci: only use the macOS runner if manually invoked...
r52908 when: manual # avoid overloading the CI by default
Matt Harbison
ci: add a runner for macos...
r52907 tags:
- macos