Skip to content

Commit

Permalink
Pin github compatible msvc toolset version
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed Nov 3, 2023
1 parent 362d006 commit 497c749
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build_and_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,18 @@ jobs:
run: |
conda remove --force vs2017_win-64
# Github pre-installed versions:
# https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md
# Intel's compatible versions:
# https://www.intel.com/content/www/us/en/developer/articles/reference-implementation/intel-compilers-compatibility-with-microsoft-visual-studio-and-xcode.html
# TODO: do we want to enforce installing version that we want?
# Is it as easy as `choco install msvc==14.35`?
- name: Configure MSBuild
if: runner.os == 'Windows' && matrix.sycl == 'sycl'
# TODO: uses: microsoft/setup-msbuild ?
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.35
toolset: 14.2

- name: Configure Sycl
if: matrix.sycl == 'sycl'
Expand All @@ -127,6 +134,7 @@ jobs:
echo "WORKLOADS=$WORKLOADS,sycl" >> "$GITHUB_ENV"
- name: Configure compiler
shell: bash -el {0}
run: |
echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
# Monkey patch msvc compiler environment, so scikit-build does not overwrite
# it. Make sure to set desired environment using:
# > vcvars64.bat -vcvars_ver=<vcvars_ver>
# TODO: monkey patch abstract.CMakePlatform.compile_test_cmakelist or
# abstract.CMakePlatform.get_best_generator instead to chose right
# complier. It will produce more stable output. We may avoid setting up
# MSVC environment manually this way.
windows._get_msvc_compiler_env = lambda v, t: windows.CachedEnv()

setup(
Expand Down

0 comments on commit 497c749

Please sign in to comment.