Skip to content

[SYCL] Check for modified build scripts only for PR. #51

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

Merged
merged 2 commits into from
Mar 28, 2019
Merged
Changes from all 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
24 changes: 14 additions & 10 deletions buildbot/dependency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,21 @@ done && shift $(($OPTIND - 1))
# we're in llvm.obj dir
BUILD_DIR=${PWD}

# Get changed build script files
cd ${SRC_DIR}
git fetch -t origin refs/pull/${PR_NUMBER}/merge
exit_if_err $? "fail to get tags"
git checkout -B refs/pull/${PR_NUMBER}/merge
exit_if_err $? "fail to get tags"
base_commit=`git merge-base origin/sycl refs/pull/${PR_NUMBER}/merge`
exit_if_err $? "fail to get base commit"
# Get changed build script files if it is PR
if [ -n "${PR_NUMBER}" ];then
cd ${SRC_DIR}
git fetch origin sycl
exit_if_err $? "fail to get the latest changes in sycl branch"
git fetch -t origin refs/pull/${PR_NUMBER}/merge
exit_if_err $? "fail to get tags"
git checkout -B refs/pull/${PR_NUMBER}/merge
exit_if_err $? "fail to create branch for specific tag"
base_commit=`git merge-base origin/sycl refs/pull/${PR_NUMBER}/merge`
exit_if_err $? "fail to get base commit"

BUILD_SCRIPT=`git --no-pager diff ${base_commit} refs/pull/${PR_NUMBER}/merge --name-only buildbot`
cd -
BUILD_SCRIPT=`git --no-pager diff ${base_commit} refs/pull/${PR_NUMBER}/merge --name-only buildbot`
cd -
fi

## Clean up build directory if build scripts has changed
cd ${DST_DIR}
Expand Down