ci: use fixed source path across runner steps
Some checks failed
Build Windows Release / Build Windows x64 Release (push) Failing after 24s
Some checks failed
Build Windows Release / Build Windows x64 Release (push) Failing after 24s
This commit is contained in:
@@ -31,8 +31,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
$work = Join-Path $env:RUNNER_TEMP 'chengnan-src'
|
$work = Join-Path $env:RUNNER_TEMP 'chengnan-src'
|
||||||
|
$srcFixed = Join-Path $env:RUNNER_TEMP 'chengnan-work'
|
||||||
$zip = Join-Path $env:RUNNER_TEMP 'chengnan-src.zip'
|
$zip = Join-Path $env:RUNNER_TEMP 'chengnan-src.zip'
|
||||||
if (Test-Path $work) { Remove-Item -Recurse -Force $work }
|
if (Test-Path $work) { Remove-Item -Recurse -Force $work }
|
||||||
|
if (Test-Path $srcFixed) { Remove-Item -Recurse -Force $srcFixed }
|
||||||
if (Test-Path $zip) { Remove-Item -Force $zip }
|
if (Test-Path $zip) { Remove-Item -Force $zip }
|
||||||
New-Item -ItemType Directory -Force -Path $work | Out-Null
|
New-Item -ItemType Directory -Force -Path $work | Out-Null
|
||||||
|
|
||||||
@@ -44,8 +46,8 @@ jobs:
|
|||||||
|
|
||||||
$src = Get-ChildItem -Path $work -Directory | Select-Object -First 1
|
$src = Get-ChildItem -Path $work -Directory | Select-Object -First 1
|
||||||
if (-not $src) { throw 'Source archive extraction produced no directory' }
|
if (-not $src) { throw 'Source archive extraction produced no directory' }
|
||||||
"SOURCE_DIR=$($src.FullName)" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
Copy-Item -Path $src.FullName -Destination $srcFixed -Recurse -Force
|
||||||
Write-Host "Source dir: $($src.FullName)"
|
Write-Host "Source dir: $srcFixed"
|
||||||
|
|
||||||
- name: Install MSYS2 and build dependencies
|
- name: Install MSYS2 and build dependencies
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@@ -73,7 +75,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
$bash = "$env:MSYS2_ROOT\usr\bin\bash.exe"
|
$bash = "$env:MSYS2_ROOT\usr\bin\bash.exe"
|
||||||
$src = $env:SOURCE_DIR -replace '\\','/'
|
$srcWin = Join-Path $env:RUNNER_TEMP 'chengnan-work'
|
||||||
|
$src = $srcWin -replace '\\','/'
|
||||||
$src = $src -replace '^([A-Za-z]):','/$1'
|
$src = $src -replace '^([A-Za-z]):','/$1'
|
||||||
$src = $src.ToLower()
|
$src = $src.ToLower()
|
||||||
$script = @"
|
$script = @"
|
||||||
|
|||||||
Reference in New Issue
Block a user