From 4f9ff733020daba6316c6bfdd4bfb3ac352ed579 Mon Sep 17 00:00:00 2001 From: Pelochus <49835792+Pelochus@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:36:23 +0200 Subject: [PATCH 01/15] Fix spanish translation for lightning infill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Substituted "iluminación" (lighting) for "rayos" (lightning) --- resources/i18n/es_ES/fdmprinter.def.json.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/i18n/es_ES/fdmprinter.def.json.po b/resources/i18n/es_ES/fdmprinter.def.json.po index 855a5a3839..d7a54bbff8 100644 --- a/resources/i18n/es_ES/fdmprinter.def.json.po +++ b/resources/i18n/es_ES/fdmprinter.def.json.po @@ -694,11 +694,11 @@ msgstr "Determina la prioridad de esta malla al tener en cuenta varias mallas de msgctxt "lightning_infill_support_angle description" msgid "Determines when a lightning infill layer has to support anything above it. Measured in the angle given the thickness of a layer." -msgstr "Determina cuándo una capa de iluminación tiene que soportar algo por encima de ella. Medido en el ángulo dado el espesor de una capa." +msgstr "Determina cuándo una capa de relleno de rayos tiene que soportar algo por encima de ella. Medido en el ángulo dado el espesor de una capa." msgctxt "lightning_infill_overhang_angle description" msgid "Determines when a lightning infill layer has to support the model above it. Measured in the angle given the thickness." -msgstr "Determina cuándo una capa de relleno de iluminación tiene que soportar el modelo que está por encima. Medido en el ángulo dado el espesor." +msgstr "Determina cuándo una capa de relleno de rayos tiene que soportar el modelo que está por encima. Medido en el ángulo dado el espesor." msgctxt "material_diameter label" msgid "Diameter" @@ -1782,23 +1782,23 @@ msgstr "Levantar el cabezal" msgctxt "infill_pattern option lightning" msgid "Lightning" -msgstr "Iluminación" +msgstr "Rayos" msgctxt "lightning_infill_overhang_angle label" msgid "Lightning Infill Overhang Angle" -msgstr "Ángulo del voladizo de relleno de iluminación" +msgstr "Ángulo del voladizo de relleno de rayos" msgctxt "lightning_infill_prune_angle label" msgid "Lightning Infill Prune Angle" -msgstr "Ángulo de recorte de relleno de iluminación" +msgstr "Ángulo de recorte de relleno de rayos" msgctxt "lightning_infill_straightening_angle label" msgid "Lightning Infill Straightening Angle" -msgstr "Ángulo de enderezamiento de iluminación" +msgstr "Ángulo de enderezamiento de rayos" msgctxt "lightning_infill_support_angle label" msgid "Lightning Infill Support Angle" -msgstr "Ángulo de sujeción de relleno de iluminación" +msgstr "Ángulo de sujeción de relleno de rayos" msgctxt "support_tree_limit_branch_reach label" msgid "Limit Branch Reach" @@ -4294,7 +4294,7 @@ msgstr "Diámetro exterior de la punta de la tobera." msgctxt "infill_pattern description" msgid "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, triangle, tri-hexagon, cubic, octet, quarter cubic, cross and concentric patterns are fully printed every layer. Gyroid, cubic, quarter cubic and octet infill change with every layer to provide a more equal distribution of strength over each direction. Lightning infill tries to minimize the infill, by only supporting the ceiling of the object." -msgstr "Patrón del material de relleno de la impresión. El método de llenado en línea y en zigzag cambia de dirección en capas alternas para reducir los costes de material. Los patrones de rejilla, triángulo, trihexágono, cubo, octaédrico, cubo bitruncado, transversal y concéntrico se imprimen en todas las capas por completo. Los rellenos de giroide, cúbico, cúbico bitruncado y octaédrico se alternan en cada capa para lograr una distribución más uniforme de la fuerza en todas las direcciones. El relleno de iluminación intenta minimizar el relleno apoyando solo la parte superior del objeto." +msgstr "Patrón del material de relleno de la impresión. El método de llenado en línea y en zigzag cambia de dirección en capas alternas para reducir los costes de material. Los patrones de rejilla, triángulo, trihexágono, cubo, octaédrico, cubo bitruncado, transversal y concéntrico se imprimen en todas las capas por completo. Los rellenos de giroide, cúbico, cúbico bitruncado y octaédrico se alternan en cada capa para lograr una distribución más uniforme de la fuerza en todas las direcciones. El relleno de rayos intenta minimizar el relleno apoyando solo la parte superior del objeto." msgctxt "support_pattern description" msgid "The pattern of the support structures of the print. The different options available result in sturdy or easy to remove support." From c3f3a863859ea25e92ddba50ae2fed8b81778135 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 12 Oct 2023 16:53:39 +0200 Subject: [PATCH 02/15] Extend start/end gcode templates feature with support for formula's CURA-11155 --- plugins/CuraEngineBackend/StartSliceJob.py | 70 ++++++++++------------ 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 4d924ac337..06859aef55 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Ultimaker B.V. +# Copyright (c) 2023 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import os @@ -24,6 +24,7 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.Scene import Scene #For typing. from UM.Settings.Validator import ValidatorState from UM.Settings.SettingRelation import RelationType +from UM.Settings.SettingFunction import SettingFunction from cura.CuraApplication import CuraApplication from cura.Scene.CuraSceneNode import CuraSceneNode @@ -46,44 +47,44 @@ class StartJobResult(IntEnum): class GcodeStartEndFormatter(Formatter): - """Formatter class that handles token expansion in start/end gcode""" + # Formatter class that handles token expansion in start/end gcode + # Example of a start/end gcode string: + # ``` + # M104 S{material_print_temperature_layer_0, 0} ;pre-heat + # M140 S{material_bed_temperature_layer_0} ;heat bed + # M204 P{acceleration_print, 0} T{acceleration_travel, 0} + # M205 X{jerk_print, 0} + # ``` + # Any expression between curly braces will be evaluated and replaced with the result, using the + # context of the provided default extruder. If no default extruder is provided, the global stack + # will be used. Alternatively, if the expression is formatted as "{[expression], [extruder_nr]}", + # then the expression will be evaluated with the extruder stack of the specified extruder_nr. + + _extruder_regex = re.compile(r"^\s*(?P.*)\s*,\s*(?P\d+)\s*$") def __init__(self, default_extruder_nr: int = -1) -> None: super().__init__() self._default_extruder_nr = default_extruder_nr - def get_value(self, key: str, args: str, kwargs: dict) -> str: #type: ignore # [CodeStyle: get_value is an overridden function from the Formatter class] - # The kwargs dictionary contains a dictionary for each stack (with a string of the extruder_nr as their key), - # and a default_extruder_nr to use when no extruder_nr is specified - + def get_value(self, expression: str, args: str, kwargs: dict) -> str: extruder_nr = self._default_extruder_nr - key_fragments = [fragment.strip() for fragment in key.split(",")] - if len(key_fragments) == 2: - try: - extruder_nr = int(key_fragments[1]) - except ValueError: - try: - extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack #TODO: How can you ever provide the '-1' kwarg? - except (KeyError, ValueError): - # either the key does not exist, or the value is not an int - Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0]) - elif len(key_fragments) != 1: - Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key) - return "{" + key + "}" + # The settings may specify a specific extruder to use. This is done by + # formatting the expression as "{expression}, {extruder_nr}". If the + # expression is formatted like this, we extract the extruder_nr and use + # it to get the value from the correct extruder stack. + match = self._extruder_regex.match(expression) + if match: + expression = match.group("expression") + extruder_nr = int(match.group("extruder_nr")) - key = key_fragments[0] + if extruder_nr == -1: + container_stack = CuraApplication.getInstance().getGlobalContainerStack() + else: + container_stack = ExtruderManager.getInstance().getExtruderStack(extruder_nr) - default_value_str = "{" + key + "}" - value = default_value_str - # "-1" is global stack, and if the setting value exists in the global stack, use it as the fallback value. - if key in kwargs["-1"]: - value = kwargs["-1"][key] - if str(extruder_nr) in kwargs and key in kwargs[str(extruder_nr)]: - value = kwargs[str(extruder_nr)][key] - - if value == default_value_str: - Logger.log("w", "Unable to replace '%s' placeholder in start/end g-code", key) + setting_function = SettingFunction(expression) + value = setting_function(container_stack) return value @@ -422,17 +423,10 @@ class StartSliceJob(Job): :param value: A piece of g-code to replace tokens in. :param default_extruder_nr: Stack nr to use when no stack nr is specified, defaults to the global stack """ - if not self._all_extruders_settings: - self._cacheAllExtruderSettings() - try: # any setting can be used as a token fmt = GcodeStartEndFormatter(default_extruder_nr = default_extruder_nr) - if self._all_extruders_settings is None: - return "" - settings = self._all_extruders_settings.copy() - settings["default_extruder_nr"] = default_extruder_nr - return str(fmt.format(value, **settings)) + return str(fmt.format(value)) except: Logger.logException("w", "Unable to do token replacement on start/end g-code") return str(value) From 14afd73c19b369a97da6c39c1af2d3e58f1e3ac6 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 12 Oct 2023 21:09:10 +0200 Subject: [PATCH 03/15] Make sure default variables are available in start/end code The following properties are not settings-names, but could previously be used as template variables - material_id - time - date - day - initial_extruder_nr - material_id - material_name - material_type - material_brand - time - date - day - initial_extruder_nr These properties are _awkwardly_ propogated through the kwargs of the `get_value` method of `GcodeStartEndFormatter`. I don't quite like implementing it like this, but to avoid API breaks I couldn't change abusing the kwargs arg for this purpose. CURA-11155 --- plugins/CuraEngineBackend/StartSliceJob.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 06859aef55..4d9afd31bc 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -84,7 +84,7 @@ class GcodeStartEndFormatter(Formatter): container_stack = ExtruderManager.getInstance().getExtruderStack(extruder_nr) setting_function = SettingFunction(expression) - value = setting_function(container_stack) + value = setting_function(container_stack, additional_variables=kwargs[str(extruder_nr)]) return value @@ -423,10 +423,17 @@ class StartSliceJob(Job): :param value: A piece of g-code to replace tokens in. :param default_extruder_nr: Stack nr to use when no stack nr is specified, defaults to the global stack """ + if not self._all_extruders_settings: + self._cacheAllExtruderSettings() + try: # any setting can be used as a token fmt = GcodeStartEndFormatter(default_extruder_nr = default_extruder_nr) - return str(fmt.format(value)) + if self._all_extruders_settings is None: + return "" + settings = self._all_extruders_settings.copy() + settings["default_extruder_nr"] = default_extruder_nr + return str(fmt.format(value, **settings)) except: Logger.logException("w", "Unable to do token replacement on start/end g-code") return str(value) From e98240fb2cdaf77d7d4bc9da84734ef29ce177b4 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 13 Oct 2023 07:36:45 +0200 Subject: [PATCH 04/15] Cleanup code in `GcodeStartEndFormatter` CURA-11155 --- plugins/CuraEngineBackend/StartSliceJob.py | 39 ++++++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 4d9afd31bc..2887743b4f 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -62,11 +62,13 @@ class GcodeStartEndFormatter(Formatter): _extruder_regex = re.compile(r"^\s*(?P.*)\s*,\s*(?P\d+)\s*$") - def __init__(self, default_extruder_nr: int = -1) -> None: + def __init__(self, default_extruder_nr: int = -1, *, + additional_per_extruder_settings: Optional[Dict[str, Dict[str, any]]] = None) -> None: super().__init__() - self._default_extruder_nr = default_extruder_nr + self._default_extruder_nr: int = default_extruder_nr + self._additional_per_extruder_settings: Optional[Dict[str, Dict[str, any]]] = additional_per_extruder_settings - def get_value(self, expression: str, args: str, kwargs: dict) -> str: + def get_value(self, expression: str, args: [str], kwargs: dict) -> str: extruder_nr = self._default_extruder_nr # The settings may specify a specific extruder to use. This is done by @@ -78,13 +80,27 @@ class GcodeStartEndFormatter(Formatter): expression = match.group("expression") extruder_nr = int(match.group("extruder_nr")) + if self._additional_per_extruder_settings is not None and str( + extruder_nr) in self._additional_per_extruder_settings: + additional_variables = self._additional_per_extruder_settings[str(extruder_nr)] + else: + additional_variables = dict() + + # Add the arguments and keyword arguments to the additional settings. These + # are currently _not_ used, but they are added for consistency with the + # base Formatter class. + for key, value in enumerate(args): + additional_variables[key] = value + for key, value in kwargs.items(): + additional_variables[key] = value + if extruder_nr == -1: container_stack = CuraApplication.getInstance().getGlobalContainerStack() else: container_stack = ExtruderManager.getInstance().getExtruderStack(extruder_nr) setting_function = SettingFunction(expression) - value = setting_function(container_stack, additional_variables=kwargs[str(extruder_nr)]) + value = setting_function(container_stack, additional_variables=additional_variables) return value @@ -427,13 +443,14 @@ class StartSliceJob(Job): self._cacheAllExtruderSettings() try: - # any setting can be used as a token - fmt = GcodeStartEndFormatter(default_extruder_nr = default_extruder_nr) - if self._all_extruders_settings is None: - return "" - settings = self._all_extruders_settings.copy() - settings["default_extruder_nr"] = default_extruder_nr - return str(fmt.format(value, **settings)) + # Get "replacement-keys" for the extruders. In the formatter the settings stack is used to get the + # replacement values for the setting-keys. However, the values for `material_id`, `material_type`, + # etc are not in the settings stack. + additional_per_extruder_settings = self._all_extruders_settings.copy() + additional_per_extruder_settings["default_extruder_nr"] = default_extruder_nr + fmt = GcodeStartEndFormatter(default_extruder_nr=default_extruder_nr, + additional_per_extruder_settings=additional_per_extruder_settings) + return str(fmt.format(value)) except: Logger.logException("w", "Unable to do token replacement on start/end g-code") return str(value) From 277d48bd510dbbe48d9ced2ef7b40b83a2c7ee5c Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 13 Oct 2023 09:27:57 +0200 Subject: [PATCH 05/15] 3mf Meshes load in correct location CURA-9755 --- plugins/3MFReader/ThreeMFReader.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index e06e9dcf4e..7675a3f040 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -186,6 +186,14 @@ class ThreeMFReader(MeshReader): if len(um_node.getAllChildren()) == 1: # We don't want groups of one, so move the node up one "level" child_node = um_node.getChildren()[0] + # Move all the meshes of children so that toolhandles are shown in the correct place. + if child_node.getMeshData(): + print("child name: ", child_node.getId()) + extents = child_node.getMeshData().getExtents() + m = Matrix() + m.translate(-extents.center) + child_node.setMeshData(child_node.getMeshData().getTransformed(m)) + child_node.translate(extents.center) parent_transformation = um_node.getLocalTransformation() child_transformation = child_node.getLocalTransformation() child_node.setTransformation(parent_transformation.multiply(child_transformation)) From 7880cb5bdeb6e0c5b494b245fe3703866bd524b5 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 13 Oct 2023 11:29:44 +0200 Subject: [PATCH 06/15] remove debug statement CURA-9755 --- plugins/3MFReader/ThreeMFReader.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 7675a3f040..13a97d5a89 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -188,11 +188,10 @@ class ThreeMFReader(MeshReader): child_node = um_node.getChildren()[0] # Move all the meshes of children so that toolhandles are shown in the correct place. if child_node.getMeshData(): - print("child name: ", child_node.getId()) extents = child_node.getMeshData().getExtents() - m = Matrix() - m.translate(-extents.center) - child_node.setMeshData(child_node.getMeshData().getTransformed(m)) + move_matrix = Matrix() + move_matrix.translate(-extents.center) + child_node.setMeshData(child_node.getMeshData().getTransformed(move_matrix)) child_node.translate(extents.center) parent_transformation = um_node.getLocalTransformation() child_transformation = child_node.getLocalTransformation() From cfea094161a1d42f94e4f42007f5519417cd87ba Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 16 Oct 2023 10:15:34 +0200 Subject: [PATCH 07/15] Restore missing translation Lost during conflicts solve --- resources/i18n/es_ES/fdmprinter.def.json.po | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/i18n/es_ES/fdmprinter.def.json.po b/resources/i18n/es_ES/fdmprinter.def.json.po index 96fa09c7f7..3303a22d1c 100644 --- a/resources/i18n/es_ES/fdmprinter.def.json.po +++ b/resources/i18n/es_ES/fdmprinter.def.json.po @@ -1444,6 +1444,10 @@ msgctxt "infill_pattern label" msgid "Infill Pattern" msgstr "Patrón de relleno" +msgctxt "infill_pattern description" +msgid "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, triangle, tri-hexagon, cubic, octet, quarter cubic, cross and concentric patterns are fully printed every layer. Gyroid, cubic, quarter cubic and octet infill change with every layer to provide a more equal distribution of strength over each direction. Lightning infill tries to minimize the infill, by only supporting the ceiling of the object." +msgstr "Patrón del material de relleno de la impresión. El método de llenado en línea y en zigzag cambia de dirección en capas alternas para reducir los costes de material. Los patrones de rejilla, triángulo, trihexágono, cubo, octaédrico, cubo bitruncado, transversal y concéntrico se imprimen en todas las capas por completo. Los rellenos de giroide, cúbico, cúbico bitruncado y octaédrico se alternan en cada capa para lograr una distribución más uniforme de la fuerza en todas las direcciones. El relleno de rayos intenta minimizar el relleno apoyando solo la parte superior del objeto." + msgctxt "infill_pattern option grid" msgid "Grid" msgstr "Rejilla" From 67c11bf7f84d848d6388c49dd04116e9f4db1556 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 16 Oct 2023 10:56:07 +0200 Subject: [PATCH 08/15] Fix certain 3mf models not restoring properly CURA-11164 --- plugins/3MFReader/ThreeMFReader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index e06e9dcf4e..4c13bbb5fa 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -226,7 +226,8 @@ class ThreeMFReader(MeshReader): if mesh_data is not None: extents = mesh_data.getExtents() if extents is not None: - center_vector = Vector(extents.center.x, extents.center.y, extents.center.z) + # We use a different coordinate space, so flip Z and Y + center_vector = Vector(extents.center.x, extents.center.z, extents.center.y) transform_matrix.setByTranslation(center_vector) transform_matrix.multiply(um_node.getLocalTransformation()) um_node.setTransformation(transform_matrix) From 7e38927a8cb76d3789fde21482aeff1e254cc636 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 16 Oct 2023 10:56:07 +0200 Subject: [PATCH 09/15] Fix certain 3mf models not restoring properly CURA-11164 --- plugins/3MFReader/ThreeMFReader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 13a97d5a89..cf8079d75d 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -233,7 +233,8 @@ class ThreeMFReader(MeshReader): if mesh_data is not None: extents = mesh_data.getExtents() if extents is not None: - center_vector = Vector(extents.center.x, extents.center.y, extents.center.z) + # We use a different coordinate space, so flip Z and Y + center_vector = Vector(extents.center.x, extents.center.z, extents.center.y) transform_matrix.setByTranslation(center_vector) transform_matrix.multiply(um_node.getLocalTransformation()) um_node.setTransformation(transform_matrix) From dc66732150506ff9b716aced9d9a369d1aa207c6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 16 Oct 2023 12:07:17 +0200 Subject: [PATCH 10/15] Revert "Fix certain 3mf models not restoring properly" This reverts commit 7e38927a8cb76d3789fde21482aeff1e254cc636. --- plugins/3MFReader/ThreeMFReader.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index cf8079d75d..13a97d5a89 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -233,8 +233,7 @@ class ThreeMFReader(MeshReader): if mesh_data is not None: extents = mesh_data.getExtents() if extents is not None: - # We use a different coordinate space, so flip Z and Y - center_vector = Vector(extents.center.x, extents.center.z, extents.center.y) + center_vector = Vector(extents.center.x, extents.center.y, extents.center.z) transform_matrix.setByTranslation(center_vector) transform_matrix.multiply(um_node.getLocalTransformation()) um_node.setTransformation(transform_matrix) From 87a02c6ea20120f2a008f2cc6fba58a2c6438f9c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 23 Oct 2023 15:26:15 +0200 Subject: [PATCH 11/15] Specify both OS and Arch for Mac --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 01a64f5180..89da0ac086 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -90,7 +90,7 @@ env: jobs: cura-installer-create: - runs-on: ${{ inputs.operating_system }} + runs-on: [${{ inputs.operating_system }}, ${{ inputs.architecture }}] outputs: INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }} From 52c9b4bea82f08b09305a6d778cc98399be3e917 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 23 Oct 2023 15:32:29 +0200 Subject: [PATCH 12/15] Use specific self-hosted label --- .github/workflows/macos.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 89da0ac086..71236d30bd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -38,7 +38,8 @@ on: default: 'macos-11' type: choice options: - - self-hosted + - self-hosted-X64 + - self-hosted-ARM64 - macos-11 - macos-12 workflow_call: @@ -90,7 +91,7 @@ env: jobs: cura-installer-create: - runs-on: [${{ inputs.operating_system }}, ${{ inputs.architecture }}] + runs-on: ${{ inputs.operating_system }} outputs: INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }} From b83d3ebae71e4b5651319d3dd099595317f50003 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 23 Oct 2023 15:49:53 +0200 Subject: [PATCH 13/15] Use older version of Python --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 71236d30bd..2d916a0b48 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -103,7 +103,7 @@ jobs: - name: Setup Python and pip uses: actions/setup-python@v4 with: - python-version: '3.10.x' + python-version: '3.8.x' cache: 'pip' cache-dependency-path: .github/workflows/requirements-conan-package.txt From b5a76427c8969377780d0f8fd15d304ff309cd9e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 23 Oct 2023 15:56:29 +0200 Subject: [PATCH 14/15] Use newer version of Python --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2d916a0b48..3aa324cf0f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -103,7 +103,7 @@ jobs: - name: Setup Python and pip uses: actions/setup-python@v4 with: - python-version: '3.8.x' + python-version: '3.11.x' cache: 'pip' cache-dependency-path: .github/workflows/requirements-conan-package.txt From aa03e9236bf82c771e116e6c037bdb291827e8b6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 23 Oct 2023 16:22:55 +0200 Subject: [PATCH 15/15] Change defaults for Mac runners --- .github/workflows/installers.yml | 4 ++-- .github/workflows/macos.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 140248b664..fa2f73998b 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -95,7 +95,7 @@ jobs: enterprise: ${{ github.event.inputs.enterprise == 'true' }} staging: ${{ github.event.inputs.staging == 'true' }} architecture: X64 - operating_system: macos-12 + operating_system: self-hosted-X64 secrets: inherit macos-arm-installer: @@ -107,7 +107,7 @@ jobs: enterprise: ${{ github.event.inputs.enterprise == 'true' }} staging: ${{ github.event.inputs.staging == 'true' }} architecture: ARM64 - operating_system: self-hosted + operating_system: self-hosted-ARM64 secrets: inherit # Run and update nightly release when the nightly input is set to true or if the schedule is triggered diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3aa324cf0f..78b4c23fef 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -27,7 +27,7 @@ on: architecture: description: 'Architecture' required: true - default: 'X64' + default: 'ARM64' type: choice options: - X64 @@ -35,7 +35,7 @@ on: operating_system: description: 'OS' required: true - default: 'macos-11' + default: 'self-hosted-ARM64' type: choice options: - self-hosted-X64 @@ -67,12 +67,12 @@ on: architecture: description: 'Architecture' required: true - default: 'X64' + default: 'ARM64' type: string operating_system: description: 'OS' required: true - default: 'macos-11' + default: 'self-hosted-ARM64' type: string env: