1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:29:55 +00:00

Merge branch 'compress-symbols-separately' into 'master'

Compress symbols separately

See merge request OpenMW/openmw!4362
This commit is contained in:
elsid 2024-09-09 21:21:18 +00:00
commit d643970952
2 changed files with 104 additions and 9 deletions

View file

@ -533,6 +533,45 @@ macOS14_Xcode15_arm64:
variables: variables:
CCACHE_SIZE: 3G CCACHE_SIZE: 3G
.Compress_And_Upload_Symbols_Base:
extends: .Ubuntu_Image
stage: build
variables:
GIT_STRATEGY: none
script:
- apt-get update
- apt-get install -y curl gcab unzip
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscli-exe-linux-x86_64.zip
- unzip -d awscli-exe-linux-x86_64 awscli-exe-linux-x86_64.zip
- pushd awscli-exe-linux-x86_64
- ./aws/install
- popd
- aws --version
- unzip -d sym_store *sym_store.zip
- shopt -s globstar
- |
for file in sym_store/**/*.exe; do
if [[ -f "$file" ]]; then
gcab --create --zip --nopath "${file%.exe}.ex_" "$file"
fi
done
- |
for file in sym_store/**/*.dll; do
if [[ -f "$file" ]]; then
gcab --create --zip --nopath "${file%.dll}.dl_" "$file"
fi
done
- |
for file in sym_store/**/*.pdb; do
if [[ -f "$file" ]]; then
gcab --create --zip --nopath "${file%.pdb}.pd_" "$file"
fi
done
- |
if [[ -v AWS_ACCESS_KEY_ID ]]; then
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp --recursive --exclude '*' --include '*.ex_' --include '*.dl_' --include '*.pd_' sym_store s3://openmw-sym
fi
.Windows_Ninja_Base: .Windows_Ninja_Base:
tags: tags:
- saas-windows-medium-amd64 - saas-windows-medium-amd64
@ -590,10 +629,7 @@ macOS14_Xcode15_arm64:
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" s3://openmw-artifacts/${artifactDirectory} aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" s3://openmw-artifacts/${artifactDirectory}
} }
Push-Location .. Push-Location ..
..\CI\Store-Symbols.ps1 ..\CI\Store-Symbols.ps1 -SkipCompress
if (Test-Path env:AWS_ACCESS_KEY_ID) {
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp --recursive --exclude * --include *.ex_ --include *.dl_ --include *.pd_ .\SymStore s3://openmw-sym
}
7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt 7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt
Pop-Location Pop-Location
Get-ChildItem -Recurse *.pdb | Remove-Item Get-ChildItem -Recurse *.pdb | Remove-Item
@ -631,6 +667,13 @@ macOS14_Xcode15_arm64:
variables: variables:
config: "Release" config: "Release"
.Windows_Compress_And_Upload_Symbols_Ninja_Release:
extends:
- .Compress_And_Upload_Symbols_Base
needs:
- job: "Windows_Ninja_Release"
artifacts: true
.Windows_Ninja_Release_MultiView: .Windows_Ninja_Release_MultiView:
extends: extends:
- .Windows_Ninja_Base - .Windows_Ninja_Base
@ -638,12 +681,26 @@ macOS14_Xcode15_arm64:
multiview: "-M" multiview: "-M"
config: "Release" config: "Release"
.Windows_Compress_And_Upload_Symbols_Ninja_Release_MultiView:
extends:
- .Compress_And_Upload_Symbols_Base
needs:
- job: "Windows_Ninja_Release_MultiView"
artifacts: true
.Windows_Ninja_Debug: .Windows_Ninja_Debug:
extends: extends:
- .Windows_Ninja_Base - .Windows_Ninja_Base
variables: variables:
config: "Debug" config: "Debug"
.Windows_Compress_And_Upload_Symbols_Ninja_Debug:
extends:
- .Compress_And_Upload_Symbols_Base
needs:
- job: "Windows_Ninja_Debug"
artifacts: true
.Windows_Ninja_RelWithDebInfo: .Windows_Ninja_RelWithDebInfo:
extends: extends:
- .Windows_Ninja_Base - .Windows_Ninja_Base
@ -652,6 +709,13 @@ macOS14_Xcode15_arm64:
# Gitlab can't successfully execute following binaries due to unknown reason # Gitlab can't successfully execute following binaries due to unknown reason
# executables: "components-tests.exe,openmw-tests.exe,openmw-cs-tests.exe,openmw_detournavigator_navmeshtilescache_benchmark.exe" # executables: "components-tests.exe,openmw-tests.exe,openmw-cs-tests.exe,openmw_detournavigator_navmeshtilescache_benchmark.exe"
.Windows_Compress_And_Upload_Symbols_Ninja_RelWithDebInfo:
extends:
- .Compress_And_Upload_Symbols_Base
needs:
- job: "Windows_Ninja_RelWithDebInfo"
artifacts: true
.Windows_Ninja_CacheInit: .Windows_Ninja_CacheInit:
# currently, Windows jobs for all configs share the same cache key as we only cache the dependencies # currently, Windows jobs for all configs share the same cache key as we only cache the dependencies
extends: extends:
@ -711,10 +775,7 @@ macOS14_Xcode15_arm64:
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" s3://openmw-artifacts/${artifactDirectory} aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" s3://openmw-artifacts/${artifactDirectory}
} }
Push-Location .. Push-Location ..
..\CI\Store-Symbols.ps1 ..\CI\Store-Symbols.ps1 -SkipCompress
if (Test-Path env:AWS_ACCESS_KEY_ID) {
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp --recursive --exclude * --include *.ex_ --include *.dl_ --include *.pd_ .\SymStore s3://openmw-sym
}
7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt 7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt
Pop-Location Pop-Location
Get-ChildItem -Recurse *.pdb | Remove-Item Get-ChildItem -Recurse *.pdb | Remove-Item
@ -751,12 +812,26 @@ macOS14_Xcode15_arm64:
variables: variables:
config: "Release" config: "Release"
.Windows_Compress_And_Upload_Symbols_MSBuild_Release:
extends:
- .Compress_And_Upload_Symbols_Base
needs:
- job: "Windows_MSBuild_Release"
artifacts: true
.Windows_MSBuild_Debug: .Windows_MSBuild_Debug:
extends: extends:
- .Windows_MSBuild_Base - .Windows_MSBuild_Base
variables: variables:
config: "Debug" config: "Debug"
.Windows_Compress_And_Upload_Symbols_MSBuild_Debug:
extends:
- .Compress_And_Upload_Symbols_Base
needs:
- job: "Windows_MSBuild_Debug"
artifacts: true
Windows_MSBuild_RelWithDebInfo: Windows_MSBuild_RelWithDebInfo:
extends: extends:
- .Windows_MSBuild_Base - .Windows_MSBuild_Base
@ -769,6 +844,17 @@ Windows_MSBuild_RelWithDebInfo:
# run this for both pushes and schedules so 'latest successful pipeline for branch' always includes it # run this for both pushes and schedules so 'latest successful pipeline for branch' always includes it
- if: $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "schedule"
Windows_Compress_And_Upload_Symbols_MSBuild_RelWithDebInfo:
extends:
- .Compress_And_Upload_Symbols_Base
needs:
- job: "Windows_MSBuild_RelWithDebInfo"
artifacts: true
# temporarily enabled while we're linking the above on the downloads page
rules:
# run this for both pushes and schedules so 'latest successful pipeline for branch' always includes it
- if: $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "schedule"
Windows_MSBuild_CacheInit: Windows_MSBuild_CacheInit:
# currently, Windows jobs for all configs share the same cache key as we only cache the dependencies # currently, Windows jobs for all configs share the same cache key as we only cache the dependencies
extends: extends:

View file

@ -1,3 +1,7 @@
param (
[switch] $SkipCompress
)
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
if (-Not (Test-Path CMakeCache.txt)) if (-Not (Test-Path CMakeCache.txt))
@ -67,7 +71,12 @@ $artifacts = $artifacts | Where-Object { Test-Path $_ }
Write-Output "Storing symbols..." Write-Output "Storing symbols..."
symstore-venv\Scripts\symstore --compress --skip-published .\SymStore @artifacts $optionalArgs = @()
if (-not $SkipCompress) {
$optionalArgs += "--compress"
}
symstore-venv\Scripts\symstore $optionalArgs --skip-published .\SymStore @artifacts
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
Write-Error "Command exited with code $LASTEXITCODE" Write-Error "Command exited with code $LASTEXITCODE"
} }