Skip to content

Commit

Permalink
Merge pull request #14478 from ethereum/set-soltest-cpus-in-circleci-…
Browse files Browse the repository at this point in the history
…config

Set CPUs for `soltest.sh` based on the number of available cores
  • Loading branch information
cameel authored Aug 9, 2023
2 parents e357b8b + ec240c6 commit 3edf91a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,15 @@ defaults:
environment: &base_archlinux_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3

- base_archlinux_large: &base_archlinux_large
<<: *base_archlinux
resource_class: large
environment: &base_archlinux_large_env
<<: *base_archlinux_env
MAKEFLAGS: -j 5
CPUs: 5

- base_cimg_small: &base_cimg_small
docker:
Expand All @@ -381,6 +383,7 @@ defaults:
environment: &base_cimg_small_env
TERM: xterm
MAKEFLAGS: -j 2
CPUs: 2

- base_ems_large: &base_ems_large
docker:
Expand All @@ -389,6 +392,7 @@ defaults:
environment: &base_ems_large_env
TERM: xterm
MAKEFLAGS: -j 5
CPUs: 5

- base_node_small: &base_node_small
docker:
Expand All @@ -397,6 +401,7 @@ defaults:
environment: &base_node_small_env
TERM: xterm
MAKEFLAGS: -j 2
CPUs: 2

- base_osx: &base_osx
macos:
Expand All @@ -405,13 +410,15 @@ defaults:
environment: &base_osx_env
TERM: xterm
MAKEFLAGS: -j5
CPUs: 5

- base_osx_large: &base_osx_large
<<: *base_osx
resource_class: large
environment: &base_osx_large_env
<<: *base_osx_env
MAKEFLAGS: -j10
CPUs: 10

- base_python_small: &base_python_small
docker:
Expand All @@ -420,48 +427,55 @@ defaults:
environment: &base_python_small_env
TERM: xterm
MAKEFLAGS: -j 2
CPUs: 2

- base_ubuntu_clang: &base_ubuntu_clang
docker:
- image: << pipeline.parameters.ubuntu-clang-ossfuzz-docker-image >>
environment: &base_ubuntu_clang_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3

- base_ubuntu_clang_small: &base_ubuntu_clang_small
<<: *base_ubuntu_clang
resource_class: small
environment: &base_ubuntu_clang_small_env
<<: *base_ubuntu_clang_env
MAKEFLAGS: -j 2
CPUs: 2

- base_ubuntu2004: &base_ubuntu2004
docker:
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
environment: &base_ubuntu2004_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3

- base_ubuntu2004_small: &base_ubuntu2004_small
<<: *base_ubuntu2004
resource_class: small
environment: &base_ubuntu2004_small_env
<<: *base_ubuntu2004_env
MAKEFLAGS: -j 2
CPUs: 2

- base_ubuntu2004_xlarge: &base_ubuntu2004_xlarge
<<: *base_ubuntu2004
resource_class: xlarge
environment: &base_ubuntu2004_xlarge_env
<<: *base_ubuntu2004_env
MAKEFLAGS: -j 10
CPUs: 10

- base_ubuntu2204: &base_ubuntu2204
docker:
- image: << pipeline.parameters.ubuntu-2204-docker-image >>
environment: &base_ubuntu2204_env
TERM: xterm
MAKEFLAGS: -j 3
CPUs: 3

- base_ubuntu2204_clang: &base_ubuntu2204_clang
docker:
Expand All @@ -471,34 +485,39 @@ defaults:
CC: clang
CXX: clang++
MAKEFLAGS: -j 3
CPUs: 3

- base_ubuntu2204_clang_large: &base_ubuntu2204_clang_large
<<: *base_ubuntu2204_clang
resource_class: large
environment: &base_ubuntu2204_clang_large_env
<<: *base_ubuntu2204_clang_env
MAKEFLAGS: -j 5
CPUs: 5

- base_ubuntu2204_small: &base_ubuntu2204_small
<<: *base_ubuntu2204
resource_class: small
environment: &base_ubuntu2204_small_env
<<: *base_ubuntu2204_env
MAKEFLAGS: -j 2
CPUs: 2

- base_ubuntu2204_large: &base_ubuntu2204_large
<<: *base_ubuntu2204
resource_class: large
environment: &base_ubuntu2204_large_env
<<: *base_ubuntu2204_env
MAKEFLAGS: -j 5
CPUs: 5

- base_ubuntu2204_xlarge: &base_ubuntu2204_xlarge
<<: *base_ubuntu2204
resource_class: xlarge
environment: &base_ubuntu2204_xlarge_env
<<: *base_ubuntu2204_env
MAKEFLAGS: -j 10
CPUs: 10

- base_win: &base_win
executor:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/soltest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3edf91a

Please sign in to comment.