ci: Get build/test concurrency from environment

Previously we hardcoded the amount of concurrency in the CI definition. This
practice IIRC originated from a) using make, where the concurrency is not
sourced from the current system b) early cirrus-ci macos runners, which slowed
down a lot with full concurrency.

Hardcoding the concurrency is problematic as e.g. private repositories have
lower concurrency and larger github runners have more cores.

For most of the jobs we can rely on just using meson's and ninja's logic for
getting the current core count. For the autoconf build we can use the nproc
helper.

To make this at least somewhat understandable, I extended the existing sysinfo
step to show the number of cores (and made it a bit easier to understand the
information already printed).

This commit is backpatched to 19 to keep CI between master and 19 the
same. Soon we'll backpatch CI support to regain coverage with lost with
cirrus-ci's shutdown.

Author: Andres Freund <[email protected]>
Co-authored-by: Nazir Bilal Yavuz <[email protected]>
Discussion: 
https://postgr.es/m/a2ejn7lfqolutzz7kozalbhy3bixdrujb4buc3pgbtlk4am2ba@wbv6v7riia33
Discussion: 
https://postgr.es/m/can55fz1bcwbswgcck2gqkyn6tzdxcw2hvk2m3qeiwanxunj...@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8736129a48e4dff243fb1f297e4b6f10bedec72a

Modified Files
--------------
.github/workflows/pg-ci.yml | 43 ++++++++++++++++++++++++++-----------------
1 file changed, 26 insertions(+), 17 deletions(-)

Reply via email to