|
20 | 20 | - all |
21 | 21 |
|
22 | 22 | jobs: |
23 | | - generate-windows-conda-matrix: |
| 23 | + generate-windows-matrix: |
24 | 24 | uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main |
25 | 25 | with: |
26 | | - package-type: conda |
| 26 | + package-type: all |
27 | 27 | os: windows |
28 | 28 | channel: ${{ inputs.channel }} |
29 | | - generate-windows-wheel-matrix: |
30 | | - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main |
31 | | - with: |
32 | | - package-type: wheel |
33 | | - os: windows |
34 | | - channel: ${{ inputs.channel }} |
35 | | - generate-windows-libtorch-matrix: |
36 | | - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main |
37 | | - with: |
38 | | - package-type: libtorch |
39 | | - os: windows |
40 | | - channel: ${{ inputs.channel }} |
41 | | - |
42 | | - win-conda: |
43 | | - needs: generate-windows-conda-matrix |
44 | | - strategy: |
45 | | - matrix: |
46 | | - ${{ fromJson(needs.generate-windows-conda-matrix.outputs.matrix) }} |
47 | | - fail-fast: false |
48 | | - runs-on: ${{ matrix.validation_runner }} |
49 | | - steps: |
50 | | - - name: Checkout PyTorch builder |
51 | | - uses: actions/checkout@v2 |
52 | | - - name: Validate binary conda |
53 | | - uses: ./.github/actions/validate-windows-binary |
54 | | - with: |
55 | | - gpu_arch_type: ${{ matrix.gpu_arch_type }} |
56 | | - gpu_arch_ver: ${{ matrix.gpu_arch_version }} |
57 | | - installation: ${{ matrix.installation }} |
58 | | - python_version: ${{ matrix.python_version }} |
59 | 29 |
|
60 | | - win-wheel: |
61 | | - needs: generate-windows-wheel-matrix |
| 30 | + win: |
| 31 | + needs: generate-windows-matrix |
62 | 32 | strategy: |
63 | | - matrix: |
64 | | - ${{ fromJson(needs.generate-windows-wheel-matrix.outputs.matrix) }} |
| 33 | + matrix: ${{ fromJson(needs.generate-windows-matrix.outputs.matrix) }} |
65 | 34 | fail-fast: false |
66 | | - runs-on: ${{ matrix.validation_runner }} |
67 | | - steps: |
68 | | - - name: Checkout PyTorch builder |
69 | | - uses: actions/checkout@v2 |
70 | | - - name: Validate binary wheel |
71 | | - uses: ./.github/actions/validate-windows-binary |
72 | | - with: |
73 | | - gpu_arch_type: ${{ matrix.gpu_arch_type }} |
74 | | - gpu_arch_ver: ${{ matrix.gpu_arch_version }} |
75 | | - installation: ${{ matrix.installation }} |
76 | | - python_version: ${{ matrix.python_version }} |
| 35 | + uses: pytorch/test-infra/.github/workflows/windows_job.yml@main |
| 36 | + with: |
| 37 | + runner: ${{ matrix.validation_runner }} |
| 38 | + repository: "pytorch/builder" |
| 39 | + job-name: ${{ matrix.build_name }} |
| 40 | + script: | |
| 41 | + set -ex |
| 42 | + export ENV_NAME="conda-env-${{ github.run_id }}" |
| 43 | + export GPU_ARCH_VER="${{ matrix.gpu_arch_version }}" |
| 44 | + export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" |
| 45 | + export INSTALLATION="${{ matrix.installation }}" |
| 46 | + export CUDA_VER="${{ matrix.desired_cuda }}" |
77 | 47 |
|
78 | | - win-libt: |
79 | | - needs: generate-windows-libtorch-matrix |
80 | | - strategy: |
81 | | - matrix: |
82 | | - ${{ fromJson(needs.generate-windows-libtorch-matrix.outputs.matrix) }} |
83 | | - fail-fast: false |
84 | | - runs-on: "windows-2019" |
85 | | - env: |
86 | | - PYTHON_VERSION: ${{ matrix.python_version }} |
87 | | - steps: |
88 | | - - name: Install pytorch and smoke test |
89 | | - shell: powershell |
90 | | - run: | |
91 | | - $install = '${{ matrix.installation }}' |
92 | | - Invoke-WebRequest -Uri $install -OutFile 'libtorch.zip' |
93 | | - Expand-Archive -Force libtorch.zip . |
| 48 | + if [[ ${{ matrix.package_type }} == "libtorch" ]]; then |
| 49 | + curl ${{ matrix.installation }} -o libtorch.zip |
| 50 | + unzip libtorch.zip |
| 51 | + else |
| 52 | + conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow |
| 53 | + conda activate ${ENV_NAME} |
| 54 | + eval $INSTALLATION |
| 55 | + python ./test/smoke_test/smoke_test.py |
| 56 | + fi |
0 commit comments