Skip to content

Commit eb74066

Browse files
GH
1 parent 72607cd commit eb74066

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,27 @@ jobs:
7575
# Download and extract Embree
7676
Invoke-WebRequest -Uri "${{ matrix.embree_url }}" -OutFile "embree.zip"
7777
Expand-Archive -Path "embree.zip" -DestinationPath "."
78-
$embreePath = "${{ matrix.embree_dir }}"
78+
$expectedEmbreeDir = "${{ matrix.embree_dir }}"
7979
8080
# Clean existing Embree installation
8181
if (Test-Path "thirdparty/embree") {
8282
Remove-Item -Path "thirdparty/embree" -Recurse -Force
8383
}
8484
85-
# Move extracted Embree directory to thirdparty
86-
Move-Item -Path $embreePath -Destination "thirdparty/embree" -Force
85+
# Handle different extraction structures
86+
if (Test-Path $expectedEmbreeDir) {
87+
# Expected directory exists, move it
88+
Move-Item -Path $expectedEmbreeDir -Destination "thirdparty/embree" -Force
89+
} else {
90+
# Check if embree files were extracted directly
91+
$embreeFiles = Get-ChildItem -Path "." -Directory | Where-Object { $_.Name -like "*embree*" }
92+
if ($embreeFiles) {
93+
Move-Item -Path $embreeFiles[0].FullName -Destination "thirdparty/embree" -Force
94+
} else {
95+
Write-Host "Warning: Could not find extracted Embree directory. Creating empty thirdparty/embree"
96+
New-Item -ItemType Directory -Path "thirdparty/embree" -Force | Out-Null
97+
}
98+
}
8799
88100
# Add to PATH and set EMBREE_LOCATION
89101
echo "$PWD/thirdparty/embree/bin" | Out-File -FilePath $env:GITHUB_PATH -Append

0 commit comments

Comments
 (0)