Skip to content

Commit b2c7b55

Browse files
committed
[CI] issue: HPCINFRA-4016 Split compiler step into parallel steps
The compiler step currently takes a long time to run (about 20–40 minutes). Split the compiler step into 6 separate steps (one per compiler) running in parallel to reduce build duration. Signed-off-by: Noam Tsemah <[email protected]>
1 parent a698fb7 commit b2c7b55

File tree

2 files changed

+63
-10
lines changed

2 files changed

+63
-10
lines changed

.ci/matrix_job.yaml

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ runs_on_dockers:
8787
category: 'tool'
8888
}
8989
- {name: 'toolbox', url: 'harbor.mellanox.com/hpcx/x86_64/rhel8.6/builder:inbox', category: 'tool', arch: 'x86_64'}
90+
- {name: 'toolbox-clang-9.0.1', url: '${registry_host}/hpcx/x86_64/rhel8.6/builder:inbox', category: 'tool', arch: 'x86_64'}
91+
- {name: 'toolbox-icc-18.0.4', url: '${registry_host}/hpcx/x86_64/rhel8.6/builder:inbox', category: 'tool', arch: 'x86_64'}
92+
- {name: 'toolbox-icc-19.1.1', url: '${registry_host}/hpcx/x86_64/rhel8.6/builder:inbox', category: 'tool', arch: 'x86_64'}
93+
- {name: 'toolbox-gcc', url: '${registry_host}/hpcx/x86_64/rhel8.6/builder:inbox', category: 'tool', arch: 'x86_64'}
9094
- {name: 'header-check', url: 'harbor.mellanox.com/toolbox/header_check:0.0.58', category: 'tool', arch: 'x86_64', tag: '0.0.58'}
9195
# static tests
9296
- {
@@ -222,12 +226,12 @@ steps:
222226
- "{nodeLabel: 'skip-agent'}"
223227
run: |
224228
echo "Installing DOCA: ${DOCA_VERSION} ..."
225-
.ci/scripts/doca_install.sh
229+
.ci/scripts/doca_install.sh
226230
227231
- name: Install Doca-host on Tools
228232
run: |
229233
echo "Installing DOCA: ${DOCA_VERSION} ..."
230-
.ci/scripts/doca_install.sh
234+
.ci/scripts/doca_install.sh
231235
containerSelector:
232236
- "{name: 'style', category: 'tool', variant: 1}"
233237
agentSelector:
@@ -320,15 +324,60 @@ steps:
320324
archiveArtifacts-onfail: |
321325
jenkins/**/arch-*.tar.gz
322326
323-
- name: Compiler
327+
- name: Compiler (clang-9.0.1)
324328
enable: ${do_compiler}
325329
containerSelector:
326-
- "{name: 'toolbox', category: 'tool'}"
330+
- "{name: 'toolbox-clang-9.0.1', category: 'tool'}"
331+
agentSelector:
332+
- "{nodeLabel: 'skip-agent'}"
333+
run: |
334+
[ "x${do_compiler}" == "xtrue" ] && action=yes || action=no
335+
env WORKSPACE=$PWD TARGET=${flags} COMPILER_SPEC="clang:clang++:dev/clang-9.0.1" jenkins_test_compiler=${action} ./contrib/test_jenkins.sh
336+
parallel: false
337+
onfail: |
338+
./.ci/artifacts.sh
339+
archiveArtifacts-onfail: |
340+
jenkins/**/arch-*.tar.gz
341+
342+
- name: Compiler (icc-18.0.4)
343+
enable: ${do_compiler}
344+
containerSelector:
345+
- "{name: 'toolbox-icc-18.0.4', category: 'tool'}"
346+
agentSelector:
347+
- "{nodeLabel: 'skip-agent'}"
348+
run: |
349+
[ "x${do_compiler}" == "xtrue" ] && action=yes || action=no
350+
env WORKSPACE=$PWD TARGET=${flags} COMPILER_SPEC="icc:icpc:intel/ics-18.0.4" jenkins_test_compiler=${action} ./contrib/test_jenkins.sh
351+
parallel: false
352+
onfail: |
353+
./.ci/artifacts.sh
354+
archiveArtifacts-onfail: |
355+
jenkins/**/arch-*.tar.gz
356+
357+
- name: Compiler (icc-19.1.1)
358+
enable: ${do_compiler}
359+
containerSelector:
360+
- "{name: 'toolbox-icc-19.1.1', category: 'tool'}"
361+
agentSelector:
362+
- "{nodeLabel: 'skip-agent'}"
363+
run: |
364+
[ "x${do_compiler}" == "xtrue" ] && action=yes || action=no
365+
env WORKSPACE=$PWD TARGET=${flags} COMPILER_SPEC="icc:icpc:intel/ics-19.1.1" jenkins_test_compiler=${action} ./contrib/test_jenkins.sh
366+
parallel: false
367+
onfail: |
368+
./.ci/artifacts.sh
369+
archiveArtifacts-onfail: |
370+
jenkins/**/arch-*.tar.gz
371+
372+
- name: Compiler (gcc)
373+
enable: ${do_compiler}
374+
containerSelector:
375+
- "{name: 'toolbox-gcc', category: 'tool'}"
327376
agentSelector:
328377
- "{nodeLabel: 'skip-agent'}"
329378
run: |
330379
[ "x${do_compiler}" == "xtrue" ] && action=yes || action=no
331-
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_compiler=${action} ./contrib/test_jenkins.sh
380+
env WORKSPACE=$PWD TARGET=${flags} COMPILER_SPEC="gcc:g++:dev/gcc-8.3.0 gcc:g++:dev/gcc-9.3.0 gcc:g++:dev/gcc-10.1.0" jenkins_test_compiler=${action} ./contrib/test_jenkins.sh
332381
parallel: false
333382
onfail: |
334383
./.ci/artifacts.sh

contrib/jenkins_tests/compiler.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ cd $compiler_dir
1212

1313
compiler_list="clang:clang++:dev/clang-9.0.1 icc:icpc:intel/ics-18.0.4 icc:icpc:intel/ics-19.1.1 gcc:g++:dev/gcc-8.3.0 gcc:g++:dev/gcc-9.3.0 gcc:g++:dev/gcc-10.1.0"
1414

15+
if [[ ! -z "$COMPILER_SPEC" ]]; then
16+
compiler_list="${COMPILER_SPEC}"
17+
fi
18+
1519
compiler_tap=${WORKSPACE}/${prefix}/compiler.tap
16-
echo "1..$(echo $compiler_list | tr " " "\n" | wc -l)" > $compiler_tap
20+
echo "1..$(echo "${compiler_list}" | tr " " "\n" | wc -l)" > "${compiler_tap}"
1721

1822
test_id=0
1923
for compiler in $compiler_list; do
2024
IFS=':' read cc cxx module <<< "$compiler"
21-
mkdir -p ${compiler_dir}/${test_id}
22-
cd ${compiler_dir}/${test_id}
25+
mkdir -p "${compiler_dir}/${test_id}"
26+
cd "${compiler_dir}/${test_id}"
2327
[ -z "$module" ] && test_name=$($cc --version | head -n 1) || test_name="$module"
2428
[ ! -z "$module" ] && do_module "$module"
2529
echo "======================================================"
@@ -28,9 +32,9 @@ for compiler in $compiler_list; do
2832
test_exec='${WORKSPACE}/configure --prefix=$compiler_dir-$cc CC=$cc CXX=$cxx --disable-lto $jenkins_test_custom_configure && make $make_opt all'
2933
do_check_result "$test_exec" "$test_id" "$test_name" "$compiler_tap" "${compiler_dir}/compiler-${test_id}"
3034
[ ! -z "$module" ] && module unload "$module"
31-
cd ${compiler_dir}
35+
cd "${compiler_dir}"
3236
test_id=$((test_id+1))
33-
pushd ${WORKSPACE}/third_party/json-c
37+
pushd "${WORKSPACE}/third_party/json-c"
3438
make distclean
3539
popd
3640
done

0 commit comments

Comments
 (0)