Skip to content

Commit 497c749

Browse files
committed
Pin github compatible msvc toolset version
1 parent 362d006 commit 497c749

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/build_and_run.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,18 @@ jobs:
110110
run: |
111111
conda remove --force vs2017_win-64
112112
113+
# Github pre-installed versions:
114+
# https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md
115+
# Intel's compatible versions:
116+
# https://www.intel.com/content/www/us/en/developer/articles/reference-implementation/intel-compilers-compatibility-with-microsoft-visual-studio-and-xcode.html
117+
# TODO: do we want to enforce installing version that we want?
118+
# Is it as easy as `choco install msvc==14.35`?
113119
- name: Configure MSBuild
114120
if: runner.os == 'Windows' && matrix.sycl == 'sycl'
121+
# TODO: uses: microsoft/setup-msbuild ?
115122
uses: ilammy/msvc-dev-cmd@v1
116123
with:
117-
toolset: 14.35
124+
toolset: 14.2
118125

119126
- name: Configure Sycl
120127
if: matrix.sycl == 'sycl'
@@ -127,6 +134,7 @@ jobs:
127134
echo "WORKLOADS=$WORKLOADS,sycl" >> "$GITHUB_ENV"
128135
129136
- name: Configure compiler
137+
shell: bash -el {0}
130138
run: |
131139
echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
132140

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
# Monkey patch msvc compiler environment, so scikit-build does not overwrite
2323
# it. Make sure to set desired environment using:
2424
# > vcvars64.bat -vcvars_ver=<vcvars_ver>
25+
# TODO: monkey patch abstract.CMakePlatform.compile_test_cmakelist or
26+
# abstract.CMakePlatform.get_best_generator instead to chose right
27+
# complier. It will produce more stable output. We may avoid setting up
28+
# MSVC environment manually this way.
2529
windows._get_msvc_compiler_env = lambda v, t: windows.CachedEnv()
2630

2731
setup(

0 commit comments

Comments
 (0)