Build script fixes.

This commit is contained in:
Roman Telezhynskyi 2024-03-28 07:22:44 +02:00
parent d3ee5df455
commit 959a878e29
3 changed files with 21 additions and 16 deletions

View File

@ -158,7 +158,7 @@ appimage_task_template: &APPIMAGE_TASK_TEMPLATE
- qbs setup-qt /opt/qt515/bin/qmake qt5
- qbs config defaultProfile qt5
- qbs config profiles.qt5.baseProfile ${COMPILER}
- conan install . -s os=Linux --build=missing -o with_crash_reporting=True -pr=valentina
- conan install . -s os=Linux --build=missing --build=sentry-crashpad -o with_crash_reporting=True -pr=valentina
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --jobs $(nproc) profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/AppDir modules.buildconfig.enableAppImage:true modules.buildconfig.enableRPath:false project.conanWithCrashReporting:true project.enableConan:true project.conanProfiles:valentina
- qbs -p autotest-runner -d build profile:qt5 config:release
- export CRASH_QT_VERSION=$(/opt/qt515/bin/qmake -query QT_VERSION | awk -F. '{print $1 "_" $2}')
@ -396,12 +396,12 @@ macos_task_template: &MACOS_TASK_TEMPLATE
- qbs config defaultProfile qt6
- qbs config profiles.qt6.baseProfile clang
- conan install . -s os=Macos --build=missing -o with_crash_reporting=True -pr=valentina
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir project.enableConan:true project.conanWithCrashReporting:true
- export CRASH_QT_VERSION=$(/opt/homebrew/opt/qt6/bin/qmake -query QT_VERSION | awk -F. '{print $1 "_" $2}')
- export CRASH_SHORT_SHA=$(git log --pretty=format:%h -n 1)
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mozilla/dump_syms/releases/download/v2.3.1/dump_syms-installer.sh | sh
- python3 scripts/symupload.py $CIRRUS_WORKING_DIR/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --clean
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir project.enableConan:true project.conanWithCrashReporting:true
# Store the notarization credentials so that we can prevent a UI password dialog
# from blocking the CI
- echo "Create keychain profile"

View File

@ -421,8 +421,8 @@ for:
$env:CRASH_SHORT_SHA = git log --pretty=format:%h -n 1
}
- ps: scripts/install_dump_sysms.ps1
- if "%WITH_CRASH_REPORTING%" == "True" (python scripts/symupload.py %APPVEYOR_BUILD_FOLDER%\build\install-root\valentina $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --clean)
- if "%DEPLOY%" == "true" (qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build -p ValentinaSetup --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true project.conanWithCrashReporting:true project.conanWithXerces:true modules.buildconfig.enableCcache:false project.conanProfiles:valentina modules.buildconfig.enablePCH:%ENABLE_PCH% modules.windeployqt.windeployqtProgramBinPath:%WINDEPLOYQT_BIN_PATH% modules.windeployqt.compilerRuntime:%WINDEPLOYQT_COMPILER_RUNTIME% modules.windeployqt.noCompilerRuntime:%WINDEPLOYQT_NO_COMPILER_RUNTIME%)
- if "%WITH_CRASH_REPORTING%" == "True" (python scripts/symupload.py %APPVEYOR_BUILD_FOLDER%\build\install-root\valentina %VALENTINA_VERSION% %CRASH_SHORT_SHA% %CRASH_QT_VERSION% --clean)
- if "%DEPLOY%" == "true" (qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build -p ValentinaSetup --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true project.conanWithCrashReporting:%WITH_CRASH_REPORTING% project.conanWithXerces:true modules.buildconfig.enableCcache:false project.conanProfiles:valentina modules.buildconfig.enablePCH:%ENABLE_PCH% modules.windeployqt.windeployqtProgramBinPath:%WINDEPLOYQT_BIN_PATH% modules.windeployqt.compilerRuntime:%WINDEPLOYQT_COMPILER_RUNTIME% modules.windeployqt.noCompilerRuntime:%WINDEPLOYQT_NO_COMPILER_RUNTIME%)
- ps: scripts/appveyor-deploy.ps1
on_finish:
@ -684,10 +684,7 @@ for:
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Macos valentina
- conan profile update settings.os.sdk_version=${MACOS_DEPLOYMENT_TARGET} valentina
- conan profile update settings.os.os_build=Macos valentina
- conan profile update settings.arch=x86_64 valentina
- conan profile update settings.arch_build=x86_64 valentina
- conan profile update settings.compiler=apple-clang valentina
- conan profile update settings.compiler.cppstd=17 valentina
- conan profile update settings.compiler.libcxx=libc++ valentina
@ -884,10 +881,7 @@ for:
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Macos valentina
- conan profile update settings.os.sdk_version=${MACOS_DEPLOYMENT_TARGET} valentina
- conan profile update settings.os_build=Macos valentina
- conan profile update settings.arch=x86_64 valentina
- conan profile update settings.arch_build=x86_64 valentina
- conan profile update settings.compiler=apple-clang valentina
- conan profile update settings.compiler.cppstd=17 valentina
- conan profile update settings.compiler.libcxx=libc++ valentina

View File

@ -47,7 +47,11 @@ def generate_sym_files(install_root):
subprocess.run(dump_syms_cmd, check=True)
sym_files.append((debug_file, zip_sym(sym_file)))
os.remove(sym_file)
try:
os.remove(sym_file)
except PermissionError as e:
print(f"PermissionError removing '{sym_file}': {e}")
return sym_files
@ -118,10 +122,17 @@ def upload_symbols(install_root, val_version, commit_hash, qt_version, clean=Fal
if clean:
debug_ext = debug_extension()
for debug_file, sym_file in sym_files:
os.remove(sym_file)
print(f"Symbol file '{sym_file}' removed.")
os.remove(debug_file)
print(f"Debug file '{debug_file}' removed.")
try:
os.remove(sym_file)
print(f"Symbol file '{sym_file}' removed.")
except PermissionError as e:
print(f"PermissionError removing '{sym_file}': {e}")
try:
os.remove(debug_file)
print(f"Debug file '{debug_file}' removed.")
except PermissionError as e:
print(f"PermissionError removing '{debug_file}': {e}")
if __name__ == "__main__":
# Command-line usage: python symupload.py /path/to/install_root/folder 0_7_52 abcdef123456 6_6 --clean