From 3052c6be3b4ff728ea781e006ae3af22c2f42a1f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 21 Nov 2023 13:21:25 +0100 Subject: [PATCH 01/39] Enable Sentry for the engine if the conan con sentry_url is set If you want to test this locally do a conan install with: ``` -c user.curaengine:sentry_url= ``` The URL is stored in the CuraEngine repository variables Contributes to CURA-11364 --- conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conanfile.py b/conanfile.py index 4b37bfdd52..4ec4ffc03f 100644 --- a/conanfile.py +++ b/conanfile.py @@ -306,6 +306,8 @@ class CuraConan(ConanFile): self.options["boost"].header_only = True if self.settings.os == "Linux": self.options["curaengine_grpc_definitions"].shared = True + if self.conf.get("user.curaengine:sentry_url", "", check_type = str) != "": + self.options["curaengine"].enable_sentry = True def validate(self): version = self.conf_info.get("user.cura:version", default = self.version, check_type = str) From 3bd2ea4296bfaf8ba190ce566b07e448674f57f6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 21 Nov 2023 13:22:18 +0100 Subject: [PATCH 02/39] Pin dulcificum version Contributes to CURA-11364 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 4ec4ffc03f..6384469416 100644 --- a/conanfile.py +++ b/conanfile.py @@ -320,7 +320,7 @@ class CuraConan(ConanFile): self.requires("curaengine_grpc_definitions/0.1.0") self.requires("zlib/1.2.13") self.requires("pyarcus/5.3.0") - self.requires("dulcificum/(latest)@ultimaker/stable") + self.requires("dulcificum/0.1.0-beta.1") self.requires("curaengine/(latest)@ultimaker/testing") self.requires("pysavitar/5.3.0") self.requires("pynest2d/5.3.0") From f22d82c1e068a0bb7ae77aa228ef7dcf5bf00776 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 21 Nov 2023 13:27:26 +0100 Subject: [PATCH 03/39] Use CURA-11634 for CuraEngine Contributes to CURA-11364 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 6384469416..4fe68109e3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -321,7 +321,7 @@ class CuraConan(ConanFile): self.requires("zlib/1.2.13") self.requires("pyarcus/5.3.0") self.requires("dulcificum/0.1.0-beta.1") - self.requires("curaengine/(latest)@ultimaker/testing") + self.requires("curaengine/(latest)@ultimaker/cura_11364") self.requires("pysavitar/5.3.0") self.requires("pynest2d/5.3.0") self.requires("curaengine_plugin_gradual_flow/0.1.0") From 60bf2fbc2c430a6711c746d0c433e3a50f381769 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 21 Nov 2023 14:01:58 +0100 Subject: [PATCH 04/39] Add preference to disable sentry engine crash reporting CURA-11364 --- .../CuraEngineBackend/CuraEngineBackend.py | 20 +++++++++++++++---- resources/qml/Preferences/GeneralPage.qml | 19 ++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 1e965f5e8c..24f3dc1ae1 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -163,6 +163,7 @@ class CuraEngineBackend(QObject, Backend): self._is_disabled: bool = False application.getPreferences().addPreference("general/auto_slice", False) + application.getPreferences().addPreference("info/send_engine_crash", True) self._use_timer: bool = False @@ -173,6 +174,8 @@ class CuraEngineBackend(QObject, Backend): self._change_timer.setSingleShot(True) self._change_timer.setInterval(500) self.determineAutoSlicing() + + application.getPreferences().preferenceChanged.connect(self._onPreferencesChanged) self._slicing_error_message = Message( @@ -193,6 +196,9 @@ class CuraEngineBackend(QObject, Backend): application.initializationFinished.connect(self.initialize) + # Ensure that the initial value for send_engine_crash is handled correctly. + application.callLater(self._onPreferencesChanged, "info/send_engine_crash") + def startPlugins(self) -> None: """ Ensure that all backend plugins are started @@ -1088,11 +1094,17 @@ class CuraEngineBackend(QObject, Backend): self._change_timer.timeout.disconnect(self.slice) def _onPreferencesChanged(self, preference: str) -> None: - if preference != "general/auto_slice": + if preference != "general/auto_slice" and preference != "info/send_engine_crash": return - auto_slice = self.determineAutoSlicing() - if auto_slice: - self._change_timer.start() + if preference == "general/auto_slice": + auto_slice = self.determineAutoSlicing() + if auto_slice: + self._change_timer.start() + elif preference == "info/send_engine_crash": + if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash"): + os.environ["use_sentry"] = str(1) + else: + os.environ["use_sentry"] = str(0) def tickle(self) -> None: """Tickle the backend so in case of auto slicing, it starts the timer.""" diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 32bbcd5053..587084444c 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -120,6 +120,10 @@ UM.PreferencesPage UM.Preferences.resetPreference("info/send_slice_info") sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) + + UM.Preferences.resetPreference("info/send_engine_crash") + sendEngineCrashCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_engine_crash")) + UM.Preferences.resetPreference("info/automatic_update_check") checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) @@ -855,6 +859,21 @@ UM.PreferencesPage font: UM.Theme.getFont("medium_bold") text: catalog.i18nc("@label", "Privacy") } + UM.TooltipArea + { + width: childrenRect.width + height: visible ? childrenRect.height : 0 + text: catalog.i18nc("@info:tooltip", "Should slicing crashes be automatically reported to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.") + + UM.CheckBox + { + id: sendEngineCrashCheckbox + text: catalog.i18nc("@option:check","Send (anonymous) engine crash reports") + checked: boolCheck(UM.Preferences.getValue("info/send_engine_crash")) + onCheckedChanged: UM.Preferences.setValue("info/send_engine_crash", checked) + } + } + UM.TooltipArea { width: childrenRect.width From 593e959dd574784481add3c897061ae07763195c Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 29 Nov 2023 10:42:12 +0100 Subject: [PATCH 05/39] Use cleaner notation for use_sentry env variable CURA-11364 Co-authored-by: Casper Lamboo --- plugins/CuraEngineBackend/CuraEngineBackend.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 24f3dc1ae1..818766d766 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -1101,10 +1101,7 @@ class CuraEngineBackend(QObject, Backend): if auto_slice: self._change_timer.start() elif preference == "info/send_engine_crash": - if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash"): - os.environ["use_sentry"] = str(1) - else: - os.environ["use_sentry"] = str(0) + os.environ["use_sentry"] = "1" if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash") else "0" def tickle(self) -> None: """Tickle the backend so in case of auto slicing, it starts the timer.""" From 1e190ebcb969057942ecb6e75c51dc8454f9a3b3 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 30 Nov 2023 13:16:25 +0100 Subject: [PATCH 06/39] Format file CURA-1364 --- conanfile.py | 208 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 121 insertions(+), 87 deletions(-) diff --git a/conanfile.py b/conanfile.py index f7ebb4ef9c..6bae617e3a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -30,7 +30,8 @@ class CuraConan(ConanFile): options = { "enterprise": ["True", "False", "true", "false"], # Workaround for GH Action passing boolean as lowercase string "staging": ["True", "False", "true", "false"], # Workaround for GH Action passing boolean as lowercase string - "devtools": [True, False], # FIXME: Split this up in testing and (development / build (pyinstaller) / system installer) tools + "devtools": [True, False], + # FIXME: Split this up in testing and (development / build (pyinstaller) / system installer) tools "cloud_api_version": "ANY", "display_name": "ANY", # TODO: should this be an option?? "cura_debug_mode": [True, False], # FIXME: Use profiles @@ -72,7 +73,7 @@ class CuraConan(ConanFile): self._cura_env.define("QML2_IMPORT_PATH", str(self._site_packages.joinpath("PyQt6", "Qt6", "qml"))) self._cura_env.define("QT_PLUGIN_PATH", str(self._site_packages.joinpath("PyQt6", "Qt6", "plugins"))) if not self.in_local_cache: - self._cura_env.define( "CURA_DATA_ROOT", str(self._share_dir.joinpath("cura"))) + self._cura_env.define("CURA_DATA_ROOT", str(self._share_dir.joinpath("cura"))) if self.settings.os == "Linux": self._cura_env.define("QT_QPA_FONTDIR", "/usr/share/fonts") @@ -163,7 +164,7 @@ class CuraConan(ConanFile): python_ins_cmd = f"python -c \"import pkg_resources; print(';'.join([(s.key+','+ s.version) for s in pkg_resources.working_set]))\"" from six import StringIO buffer = StringIO() - self.run(python_ins_cmd, run_environment= True, env = "conanrun", output=buffer) + self.run(python_ins_cmd, run_environment=True, env="conanrun", output=buffer) packages = str(buffer.getvalue()).split("-----------------\n") packages = packages[1].strip('\r\n').split(";") @@ -179,7 +180,7 @@ class CuraConan(ConanFile): # If you want a specific Cura version to show up on the splash screen add the user configuration `user.cura:version=VERSION` # the global.conf, profile, package_info (of dependency) or via the cmd line `-c user.cura:version=VERSION` - cura_version = Version(self.conf.get("user.cura:version", default = self.version, check_type = str)) + cura_version = Version(self.conf.get("user.cura:version", default=self.version, check_type=str)) pre_tag = f"-{cura_version.pre}" if cura_version.pre else "" build_tag = f"+{cura_version.build}" if cura_version.build else "" internal_tag = f"+internal" if self.options.internal else "" @@ -187,16 +188,16 @@ class CuraConan(ConanFile): with open(os.path.join(location, "CuraVersion.py"), "w") as f: f.write(cura_version_py.render( - cura_app_name = self.name, - cura_app_display_name = self._app_name, - cura_version = cura_version, - cura_build_type = "Enterprise" if self._enterprise else "", - cura_debug_mode = self.options.cura_debug_mode, - cura_cloud_api_root = self.conan_data["urls"][self._urls]["cloud_api_root"], - cura_cloud_api_version = self.options.cloud_api_version, - cura_cloud_account_api_root = self.conan_data["urls"][self._urls]["cloud_account_api_root"], - cura_marketplace_root = self.conan_data["urls"][self._urls]["marketplace_root"], - cura_digital_factory_url = self.conan_data["urls"][self._urls]["digital_factory_url"], + cura_app_name=self.name, + cura_app_display_name=self._app_name, + cura_version=cura_version, + cura_build_type="Enterprise" if self._enterprise else "", + cura_debug_mode=self.options.cura_debug_mode, + cura_cloud_api_root=self.conan_data["urls"][self._urls]["cloud_api_root"], + cura_cloud_api_version=self.options.cloud_api_version, + cura_cloud_account_api_root=self.conan_data["urls"][self._urls]["cloud_account_api_root"], + cura_marketplace_root=self.conan_data["urls"][self._urls]["marketplace_root"], + cura_digital_factory_url=self.conan_data["urls"][self._urls]["digital_factory_url"], cura_latest_url=self.conan_data["urls"][self._urls]["cura_latest_url"], conan_installs=self._conan_installs(), python_installs=self._python_installs(), @@ -261,37 +262,43 @@ class CuraConan(ConanFile): with open(os.path.join(self.recipe_folder, "UltiMaker-Cura.spec.jinja"), "r") as f: pyinstaller = Template(f.read()) - version = self.conf.get("user.cura:version", default = self.version, check_type = str) + version = self.conf.get("user.cura:version", default=self.version, check_type=str) cura_version = Version(version) with open(os.path.join(location, "UltiMaker-Cura.spec"), "w") as f: f.write(pyinstaller.render( - name = str(self.options.display_name).replace(" ", "-"), - display_name = self._app_name, - entrypoint = entrypoint_location, - datas = datas, - binaries = binaries, - venv_script_path = str(self._script_dir), - hiddenimports = pyinstaller_metadata["hiddenimports"], - collect_all = pyinstaller_metadata["collect_all"], - icon = icon_path, - entitlements_file = entitlements_file, - osx_bundle_identifier = "'nl.ultimaker.cura'" if self.settings.os == "Macos" else "None", - upx = str(self.settings.os == "Windows"), - strip = False, # This should be possible on Linux and MacOS but, it can also cause issues on some distributions. Safest is to disable it for now - target_arch = self._pyinstaller_spec_arch, - macos = self.settings.os == "Macos", - version = f"'{version}'", - short_version = f"'{cura_version.major}.{cura_version.minor}.{cura_version.patch}'", + name=str(self.options.display_name).replace(" ", "-"), + display_name=self._app_name, + entrypoint=entrypoint_location, + datas=datas, + binaries=binaries, + venv_script_path=str(self._script_dir), + hiddenimports=pyinstaller_metadata["hiddenimports"], + collect_all=pyinstaller_metadata["collect_all"], + icon=icon_path, + entitlements_file=entitlements_file, + osx_bundle_identifier="'nl.ultimaker.cura'" if self.settings.os == "Macos" else "None", + upx=str(self.settings.os == "Windows"), + strip=False, + # This should be possible on Linux and MacOS but, it can also cause issues on some distributions. Safest is to disable it for now + target_arch=self._pyinstaller_spec_arch, + macos=self.settings.os == "Macos", + version=f"'{version}'", + short_version=f"'{cura_version.major}.{cura_version.minor}.{cura_version.patch}'", )) def export_sources(self): - copy(self, "*", os.path.join(self.recipe_folder, "plugins"), os.path.join(self.export_sources_folder, "plugins")) - copy(self, "*", os.path.join(self.recipe_folder, "resources"), os.path.join(self.export_sources_folder, "resources"), excludes = "*.mo") + copy(self, "*", os.path.join(self.recipe_folder, "plugins"), + os.path.join(self.export_sources_folder, "plugins")) + copy(self, "*", os.path.join(self.recipe_folder, "resources"), + os.path.join(self.export_sources_folder, "resources"), excludes="*.mo") copy(self, "*", os.path.join(self.recipe_folder, "tests"), os.path.join(self.export_sources_folder, "tests")) - copy(self, "*", os.path.join(self.recipe_folder, "cura"), os.path.join(self.export_sources_folder, "cura"), excludes="CuraVersion.py") - copy(self, "*", os.path.join(self.recipe_folder, "packaging"), os.path.join(self.export_sources_folder, "packaging")) - copy(self, "*", os.path.join(self.recipe_folder, ".run_templates"), os.path.join(self.export_sources_folder, ".run_templates")) + copy(self, "*", os.path.join(self.recipe_folder, "cura"), os.path.join(self.export_sources_folder, "cura"), + excludes="CuraVersion.py") + copy(self, "*", os.path.join(self.recipe_folder, "packaging"), + os.path.join(self.export_sources_folder, "packaging")) + copy(self, "*", os.path.join(self.recipe_folder, ".run_templates"), + os.path.join(self.export_sources_folder, ".run_templates")) copy(self, "requirements.txt", self.recipe_folder, self.export_sources_folder) copy(self, "requirements-dev.txt", self.recipe_folder, self.export_sources_folder) copy(self, "requirements-ultimaker.txt", self.recipe_folder, self.export_sources_folder) @@ -310,11 +317,11 @@ class CuraConan(ConanFile): self.options["boost"].header_only = True if self.settings.os == "Linux": self.options["curaengine_grpc_definitions"].shared = True - if self.conf.get("user.curaengine:sentry_url", "", check_type = str) != "": + if self.conf.get("user.curaengine:sentry_url", "", check_type=str) != "": self.options["curaengine"].enable_sentry = True def validate(self): - version = self.conf.get("user.cura:version", default = self.version, check_type = str) + version = self.conf.get("user.cura:version", default=self.version, check_type=str) if version and Version(version) <= Version("4"): raise ConanInvalidConfiguration("Only versions 5+ are support") @@ -340,7 +347,7 @@ class CuraConan(ConanFile): def build_requirements(self): if self.options.get_safe("enable_i18n", False): - self.tool_requires("gettext/0.21", force_host_context = True) + self.tool_requires("gettext/0.21", force_host_context=True) def layout(self): self.folders.source = "." @@ -349,11 +356,12 @@ class CuraConan(ConanFile): self.cpp.package.libdirs = [os.path.join("site-packages", "cura")] self.cpp.package.bindirs = ["bin"] - self.cpp.package.resdirs = ["resources", "plugins", "packaging", "pip_requirements"] # pip_requirements should be the last item in the list + self.cpp.package.resdirs = ["resources", "plugins", "packaging", + "pip_requirements"] # pip_requirements should be the last item in the list def generate(self): copy(self, "cura_app.py", self.source_folder, str(self._script_dir)) - cura_run_envvars = self._cura_run_env.vars(self, scope = "run") + cura_run_envvars = self._cura_run_env.vars(self, scope="run") ext = ".ps1" if self.settings.os == "Windows" else ".sh" cura_run_envvars.save_script(os.path.join(self.folders.generators, f"cura_run_environment{ext}")) @@ -365,30 +373,32 @@ class CuraConan(ConanFile): if not self.in_local_cache: # Copy CuraEngine.exe to bindirs of Virtual Python Environment curaengine = self.dependencies["curaengine"].cpp_info - copy(self, "CuraEngine.exe", curaengine.bindirs[0], self.source_folder, keep_path = False) - copy(self, "CuraEngine", curaengine.bindirs[0], self.source_folder, keep_path = False) + copy(self, "CuraEngine.exe", curaengine.bindirs[0], self.source_folder, keep_path=False) + copy(self, "CuraEngine", curaengine.bindirs[0], self.source_folder, keep_path=False) # Copy the external plugins that we want to bundle with Cura - rmdir(self,str(self.source_path.joinpath("plugins", "CuraEngineGradualFlow"))) + rmdir(self, str(self.source_path.joinpath("plugins", "CuraEngineGradualFlow"))) curaengine_plugin_gradual_flow = self.dependencies["curaengine_plugin_gradual_flow"].cpp_info - copy(self, "*", curaengine_plugin_gradual_flow.resdirs[0], str(self.source_path.joinpath("plugins", "CuraEngineGradualFlow")), keep_path = True) - copy(self, "*", curaengine_plugin_gradual_flow.bindirs[0], self.source_folder, keep_path = False) - copy(self, "bundled_*.json", curaengine_plugin_gradual_flow.resdirs[1], str(self.source_path.joinpath("resources", "bundled_packages")), keep_path = False) + copy(self, "*", curaengine_plugin_gradual_flow.resdirs[0], + str(self.source_path.joinpath("plugins", "CuraEngineGradualFlow")), keep_path=True) + copy(self, "*", curaengine_plugin_gradual_flow.bindirs[0], self.source_folder, keep_path=False) + copy(self, "bundled_*.json", curaengine_plugin_gradual_flow.resdirs[1], + str(self.source_path.joinpath("resources", "bundled_packages")), keep_path=False) # Copy resources of cura_binary_data cura_binary_data = self.dependencies["cura_binary_data"].cpp_info - copy(self, "*", cura_binary_data.resdirs[0], str(self._share_dir.joinpath("cura")), keep_path = True) - copy(self, "*", cura_binary_data.resdirs[1], str(self._share_dir.joinpath("uranium")), keep_path = True) + copy(self, "*", cura_binary_data.resdirs[0], str(self._share_dir.joinpath("cura")), keep_path=True) + copy(self, "*", cura_binary_data.resdirs[1], str(self._share_dir.joinpath("uranium")), keep_path=True) if self.settings.os == "Windows": - copy(self, "*", cura_binary_data.resdirs[2], str(self._share_dir.joinpath("windows")), keep_path = True) + copy(self, "*", cura_binary_data.resdirs[2], str(self._share_dir.joinpath("windows")), keep_path=True) for dependency in self.dependencies.host.values(): for bindir in dependency.cpp_info.bindirs: - copy(self, "*.dll", bindir, str(self._site_packages), keep_path = False) + copy(self, "*.dll", bindir, str(self._site_packages), keep_path=False) for libdir in dependency.cpp_info.libdirs: - copy(self, "*.pyd", libdir, str(self._site_packages), keep_path = False) - copy(self, "*.pyi", libdir, str(self._site_packages), keep_path = False) - copy(self, "*.dylib", libdir, str(self._base_dir.joinpath("lib")), keep_path = False) + copy(self, "*.pyd", libdir, str(self._site_packages), keep_path=False) + copy(self, "*.pyi", libdir, str(self._site_packages), keep_path=False) + copy(self, "*.dylib", libdir, str(self._base_dir.joinpath("lib")), keep_path=False) # Copy materials (flat) rmdir(self, os.path.join(self.source_folder, "resources", "materials")) @@ -401,7 +411,8 @@ class CuraConan(ConanFile): copy(self, "*", cura_private_data.resdirs[0], str(self._share_dir.joinpath("cura"))) if self.options.devtools: - entitlements_file = "'{}'".format(os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements")) + entitlements_file = "'{}'".format( + os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements")) self._generate_pyinstaller_spec( location=self.generators_folder, entrypoint_location="'{}'".format( @@ -430,64 +441,87 @@ class CuraConan(ConanFile): mo_file = mo_file.parent.joinpath("LC_MESSAGES", mo_file.name) mkdir(self, str(unix_path(self, Path(mo_file).parent))) cpp_info = self.dependencies["gettext"].cpp_info - self.run(f"{cpp_info.bindirs[0]}/msgfmt {po_file} -o {mo_file} -f", env="conanbuild", ignore_errors=True) + self.run(f"{cpp_info.bindirs[0]}/msgfmt {po_file} -o {mo_file} -f", env="conanbuild", + ignore_errors=True) def deploy(self): - copy(self, "*", os.path.join(self.package_folder, self.cpp.package.resdirs[2]), os.path.join(self.install_folder, "packaging"), keep_path = True) + copy(self, "*", os.path.join(self.package_folder, self.cpp.package.resdirs[2]), + os.path.join(self.install_folder, "packaging"), keep_path=True) # Copy resources of Cura (keep folder structure) needed by pyinstaller to determine the module structure - copy(self, "*", os.path.join(self.package_folder, self.cpp_info.bindirs[0]), str(self._base_dir), keep_path = False) - copy(self, "*", os.path.join(self.package_folder, self.cpp_info.libdirs[0]), str(self._site_packages.joinpath("cura")), keep_path = True) - copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[0]), str(self._share_dir.joinpath("cura", "resources")), keep_path = True) - copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[1]), str(self._share_dir.joinpath("cura", "plugins")), keep_path = True) + copy(self, "*", os.path.join(self.package_folder, self.cpp_info.bindirs[0]), str(self._base_dir), + keep_path=False) + copy(self, "*", os.path.join(self.package_folder, self.cpp_info.libdirs[0]), + str(self._site_packages.joinpath("cura")), keep_path=True) + copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[0]), + str(self._share_dir.joinpath("cura", "resources")), keep_path=True) + copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[1]), + str(self._share_dir.joinpath("cura", "plugins")), keep_path=True) # Copy resources of Uranium (keep folder structure) uranium = self.dependencies["uranium"].cpp_info - copy(self, "*", uranium.resdirs[0], str(self._share_dir.joinpath("uranium", "resources")), keep_path = True) - copy(self, "*", uranium.resdirs[1], str(self._share_dir.joinpath("uranium", "plugins")), keep_path = True) - copy(self, "*", uranium.libdirs[0], str(self._site_packages.joinpath("UM")), keep_path = True) + copy(self, "*", uranium.resdirs[0], str(self._share_dir.joinpath("uranium", "resources")), keep_path=True) + copy(self, "*", uranium.resdirs[1], str(self._share_dir.joinpath("uranium", "plugins")), keep_path=True) + copy(self, "*", uranium.libdirs[0], str(self._site_packages.joinpath("UM")), keep_path=True) # Generate the GitHub Action version info Environment - version = self.conf.get("user.cura:version", default = self.version, check_type = str) + version = self.conf.get("user.cura:version", default=self.version, check_type=str) cura_version = Version(version) env_prefix = "Env:" if self.settings.os == "Windows" else "" - activate_github_actions_version_env = Template(r"""echo "CURA_VERSION_MAJOR={{ cura_version_major }}" >> ${{ env_prefix }}GITHUB_ENV + activate_github_actions_version_env = (Template(r"""echo "CURA_VERSION_MAJOR={{ cura_version_major }}" >> ${{ env_prefix }}GITHUB_ENV echo "CURA_VERSION_MINOR={{ cura_version_minor }}" >> ${{ env_prefix }}GITHUB_ENV echo "CURA_VERSION_PATCH={{ cura_version_patch }}" >> ${{ env_prefix }}GITHUB_ENV echo "CURA_VERSION_BUILD={{ cura_version_build }}" >> ${{ env_prefix }}GITHUB_ENV echo "CURA_VERSION_FULL={{ cura_version_full }}" >> ${{ env_prefix }}GITHUB_ENV -echo "CURA_APP_NAME={{ cura_app_name }}" >> ${{ env_prefix }}GITHUB_ENV - """).render(cura_version_major = cura_version.major, - cura_version_minor = cura_version.minor, - cura_version_patch = cura_version.patch, - cura_version_build = cura_version.build if cura_version.build != "" else "0", - cura_version_full = self.version, - cura_app_name = self._app_name, - env_prefix = env_prefix) +echo "CURA_APP_NAME={{ cura_app_name }}" >> ${{ env_prefix }}GITHUB_ENV""") + .render( + cura_version_major=cura_version.major, + cura_version_minor=cura_version.minor, + cura_version_patch=cura_version.patch, + cura_version_build=cura_version.build if cura_version.build != "" else "0", + cura_version_full=self.version, + cura_app_name=self._app_name, + env_prefix=env_prefix, + ) + ) ext = ".sh" if self.settings.os != "Windows" else ".ps1" - save(self, os.path.join(self._script_dir, f"activate_github_actions_version_env{ext}"), activate_github_actions_version_env) + save(self, os.path.join(self._script_dir, f"activate_github_actions_version_env{ext}"), + activate_github_actions_version_env) self._generate_cura_version(os.path.join(self._site_packages, "cura")) entitlements_file = "'{}'".format(Path(self.cpp_info.res_paths[2], "MacOS", "cura.entitlements")) - self._generate_pyinstaller_spec(location = self._base_dir, - entrypoint_location = "'{}'".format(os.path.join(self.package_folder, self.cpp_info.bindirs[0], self.conan_data["pyinstaller"]["runinfo"]["entrypoint"])).replace("\\", "\\\\"), - icon_path = "'{}'".format(os.path.join(self.package_folder, self.cpp_info.resdirs[2], self.conan_data["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"), - entitlements_file = entitlements_file if self.settings.os == "Macos" else "None") + self._generate_pyinstaller_spec(location=self._base_dir, + entrypoint_location="'{}'".format( + os.path.join(self.package_folder, self.cpp_info.bindirs[0], + self.conan_data["pyinstaller"]["runinfo"][ + "entrypoint"])).replace("\\", "\\\\"), + icon_path="'{}'".format( + os.path.join(self.package_folder, self.cpp_info.resdirs[2], + self.conan_data["pyinstaller"]["icon"][ + str(self.settings.os)])).replace("\\", "\\\\"), + entitlements_file=entitlements_file if self.settings.os == "Macos" else "None") def package(self): - copy(self, "cura_app.py", src = self.source_folder, dst = os.path.join(self.package_folder, self.cpp.package.bindirs[0])) - copy(self, "*", src = os.path.join(self.source_folder, "cura"), dst = os.path.join(self.package_folder, self.cpp.package.libdirs[0])) - copy(self, "*", src = os.path.join(self.source_folder, "resources"), dst = os.path.join(self.package_folder, self.cpp.package.resdirs[0])) + copy(self, "cura_app.py", src=self.source_folder, + dst=os.path.join(self.package_folder, self.cpp.package.bindirs[0])) + copy(self, "*", src=os.path.join(self.source_folder, "cura"), + dst=os.path.join(self.package_folder, self.cpp.package.libdirs[0])) + copy(self, "*", src=os.path.join(self.source_folder, "resources"), + dst=os.path.join(self.package_folder, self.cpp.package.resdirs[0])) copy(self, "*.mo", os.path.join(self.build_folder, "resources"), os.path.join(self.package_folder, "resources")) - copy(self, "*", src = os.path.join(self.source_folder, "plugins"), dst = os.path.join(self.package_folder, self.cpp.package.resdirs[1])) - copy(self, "requirement*.txt", src = self.source_folder, dst = os.path.join(self.package_folder, self.cpp.package.resdirs[-1])) - copy(self, "*", src = os.path.join(self.source_folder, "packaging"), dst = os.path.join(self.package_folder, self.cpp.package.resdirs[2])) + copy(self, "*", src=os.path.join(self.source_folder, "plugins"), + dst=os.path.join(self.package_folder, self.cpp.package.resdirs[1])) + copy(self, "requirement*.txt", src=self.source_folder, + dst=os.path.join(self.package_folder, self.cpp.package.resdirs[-1])) + copy(self, "*", src=os.path.join(self.source_folder, "packaging"), + dst=os.path.join(self.package_folder, self.cpp.package.resdirs[2])) # Remove the CuraEngineGradualFlow plugin from the package rmdir(self, os.path.join(self.package_folder, self.cpp.package.resdirs[1], "CuraEngineGradualFlow")) - rm(self, "bundled_*.json", os.path.join(self.package_folder, self.cpp.package.resdirs[0], "bundled_packages"), recursive = False) + rm(self, "bundled_*.json", os.path.join(self.package_folder, self.cpp.package.resdirs[0], "bundled_packages"), + recursive=False) # Remove the fdm_materials from the package rmdir(self, os.path.join(self.package_folder, self.cpp.package.resdirs[0], "materials")) From d93d66dd8adad41fb693b8c6e135caf44f92cd5f Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 30 Nov 2023 13:45:21 +0100 Subject: [PATCH 07/39] Use sentry cura engine version CURA-11364 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 6bae617e3a..3706604205 100644 --- a/conanfile.py +++ b/conanfile.py @@ -332,7 +332,7 @@ class CuraConan(ConanFile): self.requires("zlib/1.2.13") self.requires("pyarcus/5.3.0") self.requires("dulcificum/0.1.0-beta.1") - self.requires("curaengine/(latest)@ultimaker/testing") + self.requires("curaengine/latest@ultimaker/cura_11364") self.requires("pysavitar/5.3.0") self.requires("pynest2d/5.3.0") self.requires("curaengine_plugin_gradual_flow/0.1.0") From ba9e122f6add419824e6fc03d55df40766d4e71d Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 4 Dec 2023 11:45:12 +0100 Subject: [PATCH 08/39] unpin dulcificum --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 53d1c9799d..03648f66d8 100644 --- a/conanfile.py +++ b/conanfile.py @@ -324,7 +324,7 @@ class CuraConan(ConanFile): self.requires("curaengine_grpc_definitions/0.1.0") self.requires("zlib/1.2.13") self.requires("pyarcus/5.3.0") - self.requires("dulcificum/0.1.0-beta.1") + self.requires("dulcificum/(latest)@ultimaker/testing") self.requires("curaengine/(latest)@ultimaker/testing") self.requires("pysavitar/5.3.0") self.requires("pynest2d/5.3.0") From 89be765841bf453d6ee02ef8490a29dd02995072 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 4 Dec 2023 13:48:05 +0100 Subject: [PATCH 09/39] Revert "unpin dulcificum" This reverts commit ba9e122f6add419824e6fc03d55df40766d4e71d. --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 03648f66d8..53d1c9799d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -324,7 +324,7 @@ class CuraConan(ConanFile): self.requires("curaengine_grpc_definitions/0.1.0") self.requires("zlib/1.2.13") self.requires("pyarcus/5.3.0") - self.requires("dulcificum/(latest)@ultimaker/testing") + self.requires("dulcificum/0.1.0-beta.1") self.requires("curaengine/(latest)@ultimaker/testing") self.requires("pysavitar/5.3.0") self.requires("pynest2d/5.3.0") From 58c174ff6884b2054f3f19faa1602dfd48c35694 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 4 Dec 2023 13:49:02 +0100 Subject: [PATCH 10/39] pin dulcificum to `0.1.0-beta.2` --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 53d1c9799d..4a5201edb7 100644 --- a/conanfile.py +++ b/conanfile.py @@ -324,7 +324,7 @@ class CuraConan(ConanFile): self.requires("curaengine_grpc_definitions/0.1.0") self.requires("zlib/1.2.13") self.requires("pyarcus/5.3.0") - self.requires("dulcificum/0.1.0-beta.1") + self.requires("dulcificum/0.1.0-beta.2") self.requires("curaengine/(latest)@ultimaker/testing") self.requires("pysavitar/5.3.0") self.requires("pynest2d/5.3.0") From 20ab319ec07c501a017b6cf6e6d73350d029f638 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 4 Dec 2023 16:31:50 +0100 Subject: [PATCH 11/39] Use default values from cura-workflows Contributes to CURA-10831 --- .github/workflows/installers.yml | 50 ++++---------------------------- 1 file changed, 6 insertions(+), 44 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index b3ea88969c..aa1f5a49f0 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -39,53 +39,15 @@ env: CONAN_ARGS: ${{ inputs.conan_args || '' }} ENTERPRISE: ${{ inputs.enterprise || false }} STAGING: ${{ inputs.staging || false }} - LATEST_RELEASE: '5.6' - LATEST_RELEASE_SCHEDULE_HOUR: 4 jobs: default_values: - runs-on: ubuntu-latest - outputs: - cura_conan_version: ${{ steps.default.outputs.cura_conan_version }} - release_tag: ${{ steps.default.outputs.release_tag }} - - steps: - - name: Output default values - id: default - shell: python - run: | - import os - import datetime - - if "${{ github.event_name }}" != "schedule": - cura_conan_version = "${{ github.event.inputs.cura_conan_version }}" - else: - now = datetime.datetime.now() - cura_conan_version = "cura/latest@ultimaker/stable" if now.hour == int(os.environ['LATEST_RELEASE_SCHEDULE_HOUR']) else "cura/latest@ultimaker/testing" - - release_tag = f"nightly-{os.environ['LATEST_RELEASE']}" if "/stable" in cura_conan_version else "nightly" - - # Set cura_conan_version environment variable - output_env = os.environ["GITHUB_OUTPUT"] - content = "" - if os.path.exists(output_env): - with open(output_env, "r") as f: - content = f.read() - with open(output_env, "w") as f: - f.write(content) - f.writelines(f"cura_conan_version={cura_conan_version}\n") - f.writelines(f"release_tag={release_tag}\n") - - summary_env = os.environ["GITHUB_STEP_SUMMARY"] - content = "" - if os.path.exists(summary_env): - with open(summary_env, "r") as f: - content = f.read() - - with open(summary_env, "w") as f: - f.write(content) - f.writelines(f"# cura_conan_version = {cura_conan_version}\n") - f.writelines(f"# release_tag = {release_tag}\n") + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-default-value.yml@CURA-10831 + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + latest_release: '5.6' + latest_release_schedule_hour: 4 + latest_release_tag: 'nightly' # FIXME: point to `main` once merged windows-installer: From 040f85c9560951f35994109d62b89c597604bc23 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 4 Dec 2023 17:36:32 +0100 Subject: [PATCH 12/39] Remove redundant export workflow Contributes to CURA-10831 --- .github/workflows/conan-recipe-export.yml | 110 ---------------------- 1 file changed, 110 deletions(-) delete mode 100644 .github/workflows/conan-recipe-export.yml diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml deleted file mode 100644 index 69c4e4d34a..0000000000 --- a/.github/workflows/conan-recipe-export.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: Export Conan Recipe to server - -on: - workflow_call: - inputs: - recipe_id_full: - required: true - type: string - - recipe_id_latest: - required: false - type: string - - runs_on: - required: true - type: string - - python_version: - required: true - type: string - - conan_config_branch: - required: false - type: string - - conan_logging_level: - required: false - type: string - - conan_export_binaries: - required: false - type: boolean - - conan_upload_community: - required: false - default: true - type: boolean - -env: - CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }} - CONAN_PASSWORD: ${{ secrets.CONAN_PASS }} - CONAN_LOG_RUN_TO_OUTPUT: 1 - CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }} - CONAN_NON_INTERACTIVE: 1 - -jobs: - package-export: - runs-on: ${{ inputs.runs_on }} - - steps: - - name: Checkout project - uses: actions/checkout@v3 - - - name: Setup Python and pip - uses: actions/setup-python@v4 - with: - python-version: ${{ inputs.python_version }} - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - - - name: Install Python requirements and Create default Conan profile - run: | - pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt - conan profile new default --detect - # Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo - - - name: Cache Conan local repository packages - uses: actions/cache@v3 - with: - path: $HOME/.conan/data - key: ${{ runner.os }}-conan-export-cache - - - name: Get Conan configuration from branch - if: ${{ inputs.conan_config_branch != '' }} - run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}" - - - name: Get Conan configuration - run: | - conan config install https://github.com/Ultimaker/conan-config.git - conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}" - - - name: Add Cura private Artifactory remote - run: conan remote add cura-private-conan-dev https://cura.jfrog.io/artifactory/api/conan/cura-private-conan-dev True - - - name: Set GH service account for remote cura-conan-dev - run: conan user -p ${{ secrets.CONAN_GH_RUNNER_PASS }} -r cura-private-conan-dev "${{ secrets.CONAN_GH_RUNNER_USER }}" - - - name: Export the Package (binaries) - if: ${{ inputs.conan_export_binaries }} - run: conan create . ${{ inputs.recipe_id_full }} --build=missing --update -c tools.build:skip_test=True - - - name: Export the Package - if: ${{ !inputs.conan_export_binaries }} - run: conan export . ${{ inputs.recipe_id_full }} - - - name: Create the latest alias - if: always() - run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} - - - name: Upload the Package(s) - if: ${{ always() && inputs.conan_upload_community }} - run: | - conan upload ${{ inputs.recipe_id_full }} -r cura --all -c - conan upload ${{ inputs.recipe_id_latest }} -r cura -c - - - name: Upload the Package(s) to the private Artifactory - if: ${{ always() && ! inputs.conan_upload_community }} - run: | - conan upload ${{ inputs.recipe_id_full }} -r cura-private-conan-dev --all -c - conan upload ${{ inputs.recipe_id_latest }} -r cura-private-conan-dev -c From 9ad993f8ca0a67ae17f59f2d8ea33eccd4eea9c5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 4 Dec 2023 18:06:20 +0100 Subject: [PATCH 13/39] Reinstate OS specific installer workflows For those that wants to build a OS specific installer Contributes to CURA-10831 --- .github/workflows/linux.yml | 58 +++++++++++++++++++++ .github/workflows/macos.yml | 62 +++++++++++++++++++++++ .github/workflows/requirements-runner.txt | 0 .github/workflows/windows.yml | 58 +++++++++++++++++++++ 4 files changed, 178 insertions(+) create mode 100644 .github/workflows/linux.yml create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/requirements-runner.txt create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000000..5e63b13c14 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,58 @@ +name: Linux installers +run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }} + +on: + workflow_dispatch: + inputs: + cura_conan_version: + description: 'Cura Conan Version' + default: 'cura/latest@ultimaker/testing' + required: true + type: string + conan_args: + description: 'Conan args: eq.: --require-override' + default: '' + required: false + type: string + enterprise: + description: 'Build Cura as an Enterprise edition' + default: false + required: true + type: boolean + staging: + description: 'Use staging API' + default: false + required: true + type: boolean + architecture: + description: 'Architecture' + required: true + default: 'X64' + type: choice + options: + - X64 + operating_system: + description: 'OS' + required: true + default: 'ubuntu-22.04' + type: choice + options: + - ubuntu-22.04 + +env: + CONAN_ARGS: ${{ inputs.conan_args || '' }} + ENTERPRISE: ${{ inputs.enterprise || false }} + STAGING: ${{ inputs.staging || false }} + +jobs: + # FIXME: point to `main` once merged + windows-installer: + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-linux.yml@CURA-10831 + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise == 'true' }} + staging: ${{ inputs.staging == 'true' }} + architecture: ${{ inputs.architecture }} + operating_system: ${{ inputs.operating_system }} + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000000..42b719f1ca --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,62 @@ +name: MacOS installers +run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }} + +on: + workflow_dispatch: + inputs: + cura_conan_version: + description: 'Cura Conan Version' + default: 'cura/latest@ultimaker/testing' + required: true + type: string + conan_args: + description: 'Conan args: eq.: --require-override' + default: '' + required: false + type: string + enterprise: + description: 'Build Cura as an Enterprise edition' + default: false + required: true + type: boolean + staging: + description: 'Use staging API' + default: false + required: true + type: boolean + architecture: + description: 'Architecture' + required: true + default: 'ARM64' + type: choice + options: + - X64 + - ARM64 + operating_system: + description: 'OS' + required: true + default: 'self-hosted-ARM64' + type: choice + options: + - self-hosted-X64 + - self-hosted-ARM64 + - macos-11 + - macos-12 + +env: + CONAN_ARGS: ${{ inputs.conan_args || '' }} + ENTERPRISE: ${{ inputs.enterprise || false }} + STAGING: ${{ inputs.staging || false }} + +jobs: + # FIXME: point to `main` once merged + windows-installer: + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-macos.yml@CURA-10831 + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise == 'true' }} + staging: ${{ inputs.staging == 'true' }} + architecture: ${{ inputs.architecture }} + operating_system: ${{ inputs.operating_system }} + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/requirements-runner.txt b/.github/workflows/requirements-runner.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000000..c60aeee51e --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,58 @@ +name: Windows installers +run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }} + +on: + workflow_dispatch: + inputs: + cura_conan_version: + description: 'Cura Conan Version' + default: 'cura/latest@ultimaker/testing' + required: true + type: string + conan_args: + description: 'Conan args: eq.: --require-override' + default: '' + required: false + type: string + enterprise: + description: 'Build Cura as an Enterprise edition' + default: false + required: true + type: boolean + staging: + description: 'Use staging API' + default: false + required: true + type: boolean + architecture: + description: 'Architecture' + required: true + default: 'X64' + type: choice + options: + - X64 + operating_system: + description: 'OS' + required: true + default: 'windows-2022' + type: choice + options: + - windows-2022 + +env: + CONAN_ARGS: ${{ inputs.conan_args || '' }} + ENTERPRISE: ${{ inputs.enterprise || false }} + STAGING: ${{ inputs.staging || false }} + +jobs: + # FIXME: point to `main` once merged + windows-installer: + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-windows.yml@CURA-10831 + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise == 'true' }} + staging: ${{ inputs.staging == 'true' }} + architecture: ${{ inputs.architecture }} + operating_system: ${{ inputs.operating_system }} + secrets: inherit \ No newline at end of file From b678951759ff3c804e5b0bbef6450d1c52574ce3 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 4 Dec 2023 18:15:50 +0100 Subject: [PATCH 14/39] Applied work-around for GH true/false instead of True/False Contributes to CURA-10831 --- conanfile.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/conanfile.py b/conanfile.py index de66f1d409..92d0e326d9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -34,7 +34,7 @@ class CuraConan(ConanFile): "cloud_api_version": "ANY", "display_name": "ANY", # TODO: should this be an option?? "cura_debug_mode": [True, False], # FIXME: Use profiles - "internal": [True, False], + "internal": ["True", "False", "true", "false"], # Workaround for GH Action passing boolean as lowercase string "enable_i18n": [True, False], } default_options = { @@ -44,7 +44,7 @@ class CuraConan(ConanFile): "cloud_api_version": "1", "display_name": "UltiMaker Cura", "cura_debug_mode": False, # Not yet implemented - "internal": False, + "internal": "False", "enable_i18n": False, } @@ -84,6 +84,10 @@ class CuraConan(ConanFile): def _enterprise(self): return self.options.enterprise in ["True", 'true'] + @property + def _internal(self): + return self.options.enterprise in ["True", 'true'] + @property def _app_name(self): if self._enterprise: @@ -182,7 +186,7 @@ class CuraConan(ConanFile): cura_version = Version(self.conf.get("user.cura:version", default = self.version, check_type = str)) pre_tag = f"-{cura_version.pre}" if cura_version.pre else "" build_tag = f"+{cura_version.build}" if cura_version.build else "" - internal_tag = f"+internal" if self.options.internal else "" + internal_tag = f"+internal" if self._internal else "" cura_version = f"{cura_version.major}.{cura_version.minor}.{cura_version.patch}{pre_tag}{build_tag}{internal_tag}" with open(os.path.join(location, "CuraVersion.py"), "w") as f: @@ -206,7 +210,7 @@ class CuraConan(ConanFile): pyinstaller_metadata = self.conan_data["pyinstaller"] datas = [] for data in pyinstaller_metadata["datas"].values(): - if not self.options.internal and data.get("internal", False): + if not self._internal and data.get("internal", False): continue if "package" in data: # get the paths from conan package @@ -319,10 +323,10 @@ class CuraConan(ConanFile): def requirements(self): for req in self.conan_data["requirements"]: - if self.options.internal and "fdm_materials" in req: + if self._internal and "fdm_materials" in req: continue self.requires(req) - if self.options.internal: + if self._internal: for req in self.conan_data["requirements_internal"]: if "fdm_materials" in req: continue @@ -392,7 +396,7 @@ class CuraConan(ConanFile): copy(self, "*", fdm_materials.resdirs[0], self.source_folder) # Copy internal resources - if self.options.internal: + if self._internal: cura_private_data = self.dependencies["cura_private_data"].cpp_info copy(self, "*", cura_private_data.resdirs[0], str(self._share_dir.joinpath("cura"))) From 260a73e14ceea38f4dd15fe4741240a4e25183fd Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 4 Dec 2023 19:51:11 +0100 Subject: [PATCH 15/39] Use older name for OS specific installer workflows Contributes to CURA-10831 --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5e63b13c14..535d087700 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,4 +1,4 @@ -name: Linux installers +name: Linux Installer run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }} on: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 42b719f1ca..02f45385e7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,4 +1,4 @@ -name: MacOS installers +name: MacOS Installer run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }} on: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c60aeee51e..ef7e986ec3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,4 +1,4 @@ -name: Windows installers +name: Windows Installer run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }} on: From ad96082a1611bae8528ff4bceee41640d5236888 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 05:03:59 +0100 Subject: [PATCH 16/39] Port unit-test to cura-workflows Contributes to CURA-10831 --- .github/workflows/unit-test.yml | 139 ++++---------------------------- 1 file changed, 16 insertions(+), 123 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 2f8f593199..ca585d54b6 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,4 +1,3 @@ ---- name: unit-test on: @@ -9,23 +8,18 @@ on: - 'cura/**' - 'icons/**' - 'tests/**' - - 'packaging/**' - - '.github/workflows/conan-*.yml' - '.github/workflows/unit-test.yml' - - '.github/workflows/notify.yml' - - '.github/workflows/requirements-conan-package.txt' + - '.github/workflows/requirements-runner.txt' - 'requirements*.txt' - 'conanfile.py' - 'conandata.yml' - - 'GitVersion.yml' - '*.jinja' branches: - main - 'CURA-*' - - '[1-9]+.[0-9]+' - tags: - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+-beta' + - 'PP-*' + - '[0-9]+.[0-9]+' + pull_request: paths: - 'plugins/**' @@ -33,35 +27,23 @@ on: - 'cura/**' - 'icons/**' - 'tests/**' - - 'packaging/**' - - '.github/workflows/conan-*.yml' - '.github/workflows/unit-test.yml' - - '.github/workflows/notify.yml' - - '.github/workflows/requirements-conan-package.txt' + - '.github/workflows/requirements-runner.txt' - 'requirements*.txt' - 'conanfile.py' - 'conandata.yml' - - 'GitVersion.yml' - '*.jinja' branches: - main - - '[1-9]+.[0-9]+' - tags: - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+-beta' - -env: - CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }} - CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }} - CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }} - CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }} - CONAN_LOG_RUN_TO_OUTPUT: 1 - CONAN_LOGGING_LEVEL: info - CONAN_NON_INTERACTIVE: 1 + - '[0-9]+.[0-9]+' permissions: contents: read +env: + CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }} + CONAN_PASSWORD: ${{ secrets.CONAN_PASS }} + jobs: conan-recipe-version: uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@CURA-10831 @@ -69,98 +51,9 @@ jobs: project_name: cura testing: - runs-on: ubuntu-22.04 - needs: [ conan-recipe-version ] - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Setup Python and pip - uses: actions/setup-python@v4 - with: - python-version: '3.11.x' - architecture: 'x64' - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - - - name: Install Python requirements and Create default Conan profile - run: pip install -r requirements-conan-package.txt - working-directory: .github/workflows/ - - - name: Use Conan download cache (Bash) - if: ${{ runner.os != 'Windows' }} - run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache" - - - name: Cache Conan local repository packages (Bash) - uses: actions/cache@v3 - if: ${{ runner.os != 'Windows' }} - with: - path: | - $HOME/.conan/data - $HOME/.conan/conan_download_cache - key: conan-${{ runner.os }}-${{ runner.arch }}-unit-cache - - # NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest. - # This is maybe because grub caches the disk it uses last time, which is recreated each time. - - name: Install Linux system requirements - if: ${{ runner.os == 'Linux' }} - run: | - sudo rm /var/cache/debconf/config.dat - sudo dpkg --configure -a - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - sudo apt update - sudo apt upgrade - sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y - - - name: Install GCC-13 - run: | - sudo apt install g++-13 gcc-13 -y - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13 - - - name: Get Conan configuration - run: | - conan config install https://github.com/Ultimaker/conan-config.git - conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}" - - - name: Get Conan profile - run: conan profile new default --detect --force - - - name: Install dependencies - run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o cura:devtools=True -g VirtualPythonEnv -if venv - - - name: Upload the Dependency package(s) - run: conan upload "*" -r cura --all -c - - - name: Set Environment variables for Cura (bash) - if: ${{ runner.os != 'Windows' }} - run: | - . ./venv/bin/activate_github_actions_env.sh - - - name: Run Unit Test - id: run-test - run: | - pytest --junitxml=junit_cura.xml - working-directory: tests - - - name: Save PR metadata - if: always() - run: | - echo ${{ github.event.number }} > pr-id.txt - echo ${{ github.event.pull_request.head.repo.full_name }} > pr-head-repo.txt - echo ${{ github.event.pull_request.head.ref }} > pr-head-ref.txt - working-directory: tests - - - name: Upload Test Results - if: always() - uses: actions/upload-artifact@v3 - with: - name: test-result - path: | - tests/**/*.xml - tests/pr-id.txt - tests/pr-head-repo.txt - tests/pr-head-ref.txt + uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@CURA-10831 + with: + recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} + conan_extra_args: '-o cura:devtools=True -c tools.build:skip_test=False' + unit_test_cmd: 'pytest --junitxml=junit_cura.xml' + unit_test_dir: 'tests' \ No newline at end of file From a69e4f1678c8832831b4adc8fb986c7f0ccf1f1c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 05:05:12 +0100 Subject: [PATCH 17/39] set needs for testing job Contributes to CURA-10831 --- .github/workflows/unit-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index ca585d54b6..3083c8f11b 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -52,6 +52,7 @@ jobs: testing: uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@CURA-10831 + needs: [ conan-recipe-version ] with: recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} conan_extra_args: '-o cura:devtools=True -c tools.build:skip_test=False' From 6140d5ad145fb29a39f1ed0f7bb3f5e6468d1256 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 05:06:40 +0100 Subject: [PATCH 18/39] only run on main/release and PR's Contributes to CURA-10831 --- .github/workflows/unit-test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 3083c8f11b..d7e8543abe 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -16,8 +16,6 @@ on: - '*.jinja' branches: - main - - 'CURA-*' - - 'PP-*' - '[0-9]+.[0-9]+' pull_request: From a2eb1dc085aa4f92e8487bc2cf9da3e2bfd0f55c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 05:30:57 +0100 Subject: [PATCH 19/39] Activate all activate_github_action envs Contributes to CURA-10831 --- .github/workflows/unit-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index d7e8543abe..484490f5ed 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -55,4 +55,5 @@ jobs: recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} conan_extra_args: '-o cura:devtools=True -c tools.build:skip_test=False' unit_test_cmd: 'pytest --junitxml=junit_cura.xml' - unit_test_dir: 'tests' \ No newline at end of file + unit_test_dir: 'tests' + conan_generator_dir: './venv/bin' \ No newline at end of file From 3dcf208d73f257b2875bc519ebb8d6dcdd715599 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 05:31:51 +0100 Subject: [PATCH 20/39] Revert "only run on main/release and PR's" This reverts commit 6140d5ad145fb29a39f1ed0f7bb3f5e6468d1256. --- .github/workflows/unit-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 484490f5ed..2312340a11 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -16,6 +16,8 @@ on: - '*.jinja' branches: - main + - 'CURA-*' + - 'PP-*' - '[0-9]+.[0-9]+' pull_request: From e688a3a9df0f5b48a1373042bcd82c502e7a8869 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 05:51:48 +0100 Subject: [PATCH 21/39] use relative location of pytest Somehow pytest can't be found on the PATH Contributes to CURA-10831 --- .github/workflows/unit-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 2312340a11..d8716c9dac 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -56,6 +56,6 @@ jobs: with: recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} conan_extra_args: '-o cura:devtools=True -c tools.build:skip_test=False' - unit_test_cmd: 'pytest --junitxml=junit_cura.xml' + unit_test_cmd: '../venv/bin/pytest --junitxml=junit_cura.xml' unit_test_dir: 'tests' conan_generator_dir: './venv/bin' \ No newline at end of file From 86493b9c4d19a157907cb4bd08c63f039c184875 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 06:05:21 +0100 Subject: [PATCH 22/39] Use VirtualPythonEnv generator Contributes to CURA-10831 --- .github/workflows/unit-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index d8716c9dac..714cf9d6af 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -55,7 +55,7 @@ jobs: needs: [ conan-recipe-version ] with: recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - conan_extra_args: '-o cura:devtools=True -c tools.build:skip_test=False' - unit_test_cmd: '../venv/bin/pytest --junitxml=junit_cura.xml' + conan_extra_args: '-g VirtualPythonEnv -o cura:devtools=True -c tools.build:skip_test=False' + unit_test_cmd: 'pytest --junitxml=junit_cura.xml' unit_test_dir: 'tests' conan_generator_dir: './venv/bin' \ No newline at end of file From f5354c058f90ff7079876dd2693680c727ced7c9 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 07:08:36 +0100 Subject: [PATCH 23/39] Add FIXME reminders Contributes to CURA-10831 --- .github/workflows/unit-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 714cf9d6af..6369e7e395 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -45,12 +45,14 @@ env: CONAN_PASSWORD: ${{ secrets.CONAN_PASS }} jobs: + # FIXME: Change to `main` instead of `CURA-10831` once merged conan-recipe-version: uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@CURA-10831 with: project_name: cura testing: + # FIXME: Change to `main` instead of `CURA-10831` once merged uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@CURA-10831 needs: [ conan-recipe-version ] with: From 1334b65bdfca7bb23e7c95c446f9ad3746fb0e7c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 07:17:21 +0100 Subject: [PATCH 24/39] Post the unit test result on PR's Contributes to CURA-10831 --- .github/workflows/unit-test-post.yml | 85 +++------------------------- 1 file changed, 8 insertions(+), 77 deletions(-) diff --git a/.github/workflows/unit-test-post.yml b/.github/workflows/unit-test-post.yml index 36c1d5acfd..119ca30f33 100644 --- a/.github/workflows/unit-test-post.yml +++ b/.github/workflows/unit-test-post.yml @@ -1,82 +1,13 @@ name: unit-test-post on: - workflow_run: - workflows: [ "unit-test" ] - types: [ completed ] + workflow_run: + workflows: [ "unit-test" ] + types: [ completed ] jobs: - publish-test-results: - if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - steps: - - name: Download analysis results - uses: actions/github-script@v3.1.0 - with: - script: | - let artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - let matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "test-result" - })[0]; - let download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: "zip", - }); - let fs = require("fs"); - fs.writeFileSync("${{github.workspace}}/test-result.zip", Buffer.from(download.data)); - - - name: Set environment variables - run: | - mkdir pr_env - unzip test-result.zip -d pr_env - echo "pr_id=$(cat pr_env/pr-id.txt)" >> $GITHUB_ENV - echo "pr_head_repo=$(cat pr_env/pr-head-repo.txt)" >> $GITHUB_ENV - echo "pr_head_ref=$(cat pr_env/pr-head-ref.txt)" >> $GITHUB_ENV - - - uses: actions/checkout@v3 - with: - repository: ${{ env.pr_head_repo }} - ref: ${{ env.pr_head_ref }} - persist-credentials: false - - - name: Redownload analysis results - uses: actions/github-script@v3.1.0 - with: - script: | - let artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - let matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "test-result" - })[0]; - let download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: "zip", - }); - let fs = require("fs"); - fs.writeFileSync("${{github.workspace}}/test-result.zip", Buffer.from(download.data)); - - - name: Extract analysis results - run: | - mkdir -p tests - unzip test-result.zip -d tests - - - name: Publish Unit Test Results - id: test-results - uses: EnricoMi/publish-unit-test-result-action@v1 - with: - files: "tests/**/*.xml" - - - name: Conclusion - run: echo "Conclusion is ${{ steps.test-results.outputs.json && fromJSON( steps.test-results.outputs.json ).conclusion }}" + publish-test-results: + uses: ultimaker/cura-workflows/.github/workflows/unit-test-post.yml@CURA-10831 + with: + event: ${{ github.event.workflow_run.event }} + conclusion: ${{ github.event.workflow_run.conclusion }} From b8d41abdeea2d69187ed85eb455f0e384a167d04 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 07:18:57 +0100 Subject: [PATCH 25/39] Add FIXME reminder Contributes to CURA-10831 --- .github/workflows/unit-test-post.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-test-post.yml b/.github/workflows/unit-test-post.yml index 119ca30f33..b4ca2ee699 100644 --- a/.github/workflows/unit-test-post.yml +++ b/.github/workflows/unit-test-post.yml @@ -6,6 +6,7 @@ on: types: [ completed ] jobs: + # FIXME: Use `main` instead of `CURA-10831` once merged publish-test-results: uses: ultimaker/cura-workflows/.github/workflows/unit-test-post.yml@CURA-10831 with: From 8aa6d2c5b6a2fe645a400fd495394ce475ac7d3f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 07:44:04 +0100 Subject: [PATCH 26/39] Update conan_data with actual version Contributes to CURA-10831 --- conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 92d0e326d9..f1d73352aa 100644 --- a/conanfile.py +++ b/conanfile.py @@ -4,7 +4,7 @@ from pathlib import Path from jinja2 import Template from conan import ConanFile -from conan.tools.files import copy, rmdir, save, mkdir, rm +from conan.tools.files import copy, rmdir, save, mkdir, rm, update_conandata from conan.tools.microsoft import unix_path from conan.tools.env import VirtualRunEnv, Environment, VirtualBuildEnv from conan.tools.scm import Version @@ -289,6 +289,9 @@ class CuraConan(ConanFile): short_version = f"'{cura_version.major}.{cura_version.minor}.{cura_version.patch}'", )) + def export(self): + update_conandata(self, {"version": self.version}) + def export_sources(self): copy(self, "*", os.path.join(self.recipe_folder, "plugins"), os.path.join(self.export_sources_folder, "plugins")) copy(self, "*", os.path.join(self.recipe_folder, "resources"), os.path.join(self.export_sources_folder, "resources"), excludes = "*.mo") From 704f1280043423489832e9ee5280be8ab750208b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 5 Dec 2023 10:15:51 +0100 Subject: [PATCH 27/39] Use CURA-10831 working packages for deps Contributes to CURA-10831 --- conandata.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conandata.yml b/conandata.yml index 52f15cb3f3..0eec369c96 100644 --- a/conandata.yml +++ b/conandata.yml @@ -4,12 +4,12 @@ requirements: - "curaengine/(latest)@ultimaker/cura_10831" - "cura_binary_data/(latest)@ultimaker/cura_10831" - "fdm_materials/(latest)@ultimaker/cura_10831" - - "curaengine_plugin_gradual_flow/0.1.0" - - "dulcificum/latest@ultimaker/stable" + - "curaengine_plugin_gradual_flow/(latest)@ultimaker/cura_10831" + - "dulcificum/(latest)@ultimaker/cura_10831" - "pyarcus/5.3.0" - "pysavitar/5.3.0" - "pynest2d/5.3.0" - - "curaengine_grpc_definitions/0.1.0" + - "curaengine_grpc_definitions/(latest)@ultimaker/cura_10831" requirements_internal: - "fdm_materials/(latest)@internal/cura_10831" - "cura_private_data/(latest)@internal/cura_10831" From 68818a525d966e0260571e2a9cae0ae5d36d6afe Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 5 Dec 2023 13:53:30 +0100 Subject: [PATCH 28/39] Use absolute transform coordinates instead of relative CURA-11279 --- cura/Arranging/GridArrange.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cura/Arranging/GridArrange.py b/cura/Arranging/GridArrange.py index f3c5f3a1a9..be6b36cc5a 100644 --- a/cura/Arranging/GridArrange.py +++ b/cura/Arranging/GridArrange.py @@ -242,13 +242,9 @@ class GridArrange(Arranger): center_grid_y = coord_grid_y + (0.5 * self._grid_height) bounding_box = node.getBoundingBox() - center_node_x = (bounding_box.left + bounding_box.right) * 0.5 - center_node_y = (bounding_box.back + bounding_box.front) * 0.5 + center_node_z = bounding_box.height / 2 - delta_x = center_grid_x - center_node_x - delta_y = center_grid_y - center_node_y - - return TranslateOperation(node, Vector(delta_x, 0, delta_y)) + return TranslateOperation(node, Vector(center_grid_x, center_node_z, center_grid_y), True) def _getGridCornerPoints( self, From 9a108dc7205cda8983faafe6576c055f0b613e66 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 5 Dec 2023 14:41:15 +0100 Subject: [PATCH 29/39] Set explicit parameter name Co-authored-by: Casper Lamboo --- cura/Arranging/GridArrange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Arranging/GridArrange.py b/cura/Arranging/GridArrange.py index be6b36cc5a..c30b5c897f 100644 --- a/cura/Arranging/GridArrange.py +++ b/cura/Arranging/GridArrange.py @@ -244,7 +244,7 @@ class GridArrange(Arranger): bounding_box = node.getBoundingBox() center_node_z = bounding_box.height / 2 - return TranslateOperation(node, Vector(center_grid_x, center_node_z, center_grid_y), True) + return TranslateOperation(node, Vector(center_grid_x, center_node_z, center_grid_y), set_position = True) def _getGridCornerPoints( self, From 0353037b31cfd715bc01193ca676f871d2373515 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 6 Dec 2023 11:36:54 +0100 Subject: [PATCH 30/39] Use `getWorldPosition` for `TranslateOperation` CURA-11279 --- cura/Arranging/GridArrange.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cura/Arranging/GridArrange.py b/cura/Arranging/GridArrange.py index c30b5c897f..13778e9de9 100644 --- a/cura/Arranging/GridArrange.py +++ b/cura/Arranging/GridArrange.py @@ -241,10 +241,8 @@ class GridArrange(Arranger): center_grid_x = coord_grid_x + (0.5 * self._grid_width) center_grid_y = coord_grid_y + (0.5 * self._grid_height) - bounding_box = node.getBoundingBox() - center_node_z = bounding_box.height / 2 - - return TranslateOperation(node, Vector(center_grid_x, center_node_z, center_grid_y), set_position = True) + return TranslateOperation(node, Vector(center_grid_x, node.getWorldPosition().y, center_grid_y), + set_position=True) def _getGridCornerPoints( self, From 920809f064d39f2426312428a02c7db0b3c4410d Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 6 Dec 2023 11:40:34 +0100 Subject: [PATCH 31/39] Use absolute transformation to set location for arrange Using relative positioning proved to create issues; when spamming of arrange instructions it was possible to end up in the following time line 1: arrange action a is started 2: arrange action b is started 3: arrange action a finished computation, and applies transformations on the models 4: arrange action b finishes computation and applies relative transformations on top of the previous transformations By using absolute positioning this issue is resolved CURA-11279 --- cura/Arranging/Nest2DArrange.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cura/Arranging/Nest2DArrange.py b/cura/Arranging/Nest2DArrange.py index 968522d5a3..a67d04aa8c 100644 --- a/cura/Arranging/Nest2DArrange.py +++ b/cura/Arranging/Nest2DArrange.py @@ -14,7 +14,7 @@ from UM.Math.Quaternion import Quaternion from UM.Math.Vector import Vector from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation -from UM.Operations.RotateOperation import RotateOperation +from UM.Operations.SetTransformOperation import SetTransformOperation from UM.Operations.TranslateOperation import TranslateOperation from cura.Arranging.Arranger import Arranger @@ -140,13 +140,17 @@ class Nest2DArrange(Arranger): grouped_operation.addOperation(AddSceneNodeOperation(node, scene_root)) if node_item.binId() == 0: - # We found a spot for it rotation_matrix = Matrix() rotation_matrix.setByRotationAxis(node_item.rotation(), Vector(0, -1, 0)) - grouped_operation.addOperation(RotateOperation(node, Quaternion.fromMatrix(rotation_matrix))) + + orientation = node.getWorldOrientation() * Quaternion.fromMatrix(rotation_matrix) + translation = node.getWorldPosition().preMultiply(rotation_matrix) + Vector( + node_item.translation().x() / self._factor, + 0, + node_item.translation().y() / self._factor + ) grouped_operation.addOperation( - TranslateOperation(node, Vector(node_item.translation().x() / self._factor, 0, - node_item.translation().y() / self._factor))) + SetTransformOperation(node, orientation=orientation, translation=translation)) else: # We didn't find a spot grouped_operation.addOperation( From 237d1a899baa03da667b72a7cc5be395b65e2dc5 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 6 Dec 2023 12:10:34 +0100 Subject: [PATCH 32/39] Revert "Use absolute transformation to set location for arrange" This reverts commit 920809f064d39f2426312428a02c7db0b3c4410d. --- cura/Arranging/Nest2DArrange.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/cura/Arranging/Nest2DArrange.py b/cura/Arranging/Nest2DArrange.py index a67d04aa8c..968522d5a3 100644 --- a/cura/Arranging/Nest2DArrange.py +++ b/cura/Arranging/Nest2DArrange.py @@ -14,7 +14,7 @@ from UM.Math.Quaternion import Quaternion from UM.Math.Vector import Vector from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation -from UM.Operations.SetTransformOperation import SetTransformOperation +from UM.Operations.RotateOperation import RotateOperation from UM.Operations.TranslateOperation import TranslateOperation from cura.Arranging.Arranger import Arranger @@ -140,17 +140,13 @@ class Nest2DArrange(Arranger): grouped_operation.addOperation(AddSceneNodeOperation(node, scene_root)) if node_item.binId() == 0: + # We found a spot for it rotation_matrix = Matrix() rotation_matrix.setByRotationAxis(node_item.rotation(), Vector(0, -1, 0)) - - orientation = node.getWorldOrientation() * Quaternion.fromMatrix(rotation_matrix) - translation = node.getWorldPosition().preMultiply(rotation_matrix) + Vector( - node_item.translation().x() / self._factor, - 0, - node_item.translation().y() / self._factor - ) + grouped_operation.addOperation(RotateOperation(node, Quaternion.fromMatrix(rotation_matrix))) grouped_operation.addOperation( - SetTransformOperation(node, orientation=orientation, translation=translation)) + TranslateOperation(node, Vector(node_item.translation().x() / self._factor, 0, + node_item.translation().y() / self._factor))) else: # We didn't find a spot grouped_operation.addOperation( From f94198c1080fa15023020c7164ec7a3679aa0cbd Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 7 Dec 2023 14:41:44 +0100 Subject: [PATCH 33/39] Fix behaviour of internal property The attribute 'enterprise' in conanfile.py was incorrectly named and has been renamed to 'internal'. This revision ensures that options are accessed correctly to avoid potential issues in usage. Contributes to CURA-10831 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index f15766a57b..8ade8e771c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -86,7 +86,7 @@ class CuraConan(ConanFile): @property def _internal(self): - return self.options.enterprise in ["True", 'true'] + return self.options.internal in ["True", 'true'] @property def _app_name(self): From 9bb065a294761831977104487ab0f1859888a101 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 8 Dec 2023 07:40:30 +0100 Subject: [PATCH 34/39] make sure fdm_materials is installed for internals Contributes to CURA-10831 --- conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 8ade8e771c..e9d06452f3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -333,8 +333,6 @@ class CuraConan(ConanFile): self.requires(req) if self._internal: for req in self.conan_data["requirements_internal"]: - if "fdm_materials" in req: - continue self.requires(req) self.requires("cpython/3.10.4@ultimaker/stable") self.requires("openssl/3.2.0") From e6812a31d8e7c57a52482dbb47ca8e3ff5217194 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 8 Dec 2023 07:42:06 +0100 Subject: [PATCH 35/39] No need to create a conan-package Contributes to CURA-10831 --- .github/workflows/conan-package.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index 24793fa4cc..12567fde84 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -45,12 +45,3 @@ jobs: recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} secrets: inherit - - conan-package-create-linux: - needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-linux.yml@CURA-10831 - with: - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - conan_extra_args: '-c tools.build:skip_test=True -o ${{ needs.conan-recipe-version.outputs.project_name }}:enable_i18n=True' - secrets: inherit From f8239aa1fa288a6b465cbf5ae15531167ef5bbdf Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 8 Dec 2023 10:29:59 +0100 Subject: [PATCH 36/39] Add 'Enterprise' if applicable to About-dialog. done as a 15 min fix --- resources/qml/Dialogs/AboutDialog.qml | 10 ++++++++++ .../themes/cura-light/images/enterprise.png | Bin 0 -> 2492 bytes 2 files changed, 10 insertions(+) create mode 100644 resources/themes/cura-light/images/enterprise.png diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 8ea0c01888..947b46269a 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -45,6 +45,16 @@ UM.Dialog anchors.centerIn: parent } + Image + { + id: enterpriseLogo + visible: CuraApplication.isEnterprise + source: UM.Theme.getImage("enterprise") + fillMode: Image.PreserveAspectFit + + anchors.bottom: parent.bottom + } + UM.Label { id: version diff --git a/resources/themes/cura-light/images/enterprise.png b/resources/themes/cura-light/images/enterprise.png new file mode 100644 index 0000000000000000000000000000000000000000..6d92d80adbea617b9ac665d3b02e446fc4533f6a GIT binary patch literal 2492 zcmV;t2}AaYP)EX>4Tx04R}tkv&MmKpe$iQ>9fZ4t5Z6$WWau6curlDi*;)X)CnqU~=gfG-*gu zTpR`0f`cE6RRe3JS*_Mt`=0!Tp@O!O;X2JxB(Q`eQV=1djtZ)<5T#Wk#YCF+;~xGI$DbmXOs)zT zITlcZ3d!+<|H1EW&EnLgn-q!zy)U-?F$M&7fmXw|zmILZbprUGfh(=!uQh?$PtqG5 zEph}5ZUYzB9ZlW?E_Z<8CtWfmNAlAYibdf4jJ_!k4BZ0#Yi@7teVjf3S?X%}1~@nb z#!HmF?(yzmcW?imY4`U7S&wp^fW!DD00006VoOIv00aOC04y*FAmji5010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=L`r53J5$jA432D02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00)#wL_t(|+U;3QZyVPYJ#S{LAtj2Gl!)`_8OgHTBn8}} zNn1!p+C^%#HiBlAEV6N1B>e|gP^60%XwXd;au?YY1?seM7fpe*-2}0+hzqv`BsYMS zwl<(7N=S+l-%z$F>VupSIecAEnh$D*L&|a%?VOE-$NTQP?}O)_dkI8{5FtW@2oWMg zh!7z{ga{G-UqFIBU^n>~#61p+3-+LBH4px!-xw&^w(}brtOFZ>o*OCn`kdd;Kpg~e!QUNooj$Wa=YuT`Fdb7792N*fZ~%lpHR{B6dtC!sfk-$kP9RDguz=d`Jvx2H^quoBrb22ECv=IURw>c1JyG|yUn;0= zH$lL`=@Z)OA=}*j3y}KGf`Gu-eV{q5L&Hk-%pQlat`=bW>JCAsT4 zqkRL)#L#uNRQ#$l+6Y;v|7E5dRri=)s@-b0(@V8m*j%~My8L?=m9gP#LrE#SSocbm6V{Q4GvoI@j87^&NV0z==Ul{K}4Db#sPl!&h40_9Yel>T9T1|L7ZUX)lXf z`DvgbIM*xo_A1yvOwFbmW>&-OZQC`6IyWnI-c1Vdth-RMQx97;{~5X-GrEqgod((M ztQO>l6|43>*uS${m_K$mtGcM!>nmTr?4*Ki&%W6T`*zT0-O#s_0+v<3)X)w5Qvl&d zOAU40(AR4306;1!f#s^d2&FGiG)?Ps6u|C-)q{_vn~*x$Sf#+@ZVJu-A)brY*Y|eq z3tlT?*dxu9r>r>VKt^L!qe$H2o)6Rq%fB19j+=Wj8LlsXp|Zd3Q;L zocOgpU~In?xDMyuimYD!3D9>10F=zoEGwC>VXyo=)#!VjzR0ndIK_(9t00_%ll`is z{ub3zbKO4x*WOY|5vip31JCPRF`EFc2W{NAZ_K2UiCF-^SJayTrn`Co4XLNsn@UPZ zC8d`W! z1m8~$R&zaoiqZf;CkL-EX8c@HAj*x)1IU$CRnBZoNXa)T~d+>&S96ll(Eut=>TFk-r=WR%NtrfOF3E z{K`}G)cB$!eqAEeZ0>sBM`OLW6yPc=bbYTzsodXXUrDk5-KahfMSd3mFfsBG0LKR> z{=!D;jRADstWg?EbZx(~H3JBv%2?vn{f9UjI>(iZVOe)jH(ozb@_uQevekgGU7dj- zomVpb-)%8{UH6wlLa5fFr_}cV^s_v>2zkh^Tw+6++jeuyYS?}Z!@5P4*fbslY{3{m zS`}b=6sWr@V4vn!kP67ErS=W-|R-TO~Fx#Wu<`J@2XeucKuZpruI8Ajc1AhC}RKdR%Y0!TwR z*iyiivJ>5SWdeG-G1y-oOp{VhfQtpmc5b+U_^b&k5F2-4QX9f@e z!QyCg0uW9o2Csz8H7YHkno3GwMPq?x0%%i|crW*F>m&elQe9-aaZ5?dQ;H%_utMcB z)lyDueTf%cd;gY4drUrFU?p=GmiapNHe1z0-_VOnx+O&Ql3AmVJ-PoogIj|LUuJ7N zt^4A<+4_}1B$S5Vmv1AemwtPD3h<+?_P)M11#DVafJ5uKDLT7($v*`Y!c)Lf zA+QnDzJK=Ne@*~EV2?ky`eZkIWQCIRn?W{v%)bRR1@TCH!u|aj8}(PZnlF09p@4^t zQu%S4O@;@q9kEr?#$v*u)Me}#P9rDtSef0qBL(*OiLA6Ljp|jsWY!LgQe#2S?(}0000 Date: Fri, 8 Dec 2023 10:52:00 +0100 Subject: [PATCH 37/39] Fix a bug in which Cura sets fanspeed in the 0..255 range instead of the 0..1 range for Method machines. CURA-11441 --- resources/definitions/ultimaker_method_base.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/ultimaker_method_base.def.json b/resources/definitions/ultimaker_method_base.def.json index 8e9034c954..d45f54f8b9 100644 --- a/resources/definitions/ultimaker_method_base.def.json +++ b/resources/definitions/ultimaker_method_base.def.json @@ -329,6 +329,7 @@ "machine_name": { "default_value": "UltiMaker Method" }, "machine_nozzle_cool_down_speed": { "value": 0.8 }, "machine_nozzle_heat_up_speed": { "value": 3.5 }, + "machine_scale_fan_speed_zero_to_one": { "value": true }, "machine_start_gcode": { "default_value": "" }, "material_bed_temperature": { "enabled": "machine_heated_bed" }, "material_bed_temperature_layer_0": { "enabled": "machine_heated_bed" }, From f2f2f742bdfa10cd151566423cd9f405284216c1 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 8 Dec 2023 14:36:29 +0100 Subject: [PATCH 38/39] Apply suggestions from code review Co-authored-by: Casper Lamboo --- .github/workflows/conan-package.yml | 5 ++--- .github/workflows/installers.yml | 14 +++++--------- .github/workflows/linux.yml | 3 +-- .github/workflows/macos.yml | 3 +-- .github/workflows/process-pull-request.yml | 3 +-- .github/workflows/unit-test-post.yml | 3 +-- .github/workflows/unit-test.yml | 6 ++---- .github/workflows/windows.yml | 3 +-- conandata.yml | 18 +++++++++--------- 9 files changed, 23 insertions(+), 35 deletions(-) diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index 12567fde84..7ca2b0c467 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -31,16 +31,15 @@ env: CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }} CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }} -# FIXME: point to `main` once merged jobs: conan-recipe-version: - uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main with: project_name: cura conan-package-export: needs: [ conan-recipe-version ] - uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-export.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-export.yml@main with: recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index aa1f5a49f0..6e531ba833 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -42,16 +42,15 @@ env: jobs: default_values: - uses: ultimaker/cura-workflows/.github/workflows/cura-installer-default-value.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-default-value.yml@main with: cura_conan_version: ${{ inputs.cura_conan_version }} latest_release: '5.6' latest_release_schedule_hour: 4 latest_release_tag: 'nightly' - # FIXME: point to `main` once merged windows-installer: - uses: ultimaker/cura-workflows/.github/workflows/cura-installer-windows.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-windows.yml@main needs: [ default_values ] with: cura_conan_version: ${{ needs.default_values.outputs.cura_conan_version }} @@ -62,9 +61,8 @@ jobs: operating_system: windows-2022 secrets: inherit - # FIXME: point to `main` once merged linux-installer: - uses: ultimaker/cura-workflows/.github/workflows/cura-installer-linux.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-linux.yml@main needs: [ default_values ] with: cura_conan_version: ${{ needs.default_values.outputs.cura_conan_version }} @@ -75,9 +73,8 @@ jobs: operating_system: ubuntu-22.04 secrets: inherit - # FIXME: point to `main` once merged macos-installer: - uses: ultimaker/cura-workflows/.github/workflows/cura-installer-macos.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-macos.yml@main needs: [ default_values ] with: cura_conan_version: ${{ needs.default_values.outputs.cura_conan_version }} @@ -88,9 +85,8 @@ jobs: operating_system: self-hosted-X64 secrets: inherit - # FIXME: point to `main` once merged macos-arm-installer: - uses: ultimaker/cura-workflows/.github/workflows/cura-installer-macos.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-macos.yml@main needs: [ default_values ] with: cura_conan_version: ${{ needs.default_values.outputs.cura_conan_version }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 535d087700..2ad8f90bfe 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -45,9 +45,8 @@ env: STAGING: ${{ inputs.staging || false }} jobs: - # FIXME: point to `main` once merged windows-installer: - uses: ultimaker/cura-workflows/.github/workflows/cura-installer-linux.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-linux.yml@main with: cura_conan_version: ${{ inputs.cura_conan_version }} conan_args: ${{ inputs.conan_args }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 02f45385e7..d080fcc710 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -49,9 +49,8 @@ env: STAGING: ${{ inputs.staging || false }} jobs: - # FIXME: point to `main` once merged windows-installer: - uses: ultimaker/cura-workflows/.github/workflows/cura-installer-macos.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-macos.yml@main with: cura_conan_version: ${{ inputs.cura_conan_version }} conan_args: ${{ inputs.conan_args }} diff --git a/.github/workflows/process-pull-request.yml b/.github/workflows/process-pull-request.yml index f34e26f13e..45b3f8c915 100644 --- a/.github/workflows/process-pull-request.yml +++ b/.github/workflows/process-pull-request.yml @@ -4,8 +4,7 @@ on: pull_request_target: types: [ opened, reopened, edited, review_requested, ready_for_review, assigned ] -# FIXME: Use `main` instead of `CURA-10831` once merged jobs: add_label: - uses: ultimaker/cura-workflows/.github/workflows/process-pull-request.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/process-pull-request.yml@main secrets: inherit \ No newline at end of file diff --git a/.github/workflows/unit-test-post.yml b/.github/workflows/unit-test-post.yml index b4ca2ee699..eaf69692a7 100644 --- a/.github/workflows/unit-test-post.yml +++ b/.github/workflows/unit-test-post.yml @@ -6,9 +6,8 @@ on: types: [ completed ] jobs: - # FIXME: Use `main` instead of `CURA-10831` once merged publish-test-results: - uses: ultimaker/cura-workflows/.github/workflows/unit-test-post.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/unit-test-post.yml@main with: event: ${{ github.event.workflow_run.event }} conclusion: ${{ github.event.workflow_run.conclusion }} diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 6369e7e395..7c6910b39f 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -45,15 +45,13 @@ env: CONAN_PASSWORD: ${{ secrets.CONAN_PASS }} jobs: - # FIXME: Change to `main` instead of `CURA-10831` once merged conan-recipe-version: - uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main with: project_name: cura testing: - # FIXME: Change to `main` instead of `CURA-10831` once merged - uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@main needs: [ conan-recipe-version ] with: recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ef7e986ec3..0007936969 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -45,9 +45,8 @@ env: STAGING: ${{ inputs.staging || false }} jobs: - # FIXME: point to `main` once merged windows-installer: - uses: ultimaker/cura-workflows/.github/workflows/cura-installer-windows.yml@CURA-10831 + uses: ultimaker/cura-workflows/.github/workflows/cura-installer-windows.yml@main with: cura_conan_version: ${{ inputs.cura_conan_version }} conan_args: ${{ inputs.conan_args }} diff --git a/conandata.yml b/conandata.yml index 0eec369c96..a28954bb3f 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,18 +1,18 @@ version: "5.7.0-alpha.0" requirements: - - "uranium/(latest)@ultimaker/cura_10831" - - "curaengine/(latest)@ultimaker/cura_10831" - - "cura_binary_data/(latest)@ultimaker/cura_10831" - - "fdm_materials/(latest)@ultimaker/cura_10831" - - "curaengine_plugin_gradual_flow/(latest)@ultimaker/cura_10831" - - "dulcificum/(latest)@ultimaker/cura_10831" + - "uranium/(latest)@ultimaker/latest" + - "curaengine/(latest)@ultimaker/latest" + - "cura_binary_data/(latest)@ultimaker/latest" + - "fdm_materials/(latest)@ultimaker/latest" + - "curaengine_plugin_gradual_flow/(latest)@ultimaker/stable" + - "dulcificum/(latest)@ultimaker/latest" - "pyarcus/5.3.0" - "pysavitar/5.3.0" - "pynest2d/5.3.0" - - "curaengine_grpc_definitions/(latest)@ultimaker/cura_10831" + - "curaengine_grpc_definitions/(latest)@ultimaker/latest" requirements_internal: - - "fdm_materials/(latest)@internal/cura_10831" - - "cura_private_data/(latest)@internal/cura_10831" + - "fdm_materials/(latest)@internal/latest" + - "cura_private_data/(latest)@internal/latest" urls: default: cloud_api_root: "https://api.ultimaker.com" From d9b75cedef53cc581c61a78d11f862e8540ed234 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 8 Dec 2023 15:07:41 +0100 Subject: [PATCH 39/39] point to testing Contributes to CURA-10831 --- conandata.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/conandata.yml b/conandata.yml index a28954bb3f..c4dd1ce6de 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,18 +1,18 @@ version: "5.7.0-alpha.0" requirements: - - "uranium/(latest)@ultimaker/latest" - - "curaengine/(latest)@ultimaker/latest" - - "cura_binary_data/(latest)@ultimaker/latest" - - "fdm_materials/(latest)@ultimaker/latest" + - "uranium/(latest)@ultimaker/testing" + - "curaengine/(latest)@ultimaker/testing" + - "cura_binary_data/(latest)@ultimaker/testing" + - "fdm_materials/(latest)@ultimaker/testing" - "curaengine_plugin_gradual_flow/(latest)@ultimaker/stable" - - "dulcificum/(latest)@ultimaker/latest" + - "dulcificum/(latest)@ultimaker/testing" - "pyarcus/5.3.0" - "pysavitar/5.3.0" - "pynest2d/5.3.0" - - "curaengine_grpc_definitions/(latest)@ultimaker/latest" + - "curaengine_grpc_definitions/(latest)@ultimaker/testing" requirements_internal: - - "fdm_materials/(latest)@internal/latest" - - "cura_private_data/(latest)@internal/latest" + - "fdm_materials/(latest)@internal/testing" + - "cura_private_data/(latest)@internal/testing" urls: default: cloud_api_root: "https://api.ultimaker.com"