Skip to content

Commit

Permalink
CI: Use new CI infrastructure
Browse files Browse the repository at this point in the history
Improve CPU/GPU load balancing by restricting CI jobs that don't
need a GPU on CI runners that don't provide a GPU. Use 4 cores
instead of 2 cores when the runner allows it. Execute slow jobs
on NUMA runners.
  • Loading branch information
jngrad committed Apr 5, 2022
1 parent ece1656 commit b3f4424
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push_pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Python environment
uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.8'
- name: Check without sanitizer
uses: ./.github/actions/build_and_check
with:
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Setup Python environment
uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.8'
- name: Check with sanitizer
uses: ./.github/actions/build_and_check
with:
Expand Down
72 changes: 48 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ stages:
timeout: 40m
interruptible: false
tags:
- linux
- docker
- espresso
- no-cuda

variables:
GIT_SUBMODULE_STRATEGY: recursive
Expand All @@ -44,7 +46,8 @@ style:
- sh maintainer/CI/fix_style.sh
tags:
- docker
- linux
- espresso
- no-cuda
variables:
GIT_SUBMODULE_STRATEGY: none
artifacts:
Expand All @@ -65,7 +68,8 @@ style_doxygen:
- sh ../maintainer/CI/dox_warnings.sh
tags:
- docker
- linux
- espresso
- no-cuda

### Builds without CUDA

Expand All @@ -85,7 +89,8 @@ default:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- no-cuda

maxset:
<<: *global_job_definition
Expand All @@ -105,7 +110,9 @@ maxset:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- no-cuda
- numa

no_rotation:
<<: *global_job_definition
Expand All @@ -122,7 +129,9 @@ no_rotation:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- no-cuda
- numa

ubuntu:wo-dependencies:
<<: *global_job_definition
Expand All @@ -138,7 +147,8 @@ ubuntu:wo-dependencies:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- no-cuda

### Builds with different distributions

Expand All @@ -155,7 +165,8 @@ debian:10:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- no-cuda

fedora:34:
<<: *global_job_definition
Expand All @@ -170,7 +181,8 @@ fedora:34:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- no-cuda

### Builds with CUDA

Expand All @@ -195,8 +207,9 @@ clang-sanitizer:
timeout: 2h
tags:
- docker
- linux
- espresso
- cuda
- numa

fast_math:
<<: *global_job_definition
Expand All @@ -215,7 +228,7 @@ fast_math:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- cuda
when: manual

Expand All @@ -238,8 +251,9 @@ cuda11-maxset:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- cuda
- numa

cuda10-maxset:
<<: *global_job_definition
Expand All @@ -263,8 +277,9 @@ cuda10-maxset:
expire_in: 1 week
tags:
- docker
- linux
- espresso
- cuda
- numa

tutorials-samples-maxset:
<<: *global_job_definition
Expand All @@ -287,7 +302,7 @@ tutorials-samples-maxset:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- cuda

tutorials-samples-default:
Expand All @@ -310,7 +325,7 @@ tutorials-samples-default:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- cuda
only:
- schedules
Expand All @@ -336,7 +351,7 @@ tutorials-samples-empty:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- cuda
only:
- schedules
Expand All @@ -362,7 +377,8 @@ tutorials-samples-no-gpu:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- no-cuda
only:
- schedules

Expand Down Expand Up @@ -397,7 +413,7 @@ installation:
- make -j2 check_tutorials
tags:
- docker
- linux
- espresso
- cuda
when: manual

Expand All @@ -417,8 +433,9 @@ empty:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux
- espresso
- cuda
- numa

check_sphinx:
<<: *global_job_definition
Expand All @@ -440,8 +457,9 @@ check_sphinx:
expire_in: 1 week
tags:
- docker
- linux
- espresso
- cuda
- numa

run_tutorials:
<<: *global_job_definition
Expand All @@ -464,8 +482,9 @@ run_tutorials:
expire_in: 1 week
tags:
- docker
- linux
- espresso
- cuda
- numa
only:
- schedules

Expand All @@ -486,7 +505,9 @@ run_doxygen:
expire_in: 1 week
tags:
- docker
- linux
- espresso
- no-cuda
- numa

maxset_no_gpu:
<<: *global_job_definition
Expand All @@ -500,7 +521,9 @@ maxset_no_gpu:
- make -t && make check
tags:
- docker
- linux
- espresso
- no-cuda
- numa

maxset_3_cores:
<<: *global_job_definition
Expand All @@ -514,8 +537,9 @@ maxset_3_cores:
- make -t && make check_unit_tests && make check_python_parallel_odd
tags:
- docker
- linux
- espresso
- cuda
- numa

status_success:
<<: *notification_job_definition
Expand Down
8 changes: 7 additions & 1 deletion maintainer/CI/build_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ set_default_value() {
fi
}

# the number of available processors depends on the CI runner
if grep -q "i7-3820" /proc/cpuinfo; then
ci_procs=2
else
ci_procs=4
fi

# handle environment variables
set_default_value srcdir "$(pwd)"
Expand All @@ -82,7 +88,7 @@ set_default_value with_ubsan false
set_default_value with_asan false
set_default_value with_static_analysis false
set_default_value myconfig "default"
set_default_value build_procs 2
set_default_value build_procs ${ci_procs}
set_default_value check_procs ${build_procs}
set_default_value check_odd_only false
set_default_value check_gpu_only false
Expand Down

0 comments on commit b3f4424

Please sign in to comment.