mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Merge branch 'symstore' into 'master'
Package symbols for symbol server in CI See merge request OpenMW/openmw!2818
This commit is contained in:
commit
3594f92e3a
@ -452,6 +452,7 @@ macOS12_Xcode13:
|
||||
- $env:CCACHE_BASEDIR = Get-Location
|
||||
- $env:CCACHE_DIR = "$(Get-Location)\ccache"
|
||||
- New-Item -Type Directory -Force -Path $env:CCACHE_DIR
|
||||
- New-Item -Type File -Force -Path MSVC2019_64_Ninja\.cmake\api\v1\query\codemodel-v2
|
||||
- sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N -b -t -C $multiview -E
|
||||
- cd MSVC2019_64_Ninja
|
||||
- .\ActivateMSVC.ps1
|
||||
@ -463,6 +464,10 @@ macOS12_Xcode13:
|
||||
- |
|
||||
if (Get-ChildItem -Recurse *.pdb) {
|
||||
7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" '*.pdb' CI-ID.txt
|
||||
Push-Location ..
|
||||
..\CI\Store-Symbols.ps1
|
||||
7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt
|
||||
Pop-Location
|
||||
Get-ChildItem -Recurse *.pdb | Remove-Item
|
||||
}
|
||||
- 7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}.zip"))" '*'
|
||||
@ -554,6 +559,7 @@ macOS12_Xcode13:
|
||||
- $env:CCACHE_BASEDIR = Get-Location
|
||||
- $env:CCACHE_DIR = "$(Get-Location)\ccache"
|
||||
- New-Item -Type Directory -Force -Path $env:CCACHE_DIR
|
||||
- New-Item -Type File -Force -Path MSVC2019_64\.cmake\api\v1\query\codemodel-v2
|
||||
- sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -b -t -C $multiview -E
|
||||
- cd MSVC2019_64
|
||||
- cmake --build . --config $config
|
||||
@ -564,6 +570,10 @@ macOS12_Xcode13:
|
||||
- |
|
||||
if (Get-ChildItem -Recurse *.pdb) {
|
||||
7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" '*.pdb' CI-ID.txt
|
||||
Push-Location ..
|
||||
..\CI\Store-Symbols.ps1
|
||||
7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt
|
||||
Pop-Location
|
||||
Get-ChildItem -Recurse *.pdb | Remove-Item
|
||||
}
|
||||
- 7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}.zip"))" '*'
|
||||
|
52
CI/Store-Symbols.ps1
Normal file
52
CI/Store-Symbols.ps1
Normal file
@ -0,0 +1,52 @@
|
||||
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))
|
||||
{
|
||||
New-Item -Type File -Force .cmake\api\v1\query\codemodel-v2
|
||||
cmake .
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Push-Location .cmake\api\v1\reply
|
||||
|
||||
$index = Get-Content -Raw index-*.json | ConvertFrom-Json
|
||||
|
||||
$codemodel = Get-Content -Raw $index.reply."codemodel-v2".jsonFile | ConvertFrom-Json
|
||||
|
||||
$targets = @()
|
||||
$codemodel.configurations | ForEach-Object {
|
||||
$_.targets | ForEach-Object {
|
||||
$target = Get-Content -Raw $_.jsonFile | ConvertFrom-Json
|
||||
if ($target.type -eq "EXECUTABLE" -or $target.type -eq "SHARED_LIBRARY")
|
||||
{
|
||||
$targets += $target
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$artifacts = @()
|
||||
$targets | ForEach-Object {
|
||||
$_.artifacts | ForEach-Object {
|
||||
$artifacts += $_.path
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
if (-not (Test-Path symstore-venv))
|
||||
{
|
||||
python -m venv symstore-venv
|
||||
}
|
||||
if (-not (Test-Path symstore-venv\Scripts\symstore.exe))
|
||||
{
|
||||
symstore-venv\Scripts\pip install symstore==0.3.3
|
||||
}
|
||||
$artifacts = $artifacts | Where-Object { Test-Path $_ }
|
||||
symstore-venv\Scripts\symstore --compress .\SymStore @artifacts
|
Loading…
Reference in New Issue
Block a user