From 18f4ad697880b8060a2170595ad4c56bd82afe86 Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Tue, 26 Aug 2025 15:25:35 -0700 Subject: [PATCH] Update [ghstack-poisoned] --- .github/workflows/build-presets.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/build-presets.yml b/.github/workflows/build-presets.yml index 6f983ba58b6..76ec7dfd42d 100644 --- a/.github/workflows/build-presets.yml +++ b/.github/workflows/build-presets.yml @@ -103,3 +103,37 @@ jobs: ./install_requirements.sh > /dev/null cmake --preset ${{ matrix.preset }} cmake --build cmake-out -j$(( $(nproc) - 1 )) + + windows: + uses: pytorch/test-infra/.github/workflows/windows_job.yml@main + strategy: + fail-fast: false + matrix: + preset: [windows] + with: + job-name: build + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + submodules: recursive + timeout: 90 + script: | + set -eux + conda init powershell + powershell -Command "& { + Set-PSDebug -Trace 1 + \$ErrorActionPreference = 'Stop' + \$PSNativeCommandUseErrorActionPreference = \$true + conda create --yes --quiet -n et python=3.12 + conda activate et + python install_requirements.py + cmake --preset ${{ matrix.preset }} -T ClangCL + if (\$LASTEXITCODE -ne 0) { + Write-Host "CMake configuration was unsuccessful. Exit code: \$LASTEXITCODE." + exit \$LASTEXITCODE + } + \$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1 + cmake --build cmake-out -j \$numCores + if (\$LASTEXITCODE -ne 0) { + Write-Host "CMake build was unsuccessful. Exit code: \$LASTEXITCODE." + exit \$LASTEXITCODE + } + }"