diff options
author | Rong Rong (AI Infra) <rongr@fb.com> | 2021-08-18 15:02:05 -0700 |
---|---|---|
committer | Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> | 2021-08-18 15:05:10 -0700 |
commit | 15eec8e1d1ea5b3354bc305f1afe0c01a64ea748 (patch) | |
tree | b4bc0b9fb623e1a7f1c9f956fdbbc12556d77b64 /.jenkins | |
parent | 779a3d47b0c057211374a9c4128fbdf78acee4c9 (diff) | |
download | pytorch-15eec8e1d1ea5b3354bc305f1afe0c01a64ea748.tar.gz pytorch-15eec8e1d1ea5b3354bc305f1afe0c01a64ea748.tar.bz2 pytorch-15eec8e1d1ea5b3354bc305f1afe0c01a64ea748.zip |
using PR number instead of IN_PULL_REQUEST (#63360)
Summary:
PR numbers should be available on GHA after this.
This fixes some target determinator not working issue discovered when manually running: https://github.com/pytorch/pytorch/issues/63412.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63360
Reviewed By: malfet, zhouzhuojie, seemethere
Differential Revision: D30374615
Pulled By: walterddr
fbshipit-source-id: eee8d8bb7aa4308a6a50cfdcd4423a96d846777f
Diffstat (limited to '.jenkins')
-rwxr-xr-x | .jenkins/pytorch/test.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/.jenkins/pytorch/test.sh b/.jenkins/pytorch/test.sh index 93de6fbf68..124fd7c8cd 100755 --- a/.jenkins/pytorch/test.sh +++ b/.jenkins/pytorch/test.sh @@ -26,11 +26,7 @@ echo "Testing pytorch" export LANG=C.UTF-8 -# Try to pull value from CIRCLE_PULL_REQUEST first then GITHUB_HEAD_REF second -# CIRCLE_PULL_REQUEST comes from CircleCI -# NOTE: file_diff_from_base is currently bugged for GHA due to an issue finding a merge base for ghstack PRs -# see https://github.com/pytorch/pytorch/issues/60111 -IN_PULL_REQUEST=${CIRCLE_PULL_REQUEST:-} +PR_NUMBER=${PR_NUMBER:-${CIRCLE_PR_NUMBER:-}} if [[ "$BUILD_ENVIRONMENT" == *-slow-* || $TEST_CONFIG == 'slow' ]]; then export PYTORCH_TEST_WITH_SLOW=1 @@ -64,7 +60,7 @@ else export PYTORCH_TEST_SKIP_NOARCH=1 fi -if [[ -n "$IN_PULL_REQUEST" ]] && [[ -z "$CI_MASTER" || "$CI_MASTER" == "false" ]]; then +if [[ -n "$PR_NUMBER" ]] && [[ -z "$CI_MASTER" || "$CI_MASTER" == "false" ]]; then # skip expensive checks when on PR and CI_MASTER flag is not set export PYTORCH_TEST_SKIP_CUDA_MEM_LEAK_CHECK=1 else @@ -146,7 +142,10 @@ elif [[ "${BUILD_ENVIRONMENT}" == *-NO_AVX512-* || $TEST_CONFIG == 'nogpu_NO_AVX export ATEN_CPU_CAPABILITY=avx2 fi -if [ -n "$IN_PULL_REQUEST" ] && [[ "$BUILD_ENVIRONMENT" != *coverage* ]]; then +# NOTE: file_diff_from_base is currently bugged for GHA due to an issue finding a merge base for ghstack PRs +# see https://github.com/pytorch/pytorch/issues/60111 +# change it back to PR_NUMBER when issue is fixed. +if [ -n "$CIRCLE_PR_NUMBER" ] && [[ "$BUILD_ENVIRONMENT" != *coverage* ]]; then DETERMINE_FROM=$(mktemp) file_diff_from_base "$DETERMINE_FROM" fi |