CI: Set CPUs for soltest.sh based on the number of available cores

This commit is contained in:
Kamil Śliwak 2023-08-07 17:23:53 +02:00
parent e357b8bc42
commit ec240c6422
2 changed files with 20 additions and 1 deletions

View File

@ -366,6 +366,7 @@ defaults:
environment: &base_archlinux_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3
- base_archlinux_large: &base_archlinux_large
<<: *base_archlinux
@ -373,6 +374,7 @@ defaults:
environment: &base_archlinux_large_env
<<: *base_archlinux_env
MAKEFLAGS: -j 5
CPUs: 5
- base_cimg_small: &base_cimg_small
docker:
@ -381,6 +383,7 @@ defaults:
environment: &base_cimg_small_env
TERM: xterm
MAKEFLAGS: -j 2
CPUs: 2
- base_ems_large: &base_ems_large
docker:
@ -389,6 +392,7 @@ defaults:
environment: &base_ems_large_env
TERM: xterm
MAKEFLAGS: -j 5
CPUs: 5
- base_node_small: &base_node_small
docker:
@ -397,6 +401,7 @@ defaults:
environment: &base_node_small_env
TERM: xterm
MAKEFLAGS: -j 2
CPUs: 2
- base_osx: &base_osx
macos:
@ -405,6 +410,7 @@ defaults:
environment: &base_osx_env
TERM: xterm
MAKEFLAGS: -j5
CPUs: 5
- base_osx_large: &base_osx_large
<<: *base_osx
@ -412,6 +418,7 @@ defaults:
environment: &base_osx_large_env
<<: *base_osx_env
MAKEFLAGS: -j10
CPUs: 10
- base_python_small: &base_python_small
docker:
@ -420,6 +427,7 @@ defaults:
environment: &base_python_small_env
TERM: xterm
MAKEFLAGS: -j 2
CPUs: 2
- base_ubuntu_clang: &base_ubuntu_clang
docker:
@ -427,6 +435,7 @@ defaults:
environment: &base_ubuntu_clang_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu_clang_small: &base_ubuntu_clang_small
<<: *base_ubuntu_clang
@ -434,6 +443,7 @@ defaults:
environment: &base_ubuntu_clang_small_env
<<: *base_ubuntu_clang_env
MAKEFLAGS: -j 2
CPUs: 2
- base_ubuntu2004: &base_ubuntu2004
docker:
@ -441,6 +451,7 @@ defaults:
environment: &base_ubuntu2004_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu2004_small: &base_ubuntu2004_small
<<: *base_ubuntu2004
@ -448,6 +459,7 @@ defaults:
environment: &base_ubuntu2004_small_env
<<: *base_ubuntu2004_env
MAKEFLAGS: -j 2
CPUs: 2
- base_ubuntu2004_xlarge: &base_ubuntu2004_xlarge
<<: *base_ubuntu2004
@ -455,6 +467,7 @@ defaults:
environment: &base_ubuntu2004_xlarge_env
<<: *base_ubuntu2004_env
MAKEFLAGS: -j 10
CPUs: 10
- base_ubuntu2204: &base_ubuntu2204
docker:
@ -462,6 +475,7 @@ defaults:
environment: &base_ubuntu2204_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu2204_clang: &base_ubuntu2204_clang
docker:
@ -471,6 +485,7 @@ defaults:
CC: clang
CXX: clang++
MAKEFLAGS: -j 3
CPUs: 3
- base_ubuntu2204_clang_large: &base_ubuntu2204_clang_large
<<: *base_ubuntu2204_clang
@ -478,6 +493,7 @@ defaults:
environment: &base_ubuntu2204_clang_large_env
<<: *base_ubuntu2204_clang_env
MAKEFLAGS: -j 5
CPUs: 5
- base_ubuntu2204_small: &base_ubuntu2204_small
<<: *base_ubuntu2204
@ -485,6 +501,7 @@ defaults:
environment: &base_ubuntu2204_small_env
<<: *base_ubuntu2204_env
MAKEFLAGS: -j 2
CPUs: 2
- base_ubuntu2204_large: &base_ubuntu2204_large
<<: *base_ubuntu2204
@ -492,6 +509,7 @@ defaults:
environment: &base_ubuntu2204_large_env
<<: *base_ubuntu2204_env
MAKEFLAGS: -j 5
CPUs: 5
- base_ubuntu2204_xlarge: &base_ubuntu2204_xlarge
<<: *base_ubuntu2204
@ -499,6 +517,7 @@ defaults:
environment: &base_ubuntu2204_xlarge_env
<<: *base_ubuntu2204_env
MAKEFLAGS: -j 10
CPUs: 10
- base_win: &base_win
executor:

View File

@ -36,6 +36,7 @@ set -e
OPTIMIZE=${OPTIMIZE:-"0"}
EVM=${EVM:-"invalid"}
CPUs=${CPUs:-3}
REPODIR="$(realpath "$(dirname "$0")/..")"
IFS=" " read -r -a BOOST_TEST_ARGS <<< "$BOOST_TEST_ARGS"
@ -67,7 +68,6 @@ get_logfile_basename() {
# long-running test cases are next to each other.
CIRCLE_NODE_INDEX=$(((CIRCLE_NODE_INDEX + 23 * INDEX_SHIFT) % CIRCLE_NODE_TOTAL))
CPUs=3
PIDs=()
for run in $(seq 0 $((CPUs - 1)))
do