Mercurial > hg
diff contrib/heptapod-ci.yml @ 52216:fa58f4f97337 stable tip
ci: shard the test run on mac os X
This should comes with some benefit:
- spread the load across more runner,
- reduce the real-time CI run,
- reduce the "retry" run when we need them.
We start with the Mac jobs, but that would be tremendously useful for Windows
too.
For linux, we need to reduce the startup overhead for this to be worth it.
Building smaller image and speeding up clone should help with that.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 08 Nov 2024 17:08:11 +0100 |
parents | b3e696e879fc |
children |
line wrap: on
line diff
--- a/contrib/heptapod-ci.yml Thu Sep 22 01:02:06 2022 +0200 +++ b/contrib/heptapod-ci.yml Fri Nov 08 17:08:11 2024 +0100 @@ -109,6 +109,7 @@ - PORT_ARG="--port $PORT_START" - echo $PORT_ARG - WHEEL_ARG="" + - SHARDING_ARGS="" - if test -n "$WHEEL_TYPE"; then PY_TAG=`$PYTHON -c 'import sys; v=sys.version_info; t=f"cp{v.major}{v.minor}"; print(f"{t}-{t}")'`; echo "$PY_TAG"; @@ -122,12 +123,18 @@ else echo installing from source; fi; + - if [ -n "$CI_NODE_INDEX" ]; then + echo "Running the test in multiple shard - [$CI_NODE_INDEX/$CI_NODE_TOTAL]"; + SHARDING_ARGS="--shard-index $CI_NODE_INDEX --shard-total $CI_NODE_TOTAL"; + echo "sharding... $SHARDING_ARGS"; + fi - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" "$PYTHON" tests/run-tests.py --color=always $PORT_ARG $WHEEL_ARG $FLAVOR + $SHARDING_ARGS $FILTER $RUNTEST_ARGS; @@ -309,6 +316,10 @@ macos: extends: .test-c stage: platform-compat + # run the test in multiple shard to help spread the load between concurrent + # MR as the macos runner is a shell runner there is not startup overhead + # for tests. + parallel: 10 tags: - macos variables: