Skip to content

Commit

Permalink
Merge branch 'store-symbol-improvements' into 'master'
Browse files Browse the repository at this point in the history
Improve Store-Symbols.ps1

See merge request OpenMW/openmw!3426
  • Loading branch information
psi29a committed Sep 16, 2023
2 parents cc02d52 + 949dc58 commit 18a7755
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CI/Store-Symbols.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ if (-Not (Test-Path CMakeCache.txt))
Write-Error "This script must be run from the build directory."
}

if (-Not (Test-Path .cmake\api\v1\reply))
if (-Not (Test-Path .cmake\api\v1\reply\index-*.json) -Or -Not ((Get-Content -Raw .cmake\api\v1\reply\index-*.json | ConvertFrom-Json).reply.PSObject.Properties.Name -contains "codemodel-v2"))
{
Write-Output "Running CMake query..."
New-Item -Type File -Force .cmake\api\v1\query\codemodel-v2
cmake .
Write-Output "Done."
}

try
Expand Down Expand Up @@ -44,9 +46,12 @@ if (-not (Test-Path symstore-venv))
{
python -m venv symstore-venv
}
if (-not (Test-Path symstore-venv\Scripts\symstore.exe))
$symstoreVersion = "0.3.4"
if (-not (Test-Path symstore-venv\Scripts\symstore.exe) -or -not ((symstore-venv\Scripts\pip show symstore | Select-String '(?<=Version: ).*').Matches.Value -eq $symstoreVersion))
{
symstore-venv\Scripts\pip install symstore==0.3.3
symstore-venv\Scripts\pip install symstore==$symstoreVersion
}
$artifacts = $artifacts | Where-Object { Test-Path $_ }
symstore-venv\Scripts\symstore --compress .\SymStore @artifacts
Write-Output "Storing symbols..."
symstore-venv\Scripts\symstore --compress --skip-published .\SymStore @artifacts
Write-Output "Done."

0 comments on commit 18a7755

Please sign in to comment.