From 949dc587417696e606e422f2963d66bd88cae4da Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 13 Sep 2023 22:57:16 +0100 Subject: [PATCH] Improve Store-Symbols.ps1 * Handle other things also using CMake's file API. * Ensure the right version of symstore is used. * Upgrade to symstore 0.3.4 to fix incorrect IDs. --- CI/Store-Symbols.ps1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CI/Store-Symbols.ps1 b/CI/Store-Symbols.ps1 index 6328a2a2f6..8634181432 100644 --- a/CI/Store-Symbols.ps1 +++ b/CI/Store-Symbols.ps1 @@ -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 @@ -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."