Skip to content

Commit

Permalink
Static CI: Add amdclang++ path to cmake prefix path (#582)
Browse files Browse the repository at this point in the history
* Add amdclang++ path to cmake prefix path

* Add rocm/llvm to path

to include /opt/rocm/llvm/lib/cmake/clang/ClangConfig.cmake

* Update common.groovy use quotes
  • Loading branch information
samjwu authored Dec 11, 2024
1 parent a566b87 commit f6d397c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .jenkins/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def runCompileCommand(platform, project, jobName, boolean debug=false, boolean s
String buildStatic = staticLibrary ? '-DBUILD_SHARED_LIBS=OFF' : '-DBUILD_SHARED_LIBS=ON'
String codeCovFlag = codeCoverage ? '-DCODE_COVERAGE=ON' : ''
String cmake = platform.jenkinsLabel.contains('centos') ? 'cmake3' : 'cmake'
String cmakePrefixPath = '-DCMAKE_PREFIX_PATH="/opt/rocm;/opt/rocm/llvm;/opt/rocm/bin"'
//Set CI node's gfx arch as target if PR, otherwise use default targets of the library
String amdgpuTargets = env.BRANCH_NAME.startsWith('PR-') ? '-DAMDGPU_TARGETS=\$gfx_arch' : ''

Expand All @@ -20,7 +21,7 @@ def runCompileCommand(platform, project, jobName, boolean debug=false, boolean s
mkdir -p build/${buildTypeDir} && cd build/${buildTypeDir}
# gfxTargetParser reads gfxarch and adds target features such as xnack
${auxiliary.gfxTargetParser()}
${cmake} --toolchain=toolchain-linux.cmake ${buildTypeArg} ${buildStatic} ${amdgpuTargets} ${codeCovFlag} -DBUILD_TEST=ON -DBUILD_BENCHMARK=ON ../..
${cmake} --toolchain=toolchain-linux.cmake ${cmakePrefixPath} ${buildTypeArg} ${buildStatic} ${amdgpuTargets} ${codeCovFlag} -DBUILD_TEST=ON -DBUILD_BENCHMARK=ON ../..
make -j\$(nproc)
"""

Expand Down

0 comments on commit f6d397c

Please sign in to comment.