Compare commits

...

6 Commits

Author SHA1 Message Date
Roman Telezhynskyi 28b09be6b4 Switch AppImage to clang. 2024-03-28 19:50:06 +02:00
Roman Telezhynskyi 4a6fc76329 Ensure that file closed after sending. 2024-03-28 15:51:46 +02:00
Roman Telezhynskyi 5a8111c9b1 Move tasks to speedup testing. 2024-03-28 15:12:27 +02:00
Roman Telezhynskyi 9d7903b67c Build script fixes. 2024-03-28 15:10:59 +02:00
Roman Telezhynskyi 19b3137ff1 Trying to give script more rights. 2024-03-28 15:03:35 +02:00
Roman Telezhynskyi d5c260a24d Add optional "multibundle" to version string. 2024-03-28 14:53:26 +02:00
4 changed files with 79 additions and 64 deletions

View File

@ -149,11 +149,12 @@ appimage_task_template: &APPIMAGE_TASK_TEMPLATE
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Linux valentina
- conan profile update settings.os_build=Linux valentina
- conan profile update settings.arch=x86_64 valentina
- conan profile update settings.compiler=gcc valentina
- conan profile update settings.compiler.cppstd=17 valentina
- conan profile update settings.arch_build=x86_64 valentina
- conan profile update settings.compiler=clang valentina
- conan profile update settings.compiler.libcxx=libstdc++11 valentina
- conan profile update settings.compiler.version=9 valentina
- conan profile update settings.compiler.version=10 valentina
- qbs setup-toolchains /usr/bin/${COMPILER} ${COMPILER}
- qbs setup-qt /opt/qt515/bin/qmake qt5
- qbs config defaultProfile qt5
@ -226,10 +227,9 @@ linux_task:
- container:
image: dismine/appimage-builder:latest
env:
COMPILER: gcc
QMAKE_SPEC: "linux-g++"
GCC_COLORS: 'error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
COMPILER_REGEX: "gcc|g\\+\\+"
COMPILER: clang
QMAKE_SPEC: "linux-clang"
COMPILER_REGEX: clang
PIP_CACHE_DIR: ${HOME}/.cache/pip
matrix:
- name: 'AppImage'
@ -402,7 +402,7 @@ macos_task_template: &MACOS_TASK_TEMPLATE
- 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
- sudo python3 scripts/symupload.py $CIRRUS_WORKING_DIR/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --multibundle=$MULTI_BUNDLE --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 project.enableConan:true project.conanWithCrashReporting:true project.conanProfiles:valentina
# Store the notarization credentials so that we can prevent a UI password dialog
# from blocking the CI

View File

@ -43,50 +43,6 @@ environment:
VALENTINA_VERSION: 0_7_52
matrix:
- job_name: Windows_Qt_6_5_(MSVC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
COMPILER: msvc
QT: Qt\6.5\msvc2019_64
QT_VERSION: Qt6_5
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
MSVC_PATH: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\Hostx64\\x64"
VSINSTALLDIR: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\"
ARCH: x64
PYTHON: "C:\\Python311-x64"
TARGET_PLATFORM: "Windows10+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: true
RUN_TESTS: true
WITH_CRASH_REPORTING: True
- job_name: Windows_Qt_5_15_(qbs_GCC_x86)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: mingw
COMPILER_CPPSTD: gnu17
COMPILER_LIBCXX: libstdc++11
QT: Qt\5.15\mingw81_32
QT_VERSION: Qt5_15
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
GCC_VERSION: 8.1
MINGW_PATH: C:\Qt\Tools\mingw810_32\bin
ARCH: x86
PYTHON: "C:\\Python311"
TARGET_PLATFORM: "Windows7+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: true
RUN_TESTS: true
WITH_CRASH_REPORTING: False
# - job_name: Windows_Qt_6_5_(GCC_x64)
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
# COMPILER: mingw
@ -163,6 +119,50 @@ environment:
MULTI_BUNDLE: false
DEPLOY: true
- job_name: Windows_Qt_6_5_(MSVC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
COMPILER: msvc
QT: Qt\6.5\msvc2019_64
QT_VERSION: Qt6_5
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
MSVC_PATH: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\Hostx64\\x64"
VSINSTALLDIR: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\"
ARCH: x64
PYTHON: "C:\\Python311-x64"
TARGET_PLATFORM: "Windows10+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: true
RUN_TESTS: true
WITH_CRASH_REPORTING: True
- job_name: Windows_Qt_5_15_(qbs_GCC_x86)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: mingw
COMPILER_CPPSTD: gnu17
COMPILER_LIBCXX: libstdc++11
QT: Qt\5.15\mingw81_32
QT_VERSION: Qt5_15
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
GCC_VERSION: 8.1
MINGW_PATH: C:\Qt\Tools\mingw810_32\bin
ARCH: x86
PYTHON: "C:\\Python311"
TARGET_PLATFORM: "Windows7+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: true
RUN_TESTS: true
WITH_CRASH_REPORTING: False
- job_name: Windows_Qt_5_15_(make_GCC_x86)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: mingw
@ -599,7 +599,7 @@ for:
before_build:
- ls ${HOME}/Qt
- export PATH="$HOME/.local/bin:`python3 -m site --user-base`/bin:$PATH"
- export PATH="$HOME/.local/bin:`python3 -m site --user-base`/bin:$HOME/.cargo/bin:$PATH"
- echo $PATH
- python3 --version
- whereis python3
@ -698,10 +698,11 @@ for:
- 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 ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true 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 project.conanProfiles:valentina
- export QTDIR=`$(brew --prefix qt6)`
- export CRASH_QT_VERSION=$($QTDIR/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 ${APPVEYOR_BUILD_FOLDER}/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --clean
- sudo python3 scripts/symupload.py ${APPVEYOR_BUILD_FOLDER}/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --multibundle=$MULTI_BUNDLE --clean
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true 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 project.conanProfiles:valentina
# Store the notarization credentials so that we can prevent a UI password dialog
# from blocking the CI
@ -800,7 +801,7 @@ for:
before_build:
- ls ${HOME}/Qt
- export QTDIR="${HOME}/${QT}"
- export PATH="$QTDIR/bin:$HOME/.local/bin:`python3 -m site --user-base`/bin:${HOME}/Qt/Qt Creator.app/Contents/MacOS:$PATH"
- export PATH="$QTDIR/bin:$HOME/.local/bin:`python3 -m site --user-base`/bin:${HOME}/Qt/Qt Creator.app/Contents/MacOS:$HOME/.cargo/bin:$PATH"
- echo $PATH
- python3 --version
- whereis python3
@ -900,7 +901,7 @@ for:
- export CRASH_QT_VERSION=$($QTDIR/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 ${APPVEYOR_BUILD_FOLDER}/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --clean
- sudo python3 scripts/symupload.py ${APPVEYOR_BUILD_FOLDER}/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --multibundle=$MULTI_BUNDLE --clean
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir project.enableConan:true project.conanWithCrashReporting:true project.conanProfiles:valentina
# Store the notarization credentials so that we can prevent a UI password dialog
# from blocking the CI

View File

@ -55,20 +55,25 @@ def generate_sym_files(install_root):
return sym_files
def generate_version_string(val_version, commit_hash, qt_version):
def generate_version_string(val_version, commit_hash, qt_version, multibundle):
# Determine the platform
platform = sys.platform
multibundle_str = ""
if platform == "win32":
platform_str = "windows"
elif platform == "darwin":
platform_str = "macos"
if multibundle:
multibundle_str = "-multibundle"
elif platform == "linux":
platform_str = "linux"
else:
platform_str = "unknown"
# Generate the version string
version_string = f"{val_version}-{commit_hash}-Qt_{qt_version}-{platform_str}"
version_string = f"{val_version}-{commit_hash}-Qt_{qt_version}-{platform_str}{multibundle_str}"
return version_string
def get_app_name(sym_file):
@ -89,7 +94,7 @@ def get_app_name(sym_file):
return base_name
def upload_symbols(install_root, val_version, commit_hash, qt_version, clean=False):
def upload_symbols(install_root, val_version, commit_hash, qt_version, clean=False, multibundle=False):
# Platform-specific commands for generating and uploading symbol files
platform = sys.platform
sym_files = generate_sym_files(install_root)
@ -98,7 +103,7 @@ def upload_symbols(install_root, val_version, commit_hash, qt_version, clean=Fal
print("No symbol files found. Exiting upload process.")
return
app_version = generate_version_string(val_version, commit_hash, qt_version)
app_version = generate_version_string(val_version, commit_hash, qt_version, multibundle)
print(f"Uploading symbols for version {app_version}")
for _, sym_file in sym_files:
@ -108,8 +113,9 @@ def upload_symbols(install_root, val_version, commit_hash, qt_version, clean=Fal
sym_file_name = os.path.basename(sym_file)
url = f"https://{database}.bugsplat.com/post/bp/symbol/breakpadsymbols.php?appName={app_name}&appVer={app_version}&code_file={sym_file_name}"
files = {'symbol_file': (f'{sym_file_name}', open(sym_file, 'rb'))}
response = requests.post(url, files=files)
with open(sym_file, 'rb') as symbol_file:
files = {'symbol_file': (f'{sym_file_name}', symbol_file)}
response = requests.post(url, files=files)
if response.status_code == 200:
print(f"Symbol file '{sym_file}' uploaded successfully.")
@ -141,6 +147,7 @@ if __name__ == "__main__":
# - Third argument: Commit git hash
# - Fourth argument: Qt version
# - Optional argument: --clean (Clean up after upload)
# - Optional argument: --multibundle (Mark multibundle version. Has effect only on macos)
# Parse command-line arguments
parser = argparse.ArgumentParser(description="Upload symbols to BugSplat.")
@ -149,8 +156,11 @@ if __name__ == "__main__":
parser.add_argument("hash", type=str, help="Commit git hash")
parser.add_argument("qt_version", type=str, help="Qt version")
parser.add_argument("--clean", action="store_true", help="Clean up after upload")
parser.add_argument("--multibundle", type=str, default="false", choices=["true", "false"], help="Mark multibundle version. Has effect only on Macos")
args = parser.parse_args()
multibundle = (args.multibundle == "true")
# Call install_package function with provided arguments
upload_symbols(args.install_root, args.val_version, args.hash, args.qt_version, args.clean)
upload_symbols(args.install_root, args.val_version, args.hash, args.qt_version, args.clean, multibundle)

View File

@ -77,9 +77,13 @@ auto AppCrashVersion() -> QString
{
QString const version = QStringLiteral("%1_%2_%3").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION);
QString const qtVersion = QStringLiteral("Qt_%1_%2").arg(QT_VERSION_MAJOR).arg(QT_VERSION_MINOR);
QString multibundle; // NOLINT(misc-const-correctness)
#if defined(Q_OS_MACOS)
QString const platform = QStringLiteral("macos");
#if defined(MULTI_BUNDLE)
multibundle = QStringLiteral("-multibundle");
#endif
#elif defined(Q_OS_WIN)
QString const platform = QStringLiteral("windows");
#elif defined(Q_OS_LINUX)
@ -88,7 +92,7 @@ auto AppCrashVersion() -> QString
QString const platform = QStringLiteral("unknown");
#endif
return QStringLiteral("%1-%2-%3-%4").arg(version, VCS_REPO_STATE_REVISION, qtVersion, platform);
return QStringLiteral("%1-%2-%3-%4%5").arg(version, VCS_REPO_STATE_REVISION, qtVersion, platform, multibundle);
}
//---------------------------------------------------------------------------------------------------------------------