Skip to content

Commit

Permalink
Fix smoke tests on binary builds
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#20069

Differential Revision: D15188864

Pulled By: pjh5

fbshipit-source-id: 692c5ecf1a4f5a560cf8fbcfe3634b809f184d72
  • Loading branch information
pjh5 authored and facebook-github-bot committed May 2, 2019
1 parent 99c548e commit 2ec2287
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
16 changes: 12 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ binary_run_in_docker: &binary_run_in_docker
command: |
# This step only runs on circleci linux machine executors that themselves
# need to start docker images
script="/home/circleci/project/pytorch/.circleci/scripts/binary_install_miniconda.sh"
script="/home/circleci/project/pytorch/.circleci/scripts/binary_run_in_docker.sh"
cat "$script"
source "$script"
# binary linux build defaults
Expand Down Expand Up @@ -830,6 +830,11 @@ smoke_linux_test: &smoke_linux_test
<<: *setup_linux_system_environment
- run:
<<: *setup_ci_environment
# This checkout is only needed to access
# .circleci/scripts/binary_populate_env.sh, which can't be inlined because
# it blows up the yaml size.
- run:
<<: *binary_checkout
- run:
<<: *binary_populate_env
- run:
Expand All @@ -840,7 +845,6 @@ smoke_linux_test: &smoke_linux_test
cat >/home/circleci/project/ci_test_script.sh <<EOL
# The following code will be executed inside Docker container
set -ex
git clone https://github.com/pytorch/builder.git /builder
/builder/smoke_test.sh
# The above code will be executed inside Docker container
EOL
Expand All @@ -851,6 +855,11 @@ smoke_mac_test: &smoke_mac_test
macos:
xcode: "9.0"
steps:
# This checkout is only needed to access
# .circleci/scripts/binary_populate_env.sh, which can't be inlined because
# it blows up the yaml size.
- run:
<<: *binary_checkout
- run:
<<: *binary_populate_env
- run:
Expand All @@ -861,8 +870,7 @@ smoke_mac_test: &smoke_mac_test
command: |
set -ex
source "/Users/distiller/project/env"
git clone https://github.com/pytorch/builder.git
unbuffer ./builder/smoke_test.sh | ts
unbuffer "$BUILDER_ROOT/smoke_test.sh" | ts
Expand Down
2 changes: 1 addition & 1 deletion .circleci/scripts/binary_run_in_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [[ -d "$PYTORCH_ROOT" ]]; then
docker cp "$PYTORCH_ROOT" "$id:/pytorch"
fi
if [[ -d "$BUILDER_ROOT" ]]; then
docker cp "$BUILDER ROOT" "$id:/builder"
docker cp "$BUILDER_ROOT" "$id:/builder"
fi

# Execute the test script that was populated by an earlier section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ binary_run_in_docker: &binary_run_in_docker
command: |
# This step only runs on circleci linux machine executors that themselves
# need to start docker images
script="/home/circleci/project/pytorch/.circleci/scripts/binary_install_miniconda.sh"
script="/home/circleci/project/pytorch/.circleci/scripts/binary_run_in_docker.sh"
cat "$script"
source "$script"
14 changes: 11 additions & 3 deletions .circleci/verbatim-sources/nightly-build-smoke-tests-defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ smoke_linux_test: &smoke_linux_test
<<: *setup_linux_system_environment
- run:
<<: *setup_ci_environment
# This checkout is only needed to access
# .circleci/scripts/binary_populate_env.sh, which can't be inlined because
# it blows up the yaml size.
- run:
<<: *binary_checkout
- run:
<<: *binary_populate_env
- run:
Expand All @@ -21,7 +26,6 @@ smoke_linux_test: &smoke_linux_test
cat >/home/circleci/project/ci_test_script.sh <<EOL
# The following code will be executed inside Docker container
set -ex
git clone https://github.com/pytorch/builder.git /builder
/builder/smoke_test.sh
# The above code will be executed inside Docker container
EOL
Expand All @@ -32,6 +36,11 @@ smoke_mac_test: &smoke_mac_test
macos:
xcode: "9.0"
steps:
# This checkout is only needed to access
# .circleci/scripts/binary_populate_env.sh, which can't be inlined because
# it blows up the yaml size.
- run:
<<: *binary_checkout
- run:
<<: *binary_populate_env
- run:
Expand All @@ -42,8 +51,7 @@ smoke_mac_test: &smoke_mac_test
command: |
set -ex
source "/Users/distiller/project/env"
git clone https://github.com/pytorch/builder.git
unbuffer ./builder/smoke_test.sh | ts
unbuffer "$BUILDER_ROOT/smoke_test.sh" | ts

0 comments on commit 2ec2287

Please sign in to comment.