Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/build-presets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
# Build Arm Zephyr Preset
cmake --preset ${{ matrix.preset }}
cmake --build cmake-out -j$(( $(nproc) - 1 ))

linux:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
strategy:
Expand Down Expand Up @@ -117,16 +118,9 @@ jobs:
timeout: 90
script: |
set -eux
conda init powershell
powershell -Command "& {
\$ErrorActionPreference = 'Stop'
Set-PSDebug -Trace 1

conda create --yes --quiet -n et python=3.12
conda activate et
conda create --yes --quiet -n et python=3.12
conda activate et

python install_requirements.py
cmake --preset ${{ matrix.preset }}
\$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
cmake --build cmake-out -j \$numCores
}"
./install_requirements.sh
cmake -G "Visual Studio 17 2022" -T ClangCL --preset ${{ matrix.preset }}
cmake --build cmake-out -j$(( $(nproc) - 1 ))
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ if(NOT CMAKE_BUILD_TYPE)
endif()
announce_configured_options(CMAKE_BUILD_TYPE)

if(WIN32)
if(NOT "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "" AND NOT CMAKE_GENERATOR_TOOLSET MATCHES "Clang")
message(FATAL_ERROR "Windows requires clang. Pass '-T ClangCL' in the cmake build command. Current CMAKE_GENERATOR_TOOLSET: ${CMAKE_GENERATOR_TOOLSET}")
endif()
endif()

if(NOT PYTHON_EXECUTABLE)
resolve_python_executable()
endif()
Expand Down
Loading