Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete workspace before starting the build #3319

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
def hipBuildTest(String backendLabel) {
node(backendLabel) {
stage("SYNC - ${backendLabel}") {

// Delete the workspace
sh "rm ${env.WORKSPACE}/* -fr"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using consistent coding style?

Suggested change
sh "rm ${env.WORKSPACE}/* -fr"
sh "rm -fr ${env.WORKSPACE}/*"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this might not delete files and directories starting with '.', which might be an issue.

sh "ls -lart ${env.WORKSPACE}"
// Checkout hip repository with the PR patch
dir("${WORKSPACE}/hip") {
checkout scm
Expand Down Expand Up @@ -42,6 +44,7 @@ def hipBuildTest(String backendLabel) {
cd build
# Check if backend label contains string "amd" or backend host is a server with amd gpu
if [[ $backendLabel =~ amd ]]; then
sleep 120
cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$PWD/install -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
else
cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
Expand Down Expand Up @@ -85,6 +88,7 @@ def hipBuildTest(String backendLabel) {
else
ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_nvidia.xml -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost'
fi

"""
}
}
Expand Down