Skip to content

Commit

Permalink
[CI] DOCA compilation: add trigger for DOCA compilation
Browse files Browse the repository at this point in the history
We prepare DOCA environment for XLIO "build" step, that will be fully integrated at the later steps:
- check do_compile_doca variable
- define jenkins_test_doca trigger

Issue: HPCINFRA-1968

Signed-off-by: Viacheslav Login <vlogin@nvidia.com>
  • Loading branch information
vialogi committed May 14, 2024
1 parent 2552a52 commit a290b4c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .ci/matrix_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,23 @@ steps:
run: |
./autogen.sh -s
parallel: false

- name: Build with DOCA
enable: ${do_compile_doca} && $(do_build)
containerSelector:
- "{category: 'doca'}"
agentSelector:
- "{nodeLabel: 'skip-agent'}"
run: |
[ "x${do_compile_doca}" == "xtrue" ] && action=yes || action=no
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_build=${action} jenkins_test_doca=${action} ./contrib/test_jenkins.sh
parallel: false
onfail: |
./.ci/artifacts.sh
archiveArtifacts-onfail: |
jenkins/**/arch-*.tar.gz
archiveTap-onfail: |
jenkins/**/*.tap
- name: Build
enable: ${do_build}
Expand Down
4 changes: 4 additions & 0 deletions .ci/proj_jjb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
name: "do_build"
default: true
description: "This verifies different configuration using gcc compiler."
- bool:
name: "do_compile_doca"
default: false
description: "Compiles DOCA SDK for futher tests with XLIO."
- bool:
name: "do_compiler"
default: true
Expand Down
12 changes: 8 additions & 4 deletions contrib/jenkins_tests/globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,15 @@ do_version_check()

do_compile_doca()
{
echo "===== DOCA checkout & compilation starts ====="
doca_version="2.7"
doca_path=${WORKSPACE}/${prefix}/doca-sdk
doca_repo="ssh://git-nbu.nvidia.com:12023/doca/doca"
doca_build=${WORKSPACE}/${prefix}/doca-build
doca_dir=${WORKSPACE}/${prefix}/doca_dir
doca_branch=doca_"${doca_version}"

mkdir -p "${doca_path}"
mkdir -p "${doca_build}"
mkdir -p "${doca_dir}"

if [ -d "${doca_path}" ]; then
echo "Directory ${doca_path} exists. Updating..."
Expand All @@ -315,12 +316,15 @@ do_compile_doca()
exit 1
fi

if ! meson "${doca_build}"; then
if ! meson "${doca_dir}"; then
echo "Cannot prepare the project for compilation..."
exit 1
fi

if ! ninja -C "${doca_build}"; then
if ninja -C "${doca_dir}"; then
eval "$1=${doca_dir}"
echo "===== DOCA compilation complete ====="
else
echo "Compilation error..."
exit 1
fi
Expand Down
5 changes: 5 additions & 0 deletions contrib/test_jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jenkins_test_style=${jenkins_test_style:="no"}
jenkins_test_tool=${jenkins_test_tool:="no"}
jenkins_test_commit=${jenkins_test_commit:="no"}
jenkins_test_tidy=${jenkins_test_tidy:="no"}
jenkins_test_doca=${jenkins_test_doca:="no"}

echo
for var in ${!jenkins_test_@}; do
Expand Down Expand Up @@ -115,6 +116,10 @@ if [ "$TARGET" == "all" -o "$TARGET" == "default" ]; then
do_err "target: $TARGET"
exit 1
fi
if do_compile_doca doca_path; then
target_list[$i]=" --with-dpcp=${doca_path}"
i=$((i+1))
fi
fi

echo
Expand Down

0 comments on commit a290b4c

Please sign in to comment.