Skip to content

Commit

Permalink
add extra msvc path candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
st-pasha committed Nov 16, 2023
1 parent 6efa6f2 commit ee71e30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ jobs:
- name: Print environment
run: |
echo "DT_BUILD_ID = $DT_BUILD_ID"
echo "DT_RELEASE = $DT_RELEASE"
echo "DT_BUILD_SUFFIX = $DT_BUILD_SUFFIX"
echo "DT_BUILD_NUMBER = $DT_BUILD_NUMBER"
echo "GITHUB_EVENT_NAME = $env:GITHUB_EVENT_NAME"
echo "GITHUB_EVENT_NUMBER = $env:GITHUB_EVENT_NUMBER"
echo "GITHUB_REF = $env:GITHUB_REF"
echo "GITHUB_EVENT_PULL_REQUEST_HEAD_REF = $env:GITHUB_EVENT_PULL_REQUEST_HEAD_REF"
echo "DT_HARNESS = $env:DT_HARNESS"
echo "DT_BUILD_ID = $env:DT_BUILD_ID"
echo "DT_RELEASE = $env:DT_RELEASE"
echo "DT_BUILD_SUFFIX = $env:DT_BUILD_SUFFIX"
echo "DT_BUILD_NUMBER = $env:DT_BUILD_NUMBER"
- name: Set up Python 3.8
uses: actions/setup-python@v3
Expand Down
6 changes: 4 additions & 2 deletions ci/xbuild/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ def _detect_compiler_executable(self):

if sys.platform == "win32":
self._detect_winsdk()
msvc_default_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\"
msvc_path = os.environ.get("DT_MSVC_PATH", msvc_default_path)
msvc_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\"
if not os.path.isdir(msvc_path):
msvc_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC"
msvc_path = os.environ.get("DT_MSVC_PATH", msvc_path)
if not os.path.isdir(msvc_path):
raise ValueError("Microsoft Visual Studio directory %s not found. "
"Please specify its location in `DT_MSVC_PATH` environment variable."
Expand Down

0 comments on commit ee71e30

Please sign in to comment.