Skip to content

Commit bd6a3ec

Browse files
authored
Build Windows pybind in CI (#11018)
### Summary ![Screenshot 2025-05-22 at 11 17 18 AM](https://github.com/user-attachments/assets/8209e516-5fd7-4eb0-aebb-8df23b8c4aea) ### Test plan CI cc @larryliu0820
1 parent 62dc550 commit bd6a3ec

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/build-presets.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,30 @@ jobs:
6565
6666
./install_requirements.sh > /dev/null
6767
cmake --preset ${{ matrix.preset }}
68-
cmake --build cmake-out -j$(( $(nproc) - 1 ))
68+
69+
windows:
70+
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
71+
strategy:
72+
fail-fast: false
73+
matrix:
74+
preset: [pybind]
75+
with:
76+
job-name: build
77+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
78+
submodules: recursive
79+
timeout: 90
80+
script: |
81+
set -eux
82+
conda init powershell
83+
powershell -Command "& {
84+
\$ErrorActionPreference = 'Stop'
85+
Set-PSDebug -Trace 1
86+
87+
conda create --yes --quiet -n et python=3.12
88+
conda activate et
89+
90+
python install_requirements.py
91+
cmake --preset ${{ matrix.preset }}
92+
\$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
93+
cmake --build cmake-out -j \$numCores
94+
}"

0 commit comments

Comments
 (0)