# HG changeset patch # User Pierre-Yves David # Date 1731082091 -3600 # Node ID fa58f4f9733753e9f44cabe1d32d6cb6e35de640 # Parent 36e4d1457c6b04ca9b0b2b32e991735394d126f2 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. diff -r 36e4d1457c6b -r fa58f4f97337 contrib/heptapod-ci.yml --- 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: