Skip to content

Commit

Permalink
try more paths
Browse files Browse the repository at this point in the history
  • Loading branch information
st-pasha committed Nov 16, 2023
1 parent e6bee01 commit 4d46a35
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: windows-latest

env:
DT_HARNESS: 'GitHub'
DT_HARNESS: GitHub
DT_BUILD_ID: ${{ github.run_id }}
DT_BUILD_NUMBER: ''
DT_BUILD_SUFFIX: ''
Expand All @@ -30,19 +30,19 @@ jobs:
- name: Prepare environment variables
run: |
$env:DT_BUILD_ID = (git rev-list --count origin/main) - 1
echo "DT_BUILD_ID=$((git rev-list --count origin/main) - 1)" >> $env:DT_BUILD_ID
if ($env:GITHUB_EVENT_NAME -eq 'pull_request') {
if ($env:GITHUB_PULL_REQUEST_HEAD_REPO_BRANCH -match '^rel-') {
$env:DT_RELEASE = 'True'
echo "DT_RELEASE=True" >> $env:DT_RELEASE
} else {
$env:DT_BUILD_SUFFIX = "PR$($env:GITHUB_EVENT_NUMBER).$DT_BUILD_ID"
echo "DT_BUILD_SUFFIX=PR$($env:GITHUB_EVENT_NUMBER).$env:DT_BUILD_ID" >> $env:DT_BUILD_SUFFIX
}
} elseif ($env:GITHUB_REF -eq 'refs/heads/main') {
$env:DT_BUILD_NUMBER = $DT_BUILD_ID
echo "DT_BUILD_NUMBER=$env:DT_BUILD_ID" >> $env:DT_BUILD_NUMBER
} elseif ($env:GITHUB_REF -match '^refs/heads/rel-') {
$env:DT_RELEASE = 'True'
echo "DT_RELEASE=True" >> $env:DT_RELEASE
} else {
$env:DT_BUILD_SUFFIX = "$($env:GITHUB_REF).$DT_BUILD_ID"
echo "DT_BUILD_SUFFIX=$env:GITHUB_REF.$env:DT_BUILD_ID" >> $env:DT_BUILD_SUFFIX
}
- name: Print environment
Expand Down
10 changes: 7 additions & 3 deletions ci/xbuild/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,14 @@ def _detect_compiler_executable(self):
f"Directory DT_MSVC_PATH=`{msvc_path}` does not exist."
)
else:
path0 = pathlib.Path(
"C:\\Program Files (x86)\\Microsoft Visual Studio"
)
while True:
path0 = pathlib.Path(
"C:\\Program Files (x86)\\Microsoft Visual Studio"
)
if not path0.is_dir():
path0 = pathlib.Path(
"C:\\Program Files\\Microsoft Visual Studio"
)
if not path0.is_dir(): break
subdirs = [
subpath for subpath in path0.iterdir()
Expand Down

0 comments on commit 4d46a35

Please sign in to comment.