From c92cf6bee3743aefe1436cd02ca282a81188a5fa Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Wed, 7 Dec 2022 17:41:54 +0000 Subject: [PATCH] [BE][CI] Add windows test run instructions (#90388) Specifies how to activate VisualStudio, Anaconda and set `PYTHONPATH` to run tests in CI Pull Request resolved: https://github.com/pytorch/pytorch/pull/90388 Approved by: https://github.com/atalman, https://github.com/ZainRizvi --- .github/workflows/_win-build.yml | 2 +- .github/workflows/_win-test.yml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_win-build.yml b/.github/workflows/_win-build.yml index 8baaca498d1..b04dc7f6626 100644 --- a/.github/workflows/_win-build.yml +++ b/.github/workflows/_win-build.yml @@ -56,7 +56,7 @@ jobs: And then change password using `passwd` command. To start build locally, change working folder to \actions-runner\_work\pytorch\pytorch, - Activate miniconda and Visual Studio environment, but running: + Activate miniconda and Visual Studio environment, by running: call C:\Jenkins\Miniconda3\Scripts\activate.bat C:\Jenkins\Miniconda3 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64 diff --git a/.github/workflows/_win-test.yml b/.github/workflows/_win-test.yml index 0cabb8ec469..234b2c7faad 100644 --- a/.github/workflows/_win-test.yml +++ b/.github/workflows/_win-test.yml @@ -78,6 +78,16 @@ jobs: uses: pytorch/test-infra/.github/actions/setup-ssh@main with: github-secret: ${{ secrets.GITHUB_TOKEN }} + instructions: | + To forward remote desktop on your local machine ssh as follows: + ssh -L 3389:localhost:3389 %%username%%@%%hostname%% + And then change password using `passwd` command. + + To start tests locally, change working folder to \actions-runner\_work\pytorch\pytorch\test, + Activate miniconda and Visual Studio environment and set PYTHON_PATH, by running: + call C:\Jenkins\Miniconda3\Scripts\activate.bat C:\Jenkins\Miniconda3 + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64 + set PYTHONPATH=C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build - name: Start monitoring script id: monitor-script