File tree Expand file tree Collapse file tree 2 files changed +105
-0
lines changed
Expand file tree Collapse file tree 2 files changed +105
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Windows Wheels
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - build/packaging/**
7+ - .github/workflows/build_wheels_windows.yml
8+ - setup.py
9+ push :
10+ branches :
11+ - nightly
12+ - main
13+ - release/*
14+ tags :
15+ # NOTE: Binary build pipelines should only get triggered on release candidate builds
16+ # Release candidate tags look like: v1.11.0-rc1
17+ - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
18+ schedule :
19+ - cron : ' 0 0 * * *' # Runs at midnight UTC every day
20+ workflow_dispatch :
21+
22+ permissions :
23+ id-token : write
24+ contents : read
25+
26+ jobs :
27+ generate-matrix :
28+ uses : pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
29+ with :
30+ package-type : wheel
31+ os : windows
32+ test-infra-repository : pytorch/test-infra
33+ test-infra-ref : main
34+ with-xpu : enable
35+ with-cuda : disable
36+
37+ build :
38+ needs : generate-matrix
39+ strategy :
40+ fail-fast : false
41+ matrix :
42+ include :
43+ - repository : pytorch/ao
44+ pre-script : packaging/pre_build_script.sh
45+ env-script : packaging/vc_env_helper.bat
46+ # post-script: "python packaging/wheel/relocate.py"
47+ smoke-test-script : packaging/smoke_test.py
48+ package-name : torchao
49+ name : ${{ matrix.repository }}
50+ uses : pytorch/test-infra/.github/workflows/build_wheels_windows.yml@main
51+ with :
52+ repository : ${{ matrix.repository }}
53+ ref : " "
54+ test-infra-repository : pytorch/test-infra
55+ test-infra-ref : main
56+ build-matrix : ${{ needs.generate-matrix.outputs.matrix }}
57+ pre-script : ${{ matrix.pre-script }}
58+ env-script : ${{ matrix.env-script }}
59+ post-script : ${{ matrix.post-script }}
60+ package-name : ${{ matrix.package-name }}
61+ smoke-test-script : ${{ matrix.smoke-test-script }}
62+ trigger-event : ${{ github.event_name }}
Original file line number Diff line number Diff line change 1+ @ echo on
2+
3+ set VC_VERSION_LOWER = 17
4+ set VC_VERSION_UPPER = 18
5+ if " %VC_YEAR% " == " 2019" ( set VC_VERSION_LOWER = 16 set VC_VERSION_UPPER=17)
6+ if " %VC_YEAR% " == " 2017" ( set VC_VERSION_LOWER = 15 set VC_VERSION_UPPER=16)
7+
8+ for /f " usebackq tokens=*" %%i in (`" %ProgramFiles(x86)% \Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [%VC_VERSION_LOWER% ^ ,%VC_VERSION_UPPER% ^ ) -property installationPath`) do (
9+ if exist " %%i " if exist " %%i \VC\Auxiliary\Build\vcvarsall.bat" (
10+ set " VS15INSTALLDIR = %%i "
11+ set " VS15VCVARSALL = %%i \VC\Auxiliary\Build\vcvarsall.bat"
12+ goto vswhere
13+ )
14+ )
15+
16+ :vswhere
17+ if " %VSDEVCMD_ARGS% " == " " (
18+ call " %VS15VCVARSALL% " x64 || exit /b 1
19+ ) else (
20+ call " %VS15VCVARSALL% " x64 %VSDEVCMD_ARGS% || exit /b 1
21+ )
22+
23+ @ echo on
24+
25+ if " %CU_VERSION% " == " xpu" call " C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
26+
27+ set DISTUTILS_USE_SDK = 1
28+
29+ set args = %1
30+ shift
31+ :start
32+ if [%1 ] == [] goto done
33+ set args = %args% %1
34+ shift
35+ goto start
36+
37+ :done
38+ if " %args% " == " " (
39+ echo Usage: vc_env_helper.bat [command] [args]
40+ echo e.g. vc_env_helper.bat cl /c test.cpp
41+ )
42+
43+ %args% || exit /b 1
You can’t perform that action at this time.
0 commit comments