File tree Expand file tree Collapse file tree 4 files changed +34
-8
lines changed Expand file tree Collapse file tree 4 files changed +34
-8
lines changed Original file line number Diff line number Diff line change 66
66
./install_requirements.sh > /dev/null
67
67
cmake --preset ${{ matrix.preset }}
68
68
cmake --build cmake-out --parallel
69
+
70
+ windows :
71
+ uses : pytorch/test-infra/.github/workflows/windows_job.yml@main
72
+ strategy :
73
+ fail-fast : false
74
+ matrix :
75
+ preset : [pybind]
76
+ with :
77
+ job-name : build
78
+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
79
+ submodules : recursive
80
+ timeout : 90
81
+ script : |
82
+ set -eux
83
+
84
+ conda create --yes --quiet -n et python=3.12
85
+ conda activate et
86
+
87
+ ./install_requirements.sh > /dev/null
88
+ cmake --preset ${{ matrix.preset }}
89
+ cmake --build cmake-out --parallel
Original file line number Diff line number Diff line change @@ -67,12 +67,19 @@ if(NOT CMAKE_BUILD_TYPE)
67
67
endif ()
68
68
announce_configured_options (CMAKE_BUILD_TYPE )
69
69
70
+ if (WIN32 )
71
+ if (CMAKE_CXX_COMPILER AND NOT CMAKE_CXX_COMPILER MATCHES ".*clang.*" )
72
+ message (FATAL_ERROR "CMAKE_CXX_COMPILER must be set to clang on Windows" )
73
+ endif ()
74
+ endif ()
75
+ announce_configured_options (CMAKE_C_COMPILER_ID )
76
+ announce_configured_options (CMAKE_CXX_COMPILER_ID )
77
+
70
78
if (NOT PYTHON_EXECUTABLE )
71
79
resolve_python_executable ()
72
80
endif ()
73
81
announce_configured_options (PYTHON_EXECUTABLE )
74
82
75
- announce_configured_options (CMAKE_CXX_COMPILER_ID )
76
83
announce_configured_options (CMAKE_TOOLCHAIN_FILE )
77
84
announce_configured_options (BUCK2 )
78
85
Original file line number Diff line number Diff line change 4
4
{
5
5
"name" : " common" ,
6
6
"hidden" : true ,
7
- "binaryDir" : " ${sourceDir}/cmake-out"
7
+ "binaryDir" : " ${sourceDir}/cmake-out" ,
8
+ "cacheVariables" : {
9
+ "CMAKE_C_COMPILER" : " clang" ,
10
+ "CMAKE_CXX_COMPILER" : " clang++"
11
+ }
8
12
},
9
13
{
10
14
"name" : " macos-arm64" ,
Original file line number Diff line number Diff line change @@ -221,12 +221,6 @@ def main(args):
221
221
# latest PT commit otherwise
222
222
use_pytorch_nightly = False
223
223
224
- # Use ClangCL on Windows.
225
- # ClangCL is an alias to Clang that configures it to work in an MSVC-compatible
226
- # mode. Using it on Windows to avoid compiler compatibility issues for MSVC.
227
- if os .name == "nt" :
228
- cmake_args .append ("-T ClangCL" )
229
-
230
224
#
231
225
# Install executorch pip package. This also makes `flatc` available on the path.
232
226
# The --extra-index-url may be necessary if pyproject.toml has a dependency on a
You can’t perform that action at this time.
0 commit comments