File tree Expand file tree Collapse file tree 1 file changed +19
-13
lines changed
Expand file tree Collapse file tree 1 file changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -20,26 +20,32 @@ jobs:
2020 - name : Checkout repository
2121 uses : actions/checkout@v4
2222
23- - name : Install Python
24- uses : actions/setup-python@v5
25- with :
26- python-version : ' 3.9'
27-
28- - name : Copy setup.ps1 to debug folder
23+ - name : Monitor _temp folder and copy setup.ps1
24+ shell : pwsh
2925 run : |
30- if (!(Test-Path -Path "C:\GitHubActionsRunner\debug")) {
31- New-Item -ItemType Directory -Path "C:\GitHubActionsRunner\debug"
26+ # Ensure debug folder exists
27+ $debugFolder = "C:\GitHubActionsRunner\debug"
28+ if (!(Test-Path -Path $debugFolder)) {
29+ New-Item -ItemType Directory -Path $debugFolder
3230 }
3331
32+ # Monitor _temp folder for setup.ps1 and copy it as soon as it appears
3433 $tempFolder = "C:\GitHubActionsRunner\_work\_temp"
35- $debugFolder = "C:\GitHubActionsRunner\debug"
36-
37- if (Test-Path -Path "$tempFolder") {
38- Get-ChildItem -Path $tempFolder -Recurse -Filter setup.ps1 | ForEach-Object {
39- Copy-Item -Path $_.FullName -Destination $debugFolder -Force
34+ $fileCopied = $false
35+ while (-not $fileCopied) {
36+ if (Test-Path -Path "$tempFolder\setup.ps1") {
37+ Copy-Item -Path "$tempFolder\setup.ps1" -Destination "$debugFolder" -Force
38+ Write-Output "setup.ps1 copied to debug folder."
39+ $fileCopied = $true
4040 }
41+ Start-Sleep -Seconds 1
4142 }
4243
44+ - name : Install Python
45+ uses : actions/setup-python@v5
46+ with :
47+ python-version : ' 3.9'
48+
4349 - name : Build Triton
4450 run : |
4551 cd python
You can’t perform that action at this time.
0 commit comments