Skip to content

Commit

Permalink
[SYCL] Check for modified build scripts only for PR.
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Lazarev <[email protected]>
  • Loading branch information
vladimirlaz committed Mar 28, 2019
1 parent 383a07c commit 65e46bd
Showing 1 changed file with 14 additions and 10 deletions.
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

0 comments on commit 65e46bd

Please sign in to comment.