From 2291be03093c479793c85a19399901e8fe322429 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 18 Aug 2024 11:42:41 +0300 Subject: [PATCH] Fix path to install root folder. --- .cirrus.yml | 14 ++++++++------ appveyor.yml | 8 ++++---- scripts/appveyor-deploy.ps1 | 6 +++--- scripts/cirrus-deploy.sh | 10 +++++----- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 0024dab49..788364fd5 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -369,12 +369,14 @@ macos_task_template: &MACOS_TASK_TEMPLATE - qbs config profiles.qt6.baseProfile clang - conan install . -s os=Macos --build=missing -o with_crash_reporting=True -pr=valentina - echo $CIRRUS_WORKING_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/release/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 + - export VALENTINA_WORKING_DIR=/private${CIRRUS_WORKING_DIR} + - echo $VALENTINA_WORKING_DIR + - qbs build -f valentina.qbs -d $VALENTINA_WORKING_DIR/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$VALENTINA_WORKING_DIR/build/release/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 - 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.3/dump_syms-installer.sh | sh - - python3 scripts/symupload.py $CIRRUS_WORKING_DIR/build/release/install-root $VALENTINA_VERSION g$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/release/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 + - python3 scripts/symupload.py $VALENTINA_WORKING_DIR/build/release/install-root $VALENTINA_VERSION g$CRASH_SHORT_SHA $CRASH_QT_VERSION --multibundle=$MULTI_BUNDLE --clean + - qbs build -f valentina.qbs -d $VALENTINA_WORKING_DIR/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$VALENTINA_WORKING_DIR/build/release/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 - echo "Create keychain profile" @@ -384,15 +386,15 @@ macos_task_template: &MACOS_TASK_TEMPLATE # characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if # you're curious - echo "Notarize app" - - xcrun notarytool submit "$CIRRUS_WORKING_DIR/build/release/install-root/share/valentina.dmg" --keychain-profile "notarytool-profile" --wait --timeout 5m || true + - xcrun notarytool submit "$VALENTINA_WORKING_DIR/build/release/install-root/share/valentina.dmg" --keychain-profile "notarytool-profile" --wait --timeout 5m || true # Finally, we need to "attach the staple" to our executable, which will allow our app to be # validated by macOS even when an internet connection is not available. - echo "Attach staple" - - xcrun stapler staple $CIRRUS_WORKING_DIR/build/release/install-root/share/valentina.dmg || true + - xcrun stapler staple $VALENTINA_WORKING_DIR/build/release/install-root/share/valentina.dmg || true - ccache -s deploy_script: - pwd - - $CIRRUS_WORKING_DIR/scripts/cirrus-deploy.sh + - $VALENTINA_WORKING_DIR/scripts/cirrus-deploy.sh before_cache_script: - brew cleanup diff --git a/appveyor.yml b/appveyor.yml index 1b179dcc7..6dd38cc5c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -278,7 +278,7 @@ for: - conan profile list - conan install . -s os=Windows --build=missing -o with_crash_reporting=%WITH_CRASH_REPORTING% -o with_xerces=True -pr=valentina - set VALENTINA_BUILD_FOLDER=%APPVEYOR_BUILD_FOLDER%\build - - qbs build -f valentina.qbs -d %VALENTINA_BUILD_FOLDER% --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%VALENTINA_BUILD_FOLDER%\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% + - qbs build -f valentina.qbs -d %VALENTINA_BUILD_FOLDER% --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%VALENTINA_BUILD_FOLDER%\release\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% test_script: - path @@ -294,8 +294,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 %VALENTINA_BUILD_FOLDER%\install-root\valentina %VALENTINA_VERSION% g%CRASH_SHORT_SHA% %CRASH_QT_VERSION% --clean) - - if "%DEPLOY%" == "true" (qbs build -f valentina.qbs -d %VALENTINA_BUILD_FOLDER% -p ValentinaSetup --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%VALENTINA_BUILD_FOLDER%\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%) + - if "%WITH_CRASH_REPORTING%" == "True" (python scripts/symupload.py %VALENTINA_BUILD_FOLDER%\release\install-root\valentina %VALENTINA_VERSION% g%CRASH_SHORT_SHA% %CRASH_QT_VERSION% --clean) + - if "%DEPLOY%" == "true" (qbs build -f valentina.qbs -d %VALENTINA_BUILD_FOLDER% -p ValentinaSetup --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%VALENTINA_BUILD_FOLDER%\release\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: @@ -505,7 +505,7 @@ for: - xcrun stapler staple ${APPVEYOR_BUILD_FOLDER}/build/release/install-root/share/valentina.dmg || true deploy_script: - - CIRRUS_WORKING_DIR=${APPVEYOR_BUILD_FOLDER} CIRRUS_CHANGE_IN_REPO=${APPVEYOR_REPO_COMMIT} CIRRUS_BRANCH=${APPVEYOR_REPO_BRANCH} ${APPVEYOR_BUILD_FOLDER}/scripts/cirrus-deploy.sh + - VALENTINA_WORKING_DIR=${APPVEYOR_BUILD_FOLDER} CIRRUS_CHANGE_IN_REPO=${APPVEYOR_REPO_COMMIT} CIRRUS_BRANCH=${APPVEYOR_REPO_BRANCH} ${APPVEYOR_BUILD_FOLDER}/scripts/cirrus-deploy.sh #---------------------------------# # notifications # diff --git a/scripts/appveyor-deploy.ps1 b/scripts/appveyor-deploy.ps1 index b60a8b786..ebc66223b 100644 --- a/scripts/appveyor-deploy.ps1 +++ b/scripts/appveyor-deploy.ps1 @@ -1,4 +1,4 @@ -$INSTALL_ROOT = "$env:VALENTINA_BUILD_FOLDER\install-root\valentina"; +$INSTALL_ROOT = "$env:VALENTINA_BUILD_FOLDER\release\install-root\valentina"; $type = "$env:TARGET_PLATFORM-$env:COMPILER-$env:ARCH-$env:QT_VERSION-$env:APPVEYOR_REPO_BRANCH-$env:APPVEYOR_REPO_COMMIT"; $file_name = "valentina-${type}.exe"; @@ -32,7 +32,7 @@ if($env:DEPLOY -eq "true") { Write-Host "[CI] Starting packing." -ForegroundColor Green; Remove-Item -Path "$INSTALL_ROOT\ValentinaInstaller.exe"; - & $env:PYTHON\python.exe "$env:APPVEYOR_BUILD_FOLDER\scripts\deploy.py" pack "$INSTALL_ROOT" "$env:VALENTINA_BUILD_FOLDER\install-root\$portable_file_name"; + & $env:PYTHON\python.exe "$env:APPVEYOR_BUILD_FOLDER\scripts\deploy.py" pack "$INSTALL_ROOT" "$env:VALENTINA_BUILD_FOLDER\release\install-root\$portable_file_name"; if ($LastExitCode -ne 0) { Write-Error -Message "[CI] Error creating an archive." -Category InvalidResult; exit 1; @@ -41,7 +41,7 @@ if($env:DEPLOY -eq "true") { } Write-Host "[CI] Uploading portable bundle." -ForegroundColor Green; - & $env:PYTHON\python.exe "$env:APPVEYOR_BUILD_FOLDER\scripts\deploy.py" upload $env:ACCESS_TOKEN "$env:VALENTINA_BUILD_FOLDER\install-root\$portable_file_name" "/0.7.x/Windows/$portable_file_name"; + & $env:PYTHON\python.exe "$env:APPVEYOR_BUILD_FOLDER\scripts\deploy.py" upload $env:ACCESS_TOKEN "$env:VALENTINA_BUILD_FOLDER\release\install-root\$portable_file_name" "/0.7.x/Windows/$portable_file_name"; if ($LastExitCode -ne 0) { Write-Error -Message "[CI] Error uploading an artifact." -Category InvalidResult; exit 1; diff --git a/scripts/cirrus-deploy.sh b/scripts/cirrus-deploy.sh index fa99bcb77..93256b8ea 100755 --- a/scripts/cirrus-deploy.sh +++ b/scripts/cirrus-deploy.sh @@ -22,21 +22,21 @@ check_failure() { if [[ "$DEPLOY" == "true" ]]; then print_info "Start labeling."; if [[ "$MULTI_BUNDLE" == "false" ]]; then - mv $CIRRUS_WORKING_DIR/build/install-root/share/valentina.dmg $CIRRUS_WORKING_DIR/build/install-root/share/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}.dmg; + mv $VALENTINA_WORKING_DIR/build/release/install-root/share/valentina.dmg $VALENTINA_WORKING_DIR/build/release/install-root/share/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}.dmg; else - mv $CIRRUS_WORKING_DIR/build/install-root/share/valentina.dmg $CIRRUS_WORKING_DIR/build/install-root/share/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-multibundle-${CIRRUS_CHANGE_IN_REPO}.dmg; + mv $VALENTINA_WORKING_DIR/build/release/install-root/share/valentina.dmg $VALENTINA_WORKING_DIR/build/release/install-root/share/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-multibundle-${CIRRUS_CHANGE_IN_REPO}.dmg; fi check_failure "Unable to label Valentina DMG."; print_info "Start cleaning."; - python3 $CIRRUS_WORKING_DIR/scripts/deploy.py clean $ACCESS_TOKEN; + python3 $VALENTINA_WORKING_DIR/scripts/deploy.py clean $ACCESS_TOKEN; check_failure "Unable to clean stale artifacts."; print_info "Start uploading."; if [[ "$MULTI_BUNDLE" == "false" ]]; then - python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/build/install-root/share/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}.dmg "/0.7.x/Mac OS X/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}.dmg"; + python3 $VALENTINA_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $VALENTINA_WORKING_DIR/build/release/install-root/share/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}.dmg "/0.7.x/Mac OS X/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}.dmg"; else - python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/build/install-root/share/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-multibundle-${CIRRUS_CHANGE_IN_REPO}.dmg "/0.7.x/Mac OS X/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-multibundle-${CIRRUS_CHANGE_IN_REPO}.dmg"; + python3 $VALENTINA_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $VALENTINA_WORKING_DIR/build/release/install-root/share/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-multibundle-${CIRRUS_CHANGE_IN_REPO}.dmg "/0.7.x/Mac OS X/valentina-${TARGET_PLATFORM}-${QT_VERSION}-${ARCH}-${CIRRUS_BRANCH}-multibundle-${CIRRUS_CHANGE_IN_REPO}.dmg"; fi check_failure "Unable to upload Valentina DMG.";