From e01b1406e31c87b580f0f9640d0cabe440473dc7 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Thu, 29 Jun 2023 17:08:41 -0400 Subject: [PATCH 01/34] Update LimitXYAccelJerk.py Added Gradual Accel Change. Update LimitXYAccelJerk.py Round the Accel numbers to nearest "50". Create LimitXYAccelJerk.py New post processor to limit the X and or Y accel and jerk for bed-slinger printers. Update LimitXYAccelJerk.py Removed debug code. Update LimitXYAccelJerk.py Remove debug code Update LimitXYAccelJerk.py Bug Fix --- .../scripts/LimitXYAccelJerk.py | 273 ++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py diff --git a/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py b/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py new file mode 100644 index 0000000000..8932d8e4ea --- /dev/null +++ b/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py @@ -0,0 +1,273 @@ +# Limit XY Accel: Authored by: Greg Foresi (GregValiant) +# July 2023 +# Sometimes bed-slinger printers need different Accel and Jerk values for the Y but Cura always makes them the same. +# This script changes the Accel and/or Jerk from the beginning of the 'Start Layer' to the end of the 'End Layer'. +# The existing M201 Max Accel will be changed to limit the Y (and/or X) accel at the printer. If you have Accel enabled in Cura and the XY Accel is set to 3000 then setting the Y limit to 1000 will result in the printer limiting the Y to 1000. This can keep tall skinny prints from breaking loose of the bed and failing. The script was not tested with Junction Deviation. +# If enabled - the Jerk setting is changed line-by-line within the gcode as there is no "limit" on Jerk. +# if 'Gradual ACCEL change' is enabled then the Accel is changed gradually from the Start to the End layer and that will be the final Accel setting in the file. If 'Gradual' is enabled then the Jerk settings will continue to be changed to the end of the file (rather than ending at the End layer). + +from ..Script import Script +from cura.CuraApplication import CuraApplication +import re + +class LimitXYAccelJerk(Script): + def __init__(self): + super().__init__() + + def initialize(self) -> None: + super().initialize() + # Get the Accel and Jerk and set the values in the setting boxes--------------------------------------------- + mycura = CuraApplication.getInstance().getGlobalContainerStack() + extruder = mycura.extruderList + accel_print = extruder[0].getProperty("acceleration_print", "value") + accel_travel = extruder[0].getProperty("acceleration_travel", "value") + jerk_print_old = extruder[0].getProperty("jerk_print", "value") + jerk_travel_old = extruder[0].getProperty("jerk_travel", "value") + self._instance.setProperty("X_accel_limit", "value", round(accel_print)) + self._instance.setProperty("Y_accel_limit", "value", round(accel_print)) + self._instance.setProperty("X_jerk", "value", jerk_print_old) + self._instance.setProperty("Y_jerk", "value", jerk_print_old) + + def getSettingDataString(self): + return """{ + "name": "Limit the X-Y Accel/Jerk", + "key": "LimitXYAccelJerk", + "metadata": {}, + "version": 2, + "settings": + { + "X_accel_limit": + { + "label": "X MAX Acceleration", + "description": "If this number is lower than the 'X Print Accel' in Cura then this will limit the Accel on the X axis. Enter the Maximum Acceleration value for the X axis. This will affect both Print and Travel Accel. If you enable an End Layer then at the end of that layer the Accel Limit will be reset (unless you choose 'Gradual' in which case the new limit goes to the top layer).", + "type": "int", + "enabled": true, + "minimum_value": 50, + "unit": "mm/sec² ", + "default_value": 500 + }, + "Y_accel_limit": + { + "label": "Y MAX Acceleration", + "description": "If this number is lower than the Y accel in Cura then this will limit the Accel on the Y axis. Enter the Maximum Acceleration value for the Y axis. This will affect both Print and Travel Accel. If you enable an End Layer then at the end of that layer the Accel Limit will be reset (unless you choose 'Gradual' in which case the new limit goes to the top layer).", + "type": "int", + "enabled": true, + "minimum_value": 50, + "unit": "mm/sec² ", + "default_value": 500 + }, + "jerk_enable": + { + "label": "Change the Jerk", + "description": "Whether to change the Jerk values.", + "type": "bool", + "enabled": true, + "default_value": false + }, + "X_jerk": + { + "label": " X jerk", + "description": "Enter the Jerk value for the X axis. Enter '0' to use the existing X Jerk. This setting will affect both the Print and Travel jerk.", + "type": "int", + "enabled": "jerk_enable", + "unit": "mm/sec ", + "default_value": 8 + }, + "Y_jerk": + { + "label": " Y jerk", + "description": "Enter the Jerk value for the Y axis. Enter '0' to use the existing Y Jerk. This setting will affect both the Print and Travel jerk.", + "type": "int", + "enabled": "jerk_enable", + "unit": "mm/sec ", + "default_value": 8 + }, + "start_layer": + { + "label": "From Start of Layer:", + "description": "Use the Cura Preview numbers. Enter the Layer to start the changes at. The minimum is Layer 1.", + "type": "int", + "default_value": 1, + "minimum_value": 1, + "unit": "Lay# ", + "enabled": "not gradient_change" + }, + "end_layer": + { + "label": "To End of Layer", + "description": "Use the Cura Preview numbers. Enter '-1' for the entire file or enter a layer number. The changes will end at your 'End Layer' and revert back to the original numbers.", + "type": "int", + "default_value": -1, + "minimum_value": -1, + "unit": "Lay# ", + "enabled": "not gradient_change" + }, + "gradient_change": + { + "label": "Gradual ACCEL Change", + "description": "Gradually change the Accel numbers 'From layer' - 'To Layer'. If Jerk is enabled the Jerk changes are not 'Gradual' because there is no Max Jerk setting. Unlike Constant change - using 'Gradual' the Accel and Jerk change continues from the End Layer to the end of the file.", + "type": "bool", + "default_value": false, + "enabled": true + }, + "gradient_start_layer": + { + "label": " Gradual From Layer:", + "description": "Use the Cura Preview numbers. Enter the Layer to start the changes at. The minimum is Layer 1.", + "type": "int", + "default_value": 1, + "minimum_value": 1, + "unit": "Lay# ", + "enabled": "gradient_change" + }, + "gradient_end_layer": + { + "label": " Gradual To Layer", + "description": "Use the Cura Preview numbers. Enter '-1' for the top layer or enter a layer number. The last 'Gradual' change will continue to the end of the file.", + "type": "int", + "default_value": -1, + "minimum_value": -1, + "unit": "Lay# ", + "enabled": "gradient_change" + } + } + }""" + + def execute(self, data): + mycura = CuraApplication.getInstance().getGlobalContainerStack() + extruder = mycura.extruderList + constant_change = not bool(self.getSettingValueByKey("gradient_change")) + accel_print_enabled = bool(extruder[0].getProperty("acceleration_enabled", "value")) + accel_travel_enabled = bool(extruder[0].getProperty("acceleration_travel_enabled", "value")) + accel_print = extruder[0].getProperty("acceleration_print", "value") + accel_travel = extruder[0].getProperty("acceleration_travel", "value") + jerk_print_enabled = str(extruder[0].getProperty("jerk_enabled", "value")) + jerk_travel_enabled = str(extruder[0].getProperty("jerk_travel_enabled", "value")) + jerk_print_old = extruder[0].getProperty("jerk_print", "value") + jerk_travel_old = extruder[0].getProperty("jerk_travel", "value") + if int(accel_print) >= int(accel_travel): + accel_old = accel_print + else: + accel_old = accel_travel + jerk_travel = str(extruder[0].getProperty("jerk_travel", "value")) + if int(jerk_print_old) >= int(jerk_travel_old): + jerk_old = jerk_print_old + else: + jerk_old = jerk_travel_old + + #Set the new Accel values--------------------------------------------------------------------------------- + x_accel = str(self.getSettingValueByKey("X_accel_limit")) + y_accel = str(self.getSettingValueByKey("Y_accel_limit")) + x_jerk = int(self.getSettingValueByKey("X_jerk")) + y_jerk = int(self.getSettingValueByKey("Y_jerk")) + # Put the strings together + M201_limit_new = "M201 X" + x_accel + " Y" + y_accel + M201_limit_old = "M201 X" + str(round(accel_old)) + " Y" + str(round(accel_old)) + if x_jerk == 0: + M205_jerk_pattern = "Y(\d*)" + M205_jerk_new = "Y" + str(y_jerk) + if y_jerk == 0: + M205_jerk_pattern = "X(\d*)" + M205_jerk_new = "X" + str(x_jerk) + if x_jerk != 0 and y_jerk != 0: + M205_jerk_pattern = "M205 X(\d*) Y(\d*)" + M205_jerk_new = "M205 X" + str(x_jerk) + " Y" + str(y_jerk) + M205_jerk_old = "M205 X" + str(jerk_old) + " Y" + str(jerk_old) + + #Get the indexes of the start and end layers---------------------------------------- + if constant_change: + start_layer = int(self.getSettingValueByKey("start_layer"))-1 + end_layer = int(self.getSettingValueByKey("end_layer")) + else: + start_layer = int(self.getSettingValueByKey("gradient_start_layer"))-1 + end_layer = int(self.getSettingValueByKey("gradient_end_layer")) + start_index = 2 + end_index = len(data)-2 + for num in range(2,len(data)-1): + if ";LAYER:" + str(start_layer) + "\n" in data[num]: + start_index = num + break + if int(end_layer) > 0: + for num in range(3,len(data)-1): + try: + if ";LAYER:" + str(end_layer) + "\n" in data[num]: + end_index = num + break + except: + end_index = len(data)-2 + + #Add Accel limit and new Jerk at start layer----------------------------------------------------- + if constant_change: + layer = data[start_index] + lines = layer.split("\n") + for index, line in enumerate(lines): + if lines[index].startswith(";LAYER:"): + lines.insert(index+1,M201_limit_new) + if self.getSettingValueByKey("jerk_enable"): + lines.insert(index+2,M205_jerk_new) + data[start_index] = "\n".join(lines) + break + + #Alter any existing jerk lines. Accel lines can be ignored----------------------------------- + for num in range(start_index,end_index,1): + layer = data[num] + lines = layer.split("\n") + for index, line in enumerate(lines): + if line.startswith("M205"): + lines[index] = re.sub(M205_jerk_pattern, M205_jerk_new, line) + data[num] = "\n".join(lines) + if end_layer != -1: + try: + layer = data[end_index-1] + lines = layer.split("\n") + lines.insert(len(lines)-2,M201_limit_old) + lines.insert(len(lines)-2,M205_jerk_old) + data[end_index-1] = "\n".join(lines) + except: + all + else: + data[len(data)-1] = M201_limit_old + "\n" + M205_jerk_old + "\n" + data[len(data)-1] + return data + + + elif not constant_change: + layer_spread = end_index - start_index + x_accel_hyst = round((accel_old - int(x_accel)) / layer_spread) + y_accel_hyst = round((accel_old - int(y_accel)) / layer_spread) + x_accel_start = round(round((accel_old - x_accel_hyst)/50)*50) + y_accel_start = round(round((accel_old - y_accel_hyst)/50)*50) + M201_limit_new = "M201 X" + str(x_accel_start) + " Y" + str(y_accel_start) + #Add Accel limit and new Jerk at start layer------------------------------------------------------------- + layer = data[start_index] + lines = layer.split("\n") + for index, line in enumerate(lines): + if lines[index].startswith(";LAYER:"): + lines.insert(index+1,M201_limit_new) + if self.getSettingValueByKey("jerk_enable"): + lines.insert(index+2,M205_jerk_new) + data[start_index] = "\n".join(lines) + break + for num in range(start_index + 1, end_index,1): + layer = data[num] + lines = layer.split("\n") + x_accel_start -= x_accel_hyst + if x_accel_start < int(x_accel): x_accel_start = int(x_accel) + y_accel_start -= y_accel_hyst + if y_accel_start < int(y_accel): y_accel_start = int(y_accel) + M201_limit_new = "M201 X" + str(round(round(x_accel_start/50)*50)) + " Y" + str(round(round(y_accel_start/50)*50)) + for index, line in enumerate(lines): + if line.startswith(";LAYER:"): + lines.insert(index+1, M201_limit_new) + continue + data[num] = "\n".join(lines) + #Alter any existing jerk lines. Accel lines can be ignored----------------------------------- + if self.getSettingValueByKey("jerk_enable"): + for num in range(start_index,len(data)-1,1): + layer = data[num] + lines = layer.split("\n") + for index, line in enumerate(lines): + if line.startswith("M205"): + lines[index] = re.sub(M205_jerk_pattern, M205_jerk_new, line) + data[num] = "\n".join(lines) + data[len(data)-1] = M201_limit_old + "\n" + M205_jerk_old + "\n" + data[len(data)-1] + return data \ No newline at end of file From fc159a2f5d56cb7ef01fa488802bffc4371cf63d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 01:56:23 +0200 Subject: [PATCH 02/34] Also make sure that the packaging tools can be run Contributes to CURA-8415 --- .github/workflows/macos.yml | 22 ++++++++++++++++++---- .github/workflows/windows.yml | 30 +++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4c77692cff..1b8eab877f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -242,27 +242,39 @@ jobs: f.writelines(f"`{package.key}/{package.version}`\n") - name: Archive the artifacts (bash) - run: tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}.tar.gz" "./dist/" + run: | + tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}.tar.gz" "./dist/" + tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}-package.tar.gz" "./cura_inst/packaging/" - - name: upload the tarred dist folder + - name: upload the tarred dist and packaging folder uses: actions/upload-artifact@v3 with: name: dist path: | ${{ steps.filename.outputs.INSTALLER_FILENAME }}.tar.gz + ${{ steps.filename.outputs.INSTALLER_FILENAME }}-package.tar.gz retention-days: 5 cura-installer-create-dmg: needs: [ cura-installer-create ] runs-on: macos-11 steps: + - name: Setup Python and pip + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-conan-package.txt + - name: Download the dist uses: actions/download-artifact@v3 with: name: dist - name: untar the dist folder - run: tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.tar.gz" + run: | + tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.tar.gz" + tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-package.tar.gz" - name: Remove Macos keychain (Bash) run: security delete-keychain signing_temp.keychain || true @@ -309,7 +321,9 @@ jobs: name: dist - name: untar the dist folder - run: tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.tar.gz" + run: | + tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.tar.gz" + tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-package.tar.gz" - name: Remove Macos keychain (Bash) run: security delete-keychain signing_temp.keychain || true diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f335605b91..37f7975129 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -199,29 +199,40 @@ jobs: for package in pkg_resources.working_set: f.writelines(f"`{package.key}/{package.version}`\n") - - name: Archive the artifacts (Powershell) - run: Compress-Archive -Path ".\dist" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip" + run: | + Compress-Archive -Path ".\dist" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip" + Compress-Archive -Path ".\cura_inst\packaging\" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}-packaging.zip" - - name: upload the zipped dist folder + - name: upload the zipped dist and packaging folder uses: actions/upload-artifact@v3 with: name: dist path: | ${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip + ${{ steps.filename.outputs.INSTALLER_FILENAME }}-packaging.zip retention-days: 5 cura-installer-create-exe: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: + - name: Setup Python and pip + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-conan-package.txt + - name: Download the zipped dist uses: actions/download-artifact@v3 with: name: dist - name: Extract the zipped dist - run: Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + run: | + Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-packaging.zip" -DestinationPath "." shell: powershell - name: Create PFX certificate from BASE64_PFX_CONTENT secret @@ -258,13 +269,22 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: + - name: Setup Python and pip + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-conan-package.txt + - name: Download the dist uses: actions/download-artifact@v3 with: name: dist - name: Extract the zipped dist - run: Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + run: | + Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-packaging.zip" -DestinationPath "." shell: powershell - name: Create PFX certificate from BASE64_PFX_CONTENT secret From 05ded4885e8dcbe26635d747b1861919273dbcea Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 02:00:53 +0200 Subject: [PATCH 03/34] inherit secrets Contributes to CURA-8415 --- .github/workflows/installers.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 283fc76ee5..ead3b7a87a 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -35,6 +35,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: windows-2022 + secrets: inherit linux-modern-installer: uses: ./.github/workflows/linux.yml @@ -45,6 +46,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: ubuntu-22.04 + secrets: inherit linux-legacy-installer: uses: ./.github/workflows/linux.yml @@ -55,6 +57,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: ubuntu-20.04 + secrets: inherit macos-installer: uses: ./.github/workflows/macos.yml @@ -65,6 +68,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: macos-11.0 + secrets: inherit macos-arm-installer: uses: ./.github/workflows/macos.yml @@ -74,4 +78,5 @@ jobs: enterprise: ${{ inputs.enterprise }} staging: ${{ inputs.staging }} architecture: ARM64 - operating_system: self-hosted \ No newline at end of file + operating_system: self-hosted + secrets: inherit \ No newline at end of file From cf97b97d9e6bdbd62f64f312b3383957f6f4cd29 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 02:13:25 +0200 Subject: [PATCH 04/34] don't cache pip Contributes to CURA-8415 --- .github/workflows/macos.yml | 9 ++++++--- .github/workflows/windows.yml | 8 ++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1b8eab877f..418e99c470 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -259,12 +259,10 @@ jobs: needs: [ cura-installer-create ] runs-on: macos-11 steps: - - name: Setup Python and pip + - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10.x' - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - name: Download the dist uses: actions/download-artifact@v3 @@ -315,6 +313,11 @@ jobs: needs: [ cura-installer-create ] runs-on: macos-11 steps: + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + - name: Download the dist uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 37f7975129..8c5cad9d68 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -217,12 +217,10 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: - - name: Setup Python and pip + - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10.x' - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - name: Download the zipped dist uses: actions/download-artifact@v3 @@ -269,12 +267,10 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: - - name: Setup Python and pip + - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10.x' - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - name: Download the dist uses: actions/download-artifact@v3 From deffdeb6427c1d4153851286ffe1f690554af6b0 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 02:42:17 +0200 Subject: [PATCH 05/34] checkout repo Contributes to CURA-8415 --- .github/workflows/macos.yml | 9 ++++++--- .github/workflows/windows.yml | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 418e99c470..024c64ad75 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -259,6 +259,9 @@ jobs: needs: [ cura-installer-create ] runs-on: macos-11 steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python uses: actions/setup-python@v4 with: @@ -313,6 +316,9 @@ jobs: needs: [ cura-installer-create ] runs-on: macos-11 steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python uses: actions/setup-python@v4 with: @@ -348,9 +354,6 @@ jobs: p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }} p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }} - - name: Install MacOS system requirements - run: brew install create-dmg - - name: Create the Macos dmg and pkg (Bash) run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_pkg --app_name "$CURA_APP_NAME" working-directory: dist diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8c5cad9d68..ef26baa8ad 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -217,6 +217,9 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python uses: actions/setup-python@v4 with: @@ -267,6 +270,9 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python uses: actions/setup-python@v4 with: From 365166e493c785949849628db9d19513631cfb5d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 03:01:53 +0200 Subject: [PATCH 06/34] few minor fixes Contributes to CURA-8415 --- .github/workflows/linux.yml | 1 - .github/workflows/macos.yml | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 42312219d6..70a15bcbb5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -179,7 +179,6 @@ jobs: run: | import os enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" - installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-${{ inputs.architecture }}" if "${{ inputs.operating_system }}" == "ubuntu-22.04": installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-${{ inputs.architecture }}" else: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 024c64ad75..e5e8ead2cd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -300,7 +300,7 @@ jobs: - name: Install MacOS system requirements run: brew install create-dmg - - name: Create the Macos dmg and pkg (Bash) + - name: Create the Macos dmg (Bash) run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_dmg --app_name "$CURA_APP_NAME" working-directory: dist @@ -354,7 +354,10 @@ jobs: p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }} p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }} - - name: Create the Macos dmg and pkg (Bash) + - name: Install MacOS system requirements + run: brew install create-dmg + + - name: Create the Macos pkg (Bash) run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_pkg --app_name "$CURA_APP_NAME" working-directory: dist From ddc4ec473e7604a155789c5fbb83203fe2f0d81f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 03:05:54 +0200 Subject: [PATCH 07/34] no trailing / Contributes to CURA-8415 --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ef26baa8ad..568a3c30de 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -202,7 +202,7 @@ jobs: - name: Archive the artifacts (Powershell) run: | Compress-Archive -Path ".\dist" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip" - Compress-Archive -Path ".\cura_inst\packaging\" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}-packaging.zip" + Compress-Archive -Path ".\cura_inst\packaging" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}-packaging.zip" - name: upload the zipped dist and packaging folder uses: actions/upload-artifact@v3 From 28afca187c1feec77f3a8bb555b9039725435ae0 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 03:22:19 +0200 Subject: [PATCH 08/34] Nightlies Contributes to CURA-9494 --- .github/workflows/installers.yml | 103 ++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index ead3b7a87a..a0e11f63eb 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -24,6 +24,16 @@ on: default: false required: true type: boolean + nightly: + description: 'Upload to nightly release' + default: false + required: true + type: boolean + +env: + CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }} + ENTERPRISE: ${{ inputs.enterprise }} + STAGING: ${{ inputs.staging }} jobs: windows-installer: @@ -79,4 +89,95 @@ jobs: staging: ${{ inputs.staging }} architecture: ARM64 operating_system: self-hosted - secrets: inherit \ No newline at end of file + secrets: inherit + + update-nightly-release: + runs-on: ubuntu-latest + needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] + steps: + + - name: Output the name file name and extension + id: filename + shell: python + run: | + import os + enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" + linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64-AppImage" + linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64-AppImage" + mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-dmg" + mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-pkg" + mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-dmg" + mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-pkg" + win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-msi + win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-exe" + 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"LINUX_MODERN={linux_modern}\n") + f.writelines(f"LINUX_LEGACY={linux_legacy}\n") + f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") + f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n") + f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") + f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") + f.writelines(f"WIN_MSI={win_msi}\n") + f.writelines(f"WIN_EXE={win_exe}\n") + + - name: Download linux modern installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.LINUX_MODERN }} + path: installers + + - name: Download linux legacy installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.LINUX_LEGACY }} + path: installers + + - name: Download mac x64 dmg installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.MAC_X64_DMG }} + path: installers + + - name: Download mac x64 pkg installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.MAC_X64_PKG }} + path: installers + + - name: Download mac arm dmg installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.MAC_ARM_DMG }} + path: installers + + - name: Download mac arm pkg installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.MAC_ARM_PKG }} + path: installers + + - name: Download win msi installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.WIN_MSI }} + path: installers + + - name: Download win exe installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.WIN_EXE }} + path: installers + + - name: Update nightly release + uses: pyTooling/Actions/releaser@main + with: + tag: nightly + rm: true + token: ${{ secrets.GITHUB_TOKEN }} + files: installers/*.* \ No newline at end of file From 76787b9898936cb7617bd34887263f0afe66c63b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 03:31:48 +0200 Subject: [PATCH 09/34] Update installers.yml for nightly release option Added a conditional statement for optionally triggering nightly releases in the installer workflow. This change allows us to initiate automatic nightly builds only when required, contributing to efficiency and resource utilization optimization. This is linked to Jira task CURA-9494. --- .github/workflows/installers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index a0e11f63eb..1a3a96bae0 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -92,6 +92,7 @@ jobs: secrets: inherit update-nightly-release: + if: ${{ inputs.nightly }} runs-on: ubuntu-latest needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] steps: From ae33d03eb25faa3d7fc7ed5a4e83e60a021ffa2a Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 19 Aug 2023 08:42:27 -0400 Subject: [PATCH 10/34] Update LimitXYAccelJerk.py Add Exit for Ultimaker printers. Add notice that Accel is not-extruder specific. Changed variable names to lower case. --- .../scripts/LimitXYAccelJerk.py | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py b/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py index 8932d8e4ea..d50726fc76 100644 --- a/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py +++ b/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py @@ -9,6 +9,10 @@ from ..Script import Script from cura.CuraApplication import CuraApplication import re +<<<<<<< Updated upstream +======= +from UM.Message import Message +>>>>>>> Stashed changes class LimitXYAccelJerk(Script): def __init__(self): @@ -16,13 +20,18 @@ class LimitXYAccelJerk(Script): def initialize(self) -> None: super().initialize() +<<<<<<< Updated upstream # Get the Accel and Jerk and set the values in the setting boxes--------------------------------------------- +======= + # Get the Accel and Jerk and set the values in the setting boxes-- +>>>>>>> Stashed changes mycura = CuraApplication.getInstance().getGlobalContainerStack() extruder = mycura.extruderList accel_print = extruder[0].getProperty("acceleration_print", "value") accel_travel = extruder[0].getProperty("acceleration_travel", "value") jerk_print_old = extruder[0].getProperty("jerk_print", "value") jerk_travel_old = extruder[0].getProperty("jerk_travel", "value") +<<<<<<< Updated upstream self._instance.setProperty("X_accel_limit", "value", round(accel_print)) self._instance.setProperty("Y_accel_limit", "value", round(accel_print)) self._instance.setProperty("X_jerk", "value", jerk_print_old) @@ -31,12 +40,36 @@ class LimitXYAccelJerk(Script): def getSettingDataString(self): return """{ "name": "Limit the X-Y Accel/Jerk", +======= + self._instance.setProperty("x_accel_limit", "value", round(accel_print)) + self._instance.setProperty("y_accel_limit", "value", round(accel_print)) + self._instance.setProperty("x_jerk", "value", jerk_print_old) + self._instance.setProperty("y_jerk", "value", jerk_print_old) + ext_count = int(mycura.getProperty("machine_extruder_count", "value")) + machine_name = str(mycura.getProperty("machine_name", "value")) + + # Warn the user if the printer is an Ultimaker------------------------- + if "Ultimaker" in machine_name: + Message(text = " [Limit the X-Y Accel/Jerk] WILL NOT RUN because Ultimaker printers have fixed beds (it is intended for 'bed slinger' printers only.").show() + + # Warn the user if the printer is multi-extruder------------------ + if ext_count > 1: + Message(text = " 'Limit the X-Y Accel/Jerk': The post processor treats all extruders the same. If you have multiple extruders they will all be subject to the same Accel and Jerk limits imposed. If you have different Travel and Print Accel they will be subject to the same limit. If that is not acceptable then you should not use this Post Processor.").show() + + def getSettingDataString(self): + return """{ + "name": "Limit the X-Y Accel/Jerk (all extruders equal)", +>>>>>>> Stashed changes "key": "LimitXYAccelJerk", "metadata": {}, "version": 2, "settings": { +<<<<<<< Updated upstream "X_accel_limit": +======= + "x_accel_limit": +>>>>>>> Stashed changes { "label": "X MAX Acceleration", "description": "If this number is lower than the 'X Print Accel' in Cura then this will limit the Accel on the X axis. Enter the Maximum Acceleration value for the X axis. This will affect both Print and Travel Accel. If you enable an End Layer then at the end of that layer the Accel Limit will be reset (unless you choose 'Gradual' in which case the new limit goes to the top layer).", @@ -46,7 +79,11 @@ class LimitXYAccelJerk(Script): "unit": "mm/sec² ", "default_value": 500 }, +<<<<<<< Updated upstream "Y_accel_limit": +======= + "y_accel_limit": +>>>>>>> Stashed changes { "label": "Y MAX Acceleration", "description": "If this number is lower than the Y accel in Cura then this will limit the Accel on the Y axis. Enter the Maximum Acceleration value for the Y axis. This will affect both Print and Travel Accel. If you enable an End Layer then at the end of that layer the Accel Limit will be reset (unless you choose 'Gradual' in which case the new limit goes to the top layer).", @@ -64,7 +101,11 @@ class LimitXYAccelJerk(Script): "enabled": true, "default_value": false }, +<<<<<<< Updated upstream "X_jerk": +======= + "x_jerk": +>>>>>>> Stashed changes { "label": " X jerk", "description": "Enter the Jerk value for the X axis. Enter '0' to use the existing X Jerk. This setting will affect both the Print and Travel jerk.", @@ -73,7 +114,11 @@ class LimitXYAccelJerk(Script): "unit": "mm/sec ", "default_value": 8 }, +<<<<<<< Updated upstream "Y_jerk": +======= + "y_jerk": +>>>>>>> Stashed changes { "label": " Y jerk", "description": "Enter the Jerk value for the Y axis. Enter '0' to use the existing Y Jerk. This setting will affect both the Print and Travel jerk.", @@ -136,6 +181,17 @@ class LimitXYAccelJerk(Script): def execute(self, data): mycura = CuraApplication.getInstance().getGlobalContainerStack() extruder = mycura.extruderList +<<<<<<< Updated upstream +======= + machine_name = str(mycura.getProperty("machine_name", "value")) + + # Exit if the printer is an Ultimaker------------------------- + if "Ultimaker" in machine_name: + Message(text = " [Limit the X-Y Accel/Jerk] DID NOT RUN. This post processor is not intended for fixed printers (for 'bed slinger' printers only.").show() + data[0] += "; [LimitXYAccelJerk] DID NOT RUN because the printer doesn't have a sliding bed.\n" + return data + +>>>>>>> Stashed changes constant_change = not bool(self.getSettingValueByKey("gradient_change")) accel_print_enabled = bool(extruder[0].getProperty("acceleration_enabled", "value")) accel_travel_enabled = bool(extruder[0].getProperty("acceleration_travel_enabled", "value")) @@ -145,6 +201,10 @@ class LimitXYAccelJerk(Script): jerk_travel_enabled = str(extruder[0].getProperty("jerk_travel_enabled", "value")) jerk_print_old = extruder[0].getProperty("jerk_print", "value") jerk_travel_old = extruder[0].getProperty("jerk_travel", "value") +<<<<<<< Updated upstream +======= + +>>>>>>> Stashed changes if int(accel_print) >= int(accel_travel): accel_old = accel_print else: @@ -156,10 +216,17 @@ class LimitXYAccelJerk(Script): jerk_old = jerk_travel_old #Set the new Accel values--------------------------------------------------------------------------------- +<<<<<<< Updated upstream x_accel = str(self.getSettingValueByKey("X_accel_limit")) y_accel = str(self.getSettingValueByKey("Y_accel_limit")) x_jerk = int(self.getSettingValueByKey("X_jerk")) y_jerk = int(self.getSettingValueByKey("Y_jerk")) +======= + x_accel = str(self.getSettingValueByKey("x_accel_limit")) + y_accel = str(self.getSettingValueByKey("y_accel_limit")) + x_jerk = int(self.getSettingValueByKey("x_jerk")) + y_jerk = int(self.getSettingValueByKey("y_jerk")) +>>>>>>> Stashed changes # Put the strings together M201_limit_new = "M201 X" + x_accel + " Y" + y_accel M201_limit_old = "M201 X" + str(round(accel_old)) + " Y" + str(round(accel_old)) @@ -227,6 +294,7 @@ class LimitXYAccelJerk(Script): all else: data[len(data)-1] = M201_limit_old + "\n" + M205_jerk_old + "\n" + data[len(data)-1] +<<<<<<< Updated upstream return data @@ -236,6 +304,29 @@ class LimitXYAccelJerk(Script): y_accel_hyst = round((accel_old - int(y_accel)) / layer_spread) x_accel_start = round(round((accel_old - x_accel_hyst)/50)*50) y_accel_start = round(round((accel_old - y_accel_hyst)/50)*50) +======= + return data + + elif not constant_change: + layer_spread = end_index - start_index + if accel_old >= int(x_accel): + x_accel_hyst = round((accel_old - int(x_accel)) / layer_spread) + else: + x_accel_hyst = round((int(x_accel) - accel_old) / layer_spread) + if accel_old >= int(y_accel): + y_accel_hyst = round((accel_old - int(y_accel)) / layer_spread) + else: + y_accel_hyst = round((int(y_accel) - accel_old) / layer_spread) + + if accel_old >= int(x_accel): + x_accel_start = round(round((accel_old - x_accel_hyst)/25)*25) + else: + x_accel_start = round(round((x_accel_hyst + accel_old)/25)*25) + if accel_old >= int(y_accel): + y_accel_start = round(round((accel_old - y_accel_hyst)/25)*25) + else: + y_accel_start = round(round((y_accel_hyst + accel_old)/25)*25) +>>>>>>> Stashed changes M201_limit_new = "M201 X" + str(x_accel_start) + " Y" + str(y_accel_start) #Add Accel limit and new Jerk at start layer------------------------------------------------------------- layer = data[start_index] @@ -250,11 +341,27 @@ class LimitXYAccelJerk(Script): for num in range(start_index + 1, end_index,1): layer = data[num] lines = layer.split("\n") +<<<<<<< Updated upstream x_accel_start -= x_accel_hyst if x_accel_start < int(x_accel): x_accel_start = int(x_accel) y_accel_start -= y_accel_hyst if y_accel_start < int(y_accel): y_accel_start = int(y_accel) M201_limit_new = "M201 X" + str(round(round(x_accel_start/50)*50)) + " Y" + str(round(round(y_accel_start/50)*50)) +======= + if accel_old >= int(x_accel): + x_accel_start -= x_accel_hyst + if x_accel_start < int(x_accel): x_accel_start = int(x_accel) + else: + x_accel_start += x_accel_hyst + if x_accel_start > int(x_accel): x_accel_start = int(x_accel) + if accel_old >= int(y_accel): + y_accel_start -= y_accel_hyst + if y_accel_start < int(y_accel): y_accel_start = int(y_accel) + else: + y_accel_start += y_accel_hyst + if y_accel_start > int(y_accel): y_accel_start = int(y_accel) + M201_limit_new = "M201 X" + str(round(round(x_accel_start/25)*25)) + " Y" + str(round(round(y_accel_start/25)*25)) +>>>>>>> Stashed changes for index, line in enumerate(lines): if line.startswith(";LAYER:"): lines.insert(index+1, M201_limit_new) From 43036953162739d77ec4a274cd45b59b16cffcec Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 14:08:00 +0200 Subject: [PATCH 11/34] Add automatic scheduled updates for nightly release A daily schedule for the update-nightly-release workflow was added. Now, apart from when the 'nightly' input is set to true, the release update will be triggered everyday at 5:20 CET. This functionality allows more up to date releases without manual input. Also, installer file names were updated and it now includes the daily creation timestamp which provides visibility on when the nightly build was generated. Contributes to CURA-9494 --- .github/workflows/installers.yml | 89 +++++++++++++++++++++++--------- .github/workflows/linux.yml | 15 ++++++ .github/workflows/macos.yml | 15 ++++++ .github/workflows/windows.yml | 15 ++++++ 4 files changed, 111 insertions(+), 23 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 1a3a96bae0..451387eddd 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -29,6 +29,9 @@ on: default: false required: true type: boolean + schedule: + # Daily at 5:20 CET + - cron: '20 4 * * *' env: CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }} @@ -91,26 +94,41 @@ jobs: operating_system: self-hosted secrets: inherit + # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: - if: ${{ inputs.nightly }} + if: ${{ inputs.nightly == 'true' || github.event_name == 'schedule' }} runs-on: ubuntu-latest needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download the run info + uses: actions/download-artifact@v2 + with: + name: macos-run-info + + - name: Set the run info as environment variables + run: | + . run_info.sh - name: Output the name file name and extension id: filename shell: python run: | import os + import datetime enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" - linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64-AppImage" - linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64-AppImage" - mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-dmg" - mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-pkg" - mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-dmg" - mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-pkg" - win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-msi - win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-exe" + linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" + linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" + mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" + mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" + mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" + mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" + win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" + win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" + nightly_name = "UltiMaker-Cura-" + os.getenv('CURA_VERSION_FULL').split("+")[0] + nightly_creation_time = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) output_env = os.environ["GITHUB_OUTPUT"] content = "" if os.path.exists(output_env): @@ -126,59 +144,84 @@ jobs: f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") f.writelines(f"WIN_MSI={win_msi}\n") f.writelines(f"WIN_EXE={win_exe}\n") + f.writelines(f"NIGHTLY_NAME={nightly_name}\n") + f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.LINUX_MODERN }} + name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.LINUX_LEGACY }} + name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage path: installers - name: Download mac x64 dmg installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.MAC_X64_DMG }} + name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg path: installers - name: Download mac x64 pkg installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.MAC_X64_PKG }} + name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg path: installers - name: Download mac arm dmg installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.MAC_ARM_DMG }} + name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg path: installers - name: Download mac arm pkg installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.MAC_ARM_PKG }} + name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg path: installers - name: Download win msi installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.WIN_MSI }} + name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.WIN_EXE }} + name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers + - name: Rename installers to nightlies + run: | + mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage + mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage + mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg + mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg + mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg + mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg + mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi + mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe + - name: Update nightly release - uses: pyTooling/Actions/releaser@main - with: - tag: nightly - rm: true - token: ${{ secrets.GITHUB_TOKEN }} - files: installers/*.* \ No newline at end of file + run: | + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release description (with date) + run: | + gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}-alpha" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4d58dcee34..7f68aed0b4 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -252,6 +252,21 @@ jobs: dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage retention-days: 5 + - name: Write the run info + shell: python + run: | + import os + with open("run_info.sh", "w") as f: + f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n') + + - name: Upload the run info + uses: actions/upload-artifact@v3 + with: + name: linux-run-info + path: | + run_info.sh + retention-days: 5 + notify-export: if: ${{ always() }} needs: [ cura-installer-create ] diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4690d27878..6ba952d6bd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -259,6 +259,21 @@ jobs: dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.pkg retention-days: 5 + - name: Write the run info + shell: python + run: | + import os + with open("run_info.sh", "w") as f: + f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n') + + - name: Upload the run info + uses: actions/upload-artifact@v3 + with: + name: macos-run-info + path: | + run_info.sh + retention-days: 5 + notify-export: if: ${{ always() }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 88d9d84e94..9844d7724c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -251,6 +251,21 @@ jobs: dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.exe retention-days: 5 + - name: Write the run info + shell: python + run: | + import os + with open("run_info.sh", "w") as f: + f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n') + + - name: Upload the run info + uses: actions/upload-artifact@v3 + with: + name: windows-run-info + path: | + run_info.sh + retention-days: 5 + notify-export: if: ${{ always() }} needs: [ cura-installer-create ] From d90da61f44199fe688dbc30bd5f216182d5f2dc3 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 18:20:25 +0200 Subject: [PATCH 12/34] Fixed nighlty title alpha Contributes to CURA-9494 --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 451387eddd..169d6af22a 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -221,7 +221,7 @@ jobs: - name: Update nightly release description (with date) run: | - gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}-alpha" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}" + gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ac60b59da592eaea08af8d969a06f59c80002ca1 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 18:53:25 +0200 Subject: [PATCH 13/34] Fixed nightlies run check Contributes to CURA-9494 --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 169d6af22a..96b67a0541 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -96,7 +96,7 @@ jobs: # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: - if: ${{ inputs.nightly == 'true' || github.event_name == 'schedule' }} + if: ${{ inputs.nightly || github.event_name == 'schedule' }} runs-on: ubuntu-latest needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] steps: From 7efe485f65f31dc5e58a2c10cd298a7f4d9b0dc2 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 19:24:38 +0200 Subject: [PATCH 14/34] Show version in Title bar except for actual releases Contributes to CURA-9494 --- cura/CuraApplication.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 64d88d13dc..e81584660a 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -50,6 +50,7 @@ from UM.Settings.Validator import Validator from UM.View.SelectionPass import SelectionPass # For typing. from UM.Workspace.WorkspaceReader import WorkspaceReader from UM.i18n import i18nCatalog +from UM.Version import Version from cura import ApplicationMetadata from cura.API import CuraAPI from cura.API.Account import Account @@ -614,6 +615,9 @@ class CuraApplication(QtApplication): def _onEngineCreated(self): self._qml_engine.addImageProvider("print_job_preview", PrintJobPreviewImageProvider.PrintJobPreviewImageProvider()) + version = Version(self.getVersion()) + if version.hasPostFix(): + self._qml_engine.rootObjects()[0].setTitle(f"{ApplicationMetadata.CuraAppDisplayName} {ApplicationMetadata.CuraVersion}") @pyqtProperty(bool) def needToShowUserAgreement(self) -> bool: From 6424c26f782a9ec3dcccfd24dc8b81e543c28aed Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 19:41:58 +0200 Subject: [PATCH 15/34] Show warning message when using nightly build Only shown in builds, for alpha versions Contributes to CURA-9494 --- cura/CuraApplication.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index e81584660a..44ea69bd74 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -616,8 +616,15 @@ class CuraApplication(QtApplication): def _onEngineCreated(self): self._qml_engine.addImageProvider("print_job_preview", PrintJobPreviewImageProvider.PrintJobPreviewImageProvider()) version = Version(self.getVersion()) - if version.hasPostFix(): + if hasattr(sys, "frozen") and version.hasPostFix() and "beta" not in version.getPostfixType(): self._qml_engine.rootObjects()[0].setTitle(f"{ApplicationMetadata.CuraAppDisplayName} {ApplicationMetadata.CuraVersion}") + message = Message( + self._i18n_catalog.i18nc("@info:warning", + f"This version is not intended for production use. If you encounter any issues, please report them on our GitHub page, mentioning the full version {self.getVersion()}"), + lifetime = 0, + title = self._i18n_catalog.i18nc("@info:title", "Nightly build"), + message_type = Message.MessageType.WARNING) + message.show() @pyqtProperty(bool) def needToShowUserAgreement(self) -> bool: From 8f0fb5ef12f72b63223b28cd8fc3f358f36a29bc Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Tue, 29 Aug 2023 07:51:58 -0400 Subject: [PATCH 16/34] Update LimitXYAccelJerk.py Changes made per Rburema requests. --- .../scripts/LimitXYAccelJerk.py | 174 ++++++------------ 1 file changed, 60 insertions(+), 114 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py b/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py index d50726fc76..b47a5876d8 100644 --- a/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py +++ b/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py @@ -5,42 +5,26 @@ # The existing M201 Max Accel will be changed to limit the Y (and/or X) accel at the printer. If you have Accel enabled in Cura and the XY Accel is set to 3000 then setting the Y limit to 1000 will result in the printer limiting the Y to 1000. This can keep tall skinny prints from breaking loose of the bed and failing. The script was not tested with Junction Deviation. # If enabled - the Jerk setting is changed line-by-line within the gcode as there is no "limit" on Jerk. # if 'Gradual ACCEL change' is enabled then the Accel is changed gradually from the Start to the End layer and that will be the final Accel setting in the file. If 'Gradual' is enabled then the Jerk settings will continue to be changed to the end of the file (rather than ending at the End layer). +# This post is intended for printers with moving beds (bed slingers) so UltiMaker printers are excluded. +# When setting an accel limit on multi-extruder printers ALL extruders are effected. +# This post does not distinguish between Print Accel and Travel Accel. The limit is the limit for all regardless. Example: Skin Accel = 1000 and Outer Wall accel = 500. If the limit is set to 300 then both Skin and Outer Wall will be Accel = 300. from ..Script import Script from cura.CuraApplication import CuraApplication import re -<<<<<<< Updated upstream -======= from UM.Message import Message ->>>>>>> Stashed changes class LimitXYAccelJerk(Script): - def __init__(self): - super().__init__() def initialize(self) -> None: super().initialize() -<<<<<<< Updated upstream - # Get the Accel and Jerk and set the values in the setting boxes--------------------------------------------- -======= # Get the Accel and Jerk and set the values in the setting boxes-- ->>>>>>> Stashed changes mycura = CuraApplication.getInstance().getGlobalContainerStack() extruder = mycura.extruderList accel_print = extruder[0].getProperty("acceleration_print", "value") accel_travel = extruder[0].getProperty("acceleration_travel", "value") jerk_print_old = extruder[0].getProperty("jerk_print", "value") jerk_travel_old = extruder[0].getProperty("jerk_travel", "value") -<<<<<<< Updated upstream - self._instance.setProperty("X_accel_limit", "value", round(accel_print)) - self._instance.setProperty("Y_accel_limit", "value", round(accel_print)) - self._instance.setProperty("X_jerk", "value", jerk_print_old) - self._instance.setProperty("Y_jerk", "value", jerk_print_old) - - def getSettingDataString(self): - return """{ - "name": "Limit the X-Y Accel/Jerk", -======= self._instance.setProperty("x_accel_limit", "value", round(accel_print)) self._instance.setProperty("y_accel_limit", "value", round(accel_print)) self._instance.setProperty("x_jerk", "value", jerk_print_old) @@ -50,26 +34,31 @@ class LimitXYAccelJerk(Script): # Warn the user if the printer is an Ultimaker------------------------- if "Ultimaker" in machine_name: - Message(text = " [Limit the X-Y Accel/Jerk] WILL NOT RUN because Ultimaker printers have fixed beds (it is intended for 'bed slinger' printers only.").show() + Message(text = " [Limit the X-Y Accel/Jerk] DID NOT RUN because Ultimaker printers don't have sliding beds.").show() # Warn the user if the printer is multi-extruder------------------ if ext_count > 1: - Message(text = " 'Limit the X-Y Accel/Jerk': The post processor treats all extruders the same. If you have multiple extruders they will all be subject to the same Accel and Jerk limits imposed. If you have different Travel and Print Accel they will be subject to the same limit. If that is not acceptable then you should not use this Post Processor.").show() + Message(text = " 'Limit the X-Y Accel/Jerk': The post processor treats all extruders the same. If you have multiple extruders they will all be subject to the same Accel and Jerk limits imposed. If you have different Travel and Print Accel they will also be subject to the same limits. If that is not acceptable then you should not use this Post Processor.").show() def getSettingDataString(self): return """{ "name": "Limit the X-Y Accel/Jerk (all extruders equal)", ->>>>>>> Stashed changes "key": "LimitXYAccelJerk", "metadata": {}, "version": 2, "settings": { -<<<<<<< Updated upstream - "X_accel_limit": -======= + "type_of_change": + { + "label": "Immediate or Gradual change", + "description": "An 'Immediate' change will insert the new numbers immediately at the Start Layer. A 'Gradual' change will transition from the starting Accel to the new Accel limit across a range of layers.", + "type": "enum", + "options": { + "immediate_change": "Immediate", + "gradual_change": "Gradual"}, + "default_value": "immediate_change" + }, "x_accel_limit": ->>>>>>> Stashed changes { "label": "X MAX Acceleration", "description": "If this number is lower than the 'X Print Accel' in Cura then this will limit the Accel on the X axis. Enter the Maximum Acceleration value for the X axis. This will affect both Print and Travel Accel. If you enable an End Layer then at the end of that layer the Accel Limit will be reset (unless you choose 'Gradual' in which case the new limit goes to the top layer).", @@ -79,11 +68,7 @@ class LimitXYAccelJerk(Script): "unit": "mm/sec² ", "default_value": 500 }, -<<<<<<< Updated upstream - "Y_accel_limit": -======= "y_accel_limit": ->>>>>>> Stashed changes { "label": "Y MAX Acceleration", "description": "If this number is lower than the Y accel in Cura then this will limit the Accel on the Y axis. Enter the Maximum Acceleration value for the Y axis. This will affect both Print and Travel Accel. If you enable an End Layer then at the end of that layer the Accel Limit will be reset (unless you choose 'Gradual' in which case the new limit goes to the top layer).", @@ -101,11 +86,7 @@ class LimitXYAccelJerk(Script): "enabled": true, "default_value": false }, -<<<<<<< Updated upstream - "X_jerk": -======= "x_jerk": ->>>>>>> Stashed changes { "label": " X jerk", "description": "Enter the Jerk value for the X axis. Enter '0' to use the existing X Jerk. This setting will affect both the Print and Travel jerk.", @@ -114,11 +95,7 @@ class LimitXYAccelJerk(Script): "unit": "mm/sec ", "default_value": 8 }, -<<<<<<< Updated upstream - "Y_jerk": -======= "y_jerk": ->>>>>>> Stashed changes { "label": " Y jerk", "description": "Enter the Jerk value for the Y axis. Enter '0' to use the existing Y Jerk. This setting will affect both the Print and Travel jerk.", @@ -135,7 +112,7 @@ class LimitXYAccelJerk(Script): "default_value": 1, "minimum_value": 1, "unit": "Lay# ", - "enabled": "not gradient_change" + "enabled": "type_of_change == 'immediate_change'" }, "end_layer": { @@ -145,15 +122,7 @@ class LimitXYAccelJerk(Script): "default_value": -1, "minimum_value": -1, "unit": "Lay# ", - "enabled": "not gradient_change" - }, - "gradient_change": - { - "label": "Gradual ACCEL Change", - "description": "Gradually change the Accel numbers 'From layer' - 'To Layer'. If Jerk is enabled the Jerk changes are not 'Gradual' because there is no Max Jerk setting. Unlike Constant change - using 'Gradual' the Accel and Jerk change continues from the End Layer to the end of the file.", - "type": "bool", - "default_value": false, - "enabled": true + "enabled": "type_of_change == 'immediate_change'" }, "gradient_start_layer": { @@ -163,7 +132,7 @@ class LimitXYAccelJerk(Script): "default_value": 1, "minimum_value": 1, "unit": "Lay# ", - "enabled": "gradient_change" + "enabled": "type_of_change == 'gradual_change'" }, "gradient_end_layer": { @@ -173,7 +142,7 @@ class LimitXYAccelJerk(Script): "default_value": -1, "minimum_value": -1, "unit": "Lay# ", - "enabled": "gradient_change" + "enabled": "type_of_change == 'gradual_change'" } } }""" @@ -181,18 +150,22 @@ class LimitXYAccelJerk(Script): def execute(self, data): mycura = CuraApplication.getInstance().getGlobalContainerStack() extruder = mycura.extruderList -<<<<<<< Updated upstream -======= machine_name = str(mycura.getProperty("machine_name", "value")) + print_sequence = str(mycura.getProperty("print_sequence", "value")) + + # Exit if 'one_at_a_time' is enabled------------------------- + if print_sequence == "one_at_a_time": + Message(text = " [Limit the X-Y Accel/Jerk] DID NOT RUN. This post processor is not compatible with 'One-at-a-Time' mode.").show() + data[0] += "; [LimitXYAccelJerk] DID NOT RUN because Cura is set to 'One-at-a-Time' mode.\n" + return data # Exit if the printer is an Ultimaker------------------------- if "Ultimaker" in machine_name: - Message(text = " [Limit the X-Y Accel/Jerk] DID NOT RUN. This post processor is not intended for fixed printers (for 'bed slinger' printers only.").show() + Message(text = " [Limit the X-Y Accel/Jerk] DID NOT RUN. This post processor is for bed slinger printers only.").show() data[0] += "; [LimitXYAccelJerk] DID NOT RUN because the printer doesn't have a sliding bed.\n" return data ->>>>>>> Stashed changes - constant_change = not bool(self.getSettingValueByKey("gradient_change")) + type_of_change = str(self.getSettingValueByKey("type_of_change")) accel_print_enabled = bool(extruder[0].getProperty("acceleration_enabled", "value")) accel_travel_enabled = bool(extruder[0].getProperty("acceleration_travel_enabled", "value")) accel_print = extruder[0].getProperty("acceleration_print", "value") @@ -201,10 +174,7 @@ class LimitXYAccelJerk(Script): jerk_travel_enabled = str(extruder[0].getProperty("jerk_travel_enabled", "value")) jerk_print_old = extruder[0].getProperty("jerk_print", "value") jerk_travel_old = extruder[0].getProperty("jerk_travel", "value") -<<<<<<< Updated upstream -======= ->>>>>>> Stashed changes if int(accel_print) >= int(accel_travel): accel_old = accel_print else: @@ -215,34 +185,29 @@ class LimitXYAccelJerk(Script): else: jerk_old = jerk_travel_old - #Set the new Accel values--------------------------------------------------------------------------------- -<<<<<<< Updated upstream - x_accel = str(self.getSettingValueByKey("X_accel_limit")) - y_accel = str(self.getSettingValueByKey("Y_accel_limit")) - x_jerk = int(self.getSettingValueByKey("X_jerk")) - y_jerk = int(self.getSettingValueByKey("Y_jerk")) -======= + #Set the new Accel values---------------------------------------------------------- x_accel = str(self.getSettingValueByKey("x_accel_limit")) y_accel = str(self.getSettingValueByKey("y_accel_limit")) x_jerk = int(self.getSettingValueByKey("x_jerk")) y_jerk = int(self.getSettingValueByKey("y_jerk")) ->>>>>>> Stashed changes - # Put the strings together - M201_limit_new = "M201 X" + x_accel + " Y" + y_accel - M201_limit_old = "M201 X" + str(round(accel_old)) + " Y" + str(round(accel_old)) + + # Put the strings together------------------------------------------- + m201_limit_new = "M201 X" + x_accel + " Y" + y_accel + m201_limit_old = "M201 X" + str(round(accel_old)) + " Y" + str(round(accel_old)) if x_jerk == 0: - M205_jerk_pattern = "Y(\d*)" - M205_jerk_new = "Y" + str(y_jerk) + m205_jerk_pattern = "Y(\d*)" + m205_jerk_new = "Y" + str(y_jerk) if y_jerk == 0: - M205_jerk_pattern = "X(\d*)" - M205_jerk_new = "X" + str(x_jerk) + m205_jerk_pattern = "X(\d*)" + m205_jerk_new = "X" + str(x_jerk) if x_jerk != 0 and y_jerk != 0: - M205_jerk_pattern = "M205 X(\d*) Y(\d*)" - M205_jerk_new = "M205 X" + str(x_jerk) + " Y" + str(y_jerk) - M205_jerk_old = "M205 X" + str(jerk_old) + " Y" + str(jerk_old) - + m205_jerk_pattern = "M205 X(\d*) Y(\d*)" + m205_jerk_new = "M205 X" + str(x_jerk) + " Y" + str(y_jerk) + m205_jerk_old = "M205 X" + str(jerk_old) + " Y" + str(jerk_old) + type_of_change = self.getSettingValueByKey("type_of_change") + #Get the indexes of the start and end layers---------------------------------------- - if constant_change: + if type_of_change == 'immediate_change': start_layer = int(self.getSettingValueByKey("start_layer"))-1 end_layer = int(self.getSettingValueByKey("end_layer")) else: @@ -264,14 +229,14 @@ class LimitXYAccelJerk(Script): end_index = len(data)-2 #Add Accel limit and new Jerk at start layer----------------------------------------------------- - if constant_change: + if type_of_change == "immediate_change": layer = data[start_index] lines = layer.split("\n") for index, line in enumerate(lines): if lines[index].startswith(";LAYER:"): - lines.insert(index+1,M201_limit_new) + lines.insert(index+1,m201_limit_new) if self.getSettingValueByKey("jerk_enable"): - lines.insert(index+2,M205_jerk_new) + lines.insert(index+2,m205_jerk_new) data[start_index] = "\n".join(lines) break @@ -281,33 +246,22 @@ class LimitXYAccelJerk(Script): lines = layer.split("\n") for index, line in enumerate(lines): if line.startswith("M205"): - lines[index] = re.sub(M205_jerk_pattern, M205_jerk_new, line) + lines[index] = re.sub(m205_jerk_pattern, m205_jerk_new, line) data[num] = "\n".join(lines) if end_layer != -1: try: layer = data[end_index-1] lines = layer.split("\n") - lines.insert(len(lines)-2,M201_limit_old) - lines.insert(len(lines)-2,M205_jerk_old) + lines.insert(len(lines)-2,m201_limit_old) + lines.insert(len(lines)-2,m205_jerk_old) data[end_index-1] = "\n".join(lines) except: all else: - data[len(data)-1] = M201_limit_old + "\n" + M205_jerk_old + "\n" + data[len(data)-1] -<<<<<<< Updated upstream - return data - - - elif not constant_change: - layer_spread = end_index - start_index - x_accel_hyst = round((accel_old - int(x_accel)) / layer_spread) - y_accel_hyst = round((accel_old - int(y_accel)) / layer_spread) - x_accel_start = round(round((accel_old - x_accel_hyst)/50)*50) - y_accel_start = round(round((accel_old - y_accel_hyst)/50)*50) -======= + data[len(data)-1] = m201_limit_old + "\n" + m205_jerk_old + "\n" + data[len(data)-1] return data - elif not constant_change: + elif type_of_change == "gradual_change": layer_spread = end_index - start_index if accel_old >= int(x_accel): x_accel_hyst = round((accel_old - int(x_accel)) / layer_spread) @@ -326,28 +280,20 @@ class LimitXYAccelJerk(Script): y_accel_start = round(round((accel_old - y_accel_hyst)/25)*25) else: y_accel_start = round(round((y_accel_hyst + accel_old)/25)*25) ->>>>>>> Stashed changes - M201_limit_new = "M201 X" + str(x_accel_start) + " Y" + str(y_accel_start) + m201_limit_new = "M201 X" + str(x_accel_start) + " Y" + str(y_accel_start) #Add Accel limit and new Jerk at start layer------------------------------------------------------------- layer = data[start_index] lines = layer.split("\n") for index, line in enumerate(lines): if lines[index].startswith(";LAYER:"): - lines.insert(index+1,M201_limit_new) + lines.insert(index+1,m201_limit_new) if self.getSettingValueByKey("jerk_enable"): - lines.insert(index+2,M205_jerk_new) + lines.insert(index+2,m205_jerk_new) data[start_index] = "\n".join(lines) break for num in range(start_index + 1, end_index,1): layer = data[num] lines = layer.split("\n") -<<<<<<< Updated upstream - x_accel_start -= x_accel_hyst - if x_accel_start < int(x_accel): x_accel_start = int(x_accel) - y_accel_start -= y_accel_hyst - if y_accel_start < int(y_accel): y_accel_start = int(y_accel) - M201_limit_new = "M201 X" + str(round(round(x_accel_start/50)*50)) + " Y" + str(round(round(y_accel_start/50)*50)) -======= if accel_old >= int(x_accel): x_accel_start -= x_accel_hyst if x_accel_start < int(x_accel): x_accel_start = int(x_accel) @@ -360,21 +306,21 @@ class LimitXYAccelJerk(Script): else: y_accel_start += y_accel_hyst if y_accel_start > int(y_accel): y_accel_start = int(y_accel) - M201_limit_new = "M201 X" + str(round(round(x_accel_start/25)*25)) + " Y" + str(round(round(y_accel_start/25)*25)) ->>>>>>> Stashed changes + m201_limit_new = "M201 X" + str(round(round(x_accel_start/25)*25)) + " Y" + str(round(round(y_accel_start/25)*25)) for index, line in enumerate(lines): if line.startswith(";LAYER:"): - lines.insert(index+1, M201_limit_new) + lines.insert(index+1, m201_limit_new) continue data[num] = "\n".join(lines) - #Alter any existing jerk lines. Accel lines can be ignored----------------------------------- + + #Alter any existing jerk lines. Accel lines can be ignored--------------- if self.getSettingValueByKey("jerk_enable"): for num in range(start_index,len(data)-1,1): layer = data[num] lines = layer.split("\n") for index, line in enumerate(lines): if line.startswith("M205"): - lines[index] = re.sub(M205_jerk_pattern, M205_jerk_new, line) + lines[index] = re.sub(m205_jerk_pattern, m205_jerk_new, line) data[num] = "\n".join(lines) - data[len(data)-1] = M201_limit_old + "\n" + M205_jerk_old + "\n" + data[len(data)-1] + data[len(data)-1] = m201_limit_old + "\n" + m205_jerk_old + "\n" + data[len(data)-1] return data \ No newline at end of file From c7356ccb4ae30ff21685ccdf2b77a6bc72f2af0c Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 6 Sep 2023 21:17:15 +0200 Subject: [PATCH 17/34] Pass 'all' exceptions. part of CURA-10942 --- plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py b/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py index b47a5876d8..43aceb7793 100644 --- a/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py +++ b/plugins/PostProcessingPlugin/scripts/LimitXYAccelJerk.py @@ -256,7 +256,7 @@ class LimitXYAccelJerk(Script): lines.insert(len(lines)-2,m205_jerk_old) data[end_index-1] = "\n".join(lines) except: - all + pass else: data[len(data)-1] = m201_limit_old + "\n" + m205_jerk_old + "\n" + data[len(data)-1] return data From 5765f398a3b9f7ad652f865b10065ca72f237bf7 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 13:03:56 +0200 Subject: [PATCH 18/34] Add clarifying comments: Why .sh 'on' Windows? part of CURA-9494 --- .github/workflows/windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5535f5f44f..f6de818eb4 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -256,6 +256,7 @@ jobs: dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.exe retention-days: 5 + # NOTE: The extension is .sh, since this isn't going to build-environment, so not on the Win build image. - name: Write the run info shell: python run: | @@ -263,6 +264,7 @@ jobs: with open("run_info.sh", "w") as f: f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n') + # NOTE: The extension is .sh, since this isn't going to build-environment, so not on the Win build image. - name: Upload the run info uses: actions/upload-artifact@v3 with: From 13af77b4f6a97862fc528c2c04ccae7d9ce67f9c Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 20:34:54 +0200 Subject: [PATCH 19/34] Nightlies workflow: Enable skipping OS's part of CURA-9494 --- .github/workflows/installers.yml | 208 +++++++++++++++++++++---------- 1 file changed, 144 insertions(+), 64 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 96b67a0541..6a139b0b45 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -29,6 +29,11 @@ on: default: false required: true type: boolean + os_list: + description: 'List of OS(-variant)s to build for' + default: "windows, linux-modern, linux-legacy, macos-x64, macos-arm64" + required: true + type: string schedule: # Daily at 5:20 CET - cron: '20 4 * * *' @@ -40,59 +45,74 @@ env: jobs: windows-installer: - uses: ./.github/workflows/windows.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: windows-2022 - secrets: inherit + steps: + - name: Build Windows installer + if: ${{ contains(inputs.os_list, "windows") }} + uses: ./.github/workflows/windows.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: windows-2022 + secrets: inherit linux-modern-installer: - uses: ./.github/workflows/linux.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: ubuntu-22.04 - secrets: inherit + steps: + - name: Build (modern) Linux installer + if: ${{ contains(inputs.os_list, "linux-modern") }} + uses: ./.github/workflows/linux.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: ubuntu-22.04 + secrets: inherit linux-legacy-installer: - uses: ./.github/workflows/linux.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: ubuntu-20.04 - secrets: inherit + steps: + - name: Build (legacy) Linux installer + if: ${{ contains(inputs.os_list, "linux-legacy") }} + uses: ./.github/workflows/linux.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: ubuntu-20.04 + secrets: inherit macos-installer: - uses: ./.github/workflows/macos.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: macos-11.0 - secrets: inherit + steps: + - name: Build MacOS installer for Intel chips + if: ${{ contains(inputs.os_list, "macos-x64") }} + uses: ./.github/workflows/macos.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: macos-11.0 + secrets: inherit macos-arm-installer: - uses: ./.github/workflows/macos.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: ARM64 - operating_system: self-hosted - secrets: inherit + steps: + - name: Build MacOS installer for ARM chips + if: ${{ contains(inputs.os_list, "macos-arm64") }} + uses: ./.github/workflows/macos.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: ARM64 + operating_system: self-hosted + secrets: inherit # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: @@ -119,14 +139,20 @@ jobs: import os import datetime enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" - linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" - linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" - mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" - mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" - mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" - mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" - win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" - win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" + os_list = [x.strip() for x in "${{ inputs.os_list }}".split(",")] + if "linux-modern" in os_list: + linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" + if "linux-legacy" in os_list: + linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" + if "macos-x64" in os_list: + mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" + mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" + if "macos-arm64" in os_list: + mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" + mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" + if "windows" in os_list: + win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" + win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" nightly_name = "UltiMaker-Cura-" + os.getenv('CURA_VERSION_FULL').split("+")[0] nightly_creation_time = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) output_env = os.environ["GITHUB_OUTPUT"] @@ -136,84 +162,139 @@ jobs: content = f.read() with open(output_env, "w") as f: f.write(content) - f.writelines(f"LINUX_MODERN={linux_modern}\n") - f.writelines(f"LINUX_LEGACY={linux_legacy}\n") - f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") - f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n") - f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") - f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") - f.writelines(f"WIN_MSI={win_msi}\n") - f.writelines(f"WIN_EXE={win_exe}\n") + if "linux-modern" in os_list: + f.writelines(f"LINUX_MODERN={linux_modern}\n") + if "linux-legacy" in os_list: + f.writelines(f"LINUX_LEGACY={linux_legacy}\n") + if "macos-x64" in os_list: + f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") + f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n") + if "macos-arm64" in os_list: + f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") + f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") + if "windows" in os_list: + f.writelines(f"WIN_MSI={win_msi}\n") + f.writelines(f"WIN_EXE={win_exe}\n") f.writelines(f"NIGHTLY_NAME={nightly_name}\n") f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts + if: ${{ contains(inputs.os_list, "linux-modern") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts + if: ${{ contains(inputs.os_list, "linux-legacy") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage path: installers - name: Download mac x64 dmg installer jobs artifacts + if: ${{ contains(inputs.os_list, "macos-x64") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg path: installers - name: Download mac x64 pkg installer jobs artifacts + if: ${{ contains(inputs.os_list, "macos-x64") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg path: installers - name: Download mac arm dmg installer jobs artifacts + if: ${{ contains(inputs.os_list, "macos-arm64") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg path: installers - name: Download mac arm pkg installer jobs artifacts + if: ${{ contains(inputs.os_list, "macos-arm64") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg path: installers - name: Download win msi installer jobs artifacts + if: ${{ contains(inputs.os_list, "windows") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts + if: ${{ contains(inputs.os_list, "windows") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers - - name: Rename installers to nightlies + - name: Rename Linux (modern) installer to nightlies + if: ${{ contains(inputs.os_list, "linux-modern") }} run: | mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage + + - name: Rename Linux (legacy) installer to nightlies + if: ${{ contains(inputs.os_list, "linux-legacy") }} + run: | mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage + + - name: Rename MacOS (X64) installers to nightlies + if: ${{ contains(inputs.os_list, "macos-x64") }} + run: | mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg + + - name: Rename MacOS (ARM-64) installers to nightlies + if: ${{ contains(inputs.os_list, "macos-arm64") }} + run: | mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg + + - name: Rename Windows installers to nightlies + if: ${{ contains(inputs.os_list, "windows") }} + run: | mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe - - name: Update nightly release + - name: Update nightly release for Linux (modern) + if: ${{ contains(inputs.os_list, "linux-modern") }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release for Linux (legacy) + if: ${{ contains(inputs.os_list, "linux-legacy") }} + run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release for MacOS (X64) + if: ${{ contains(inputs.os_list, "macos-x64") }} + run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release for MacOS (ARM-64) + if: ${{ contains(inputs.os_list, "macos-arm64") }} + run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release for Windows + if: ${{ contains(inputs.os_list, "windows") }} + run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber env: @@ -224,4 +305,3 @@ jobs: gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From a35ce3d65221ef0788c8e6af8c7bae67e855ec0f Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 20:48:33 +0200 Subject: [PATCH 20/34] Use single quotes or 'if' doesn't work. part of CURA-9494 --- .github/workflows/installers.yml | 66 ++++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 6a139b0b45..02b10e496b 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -47,7 +47,7 @@ jobs: windows-installer: steps: - name: Build Windows installer - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} uses: ./.github/workflows/windows.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -61,7 +61,7 @@ jobs: linux-modern-installer: steps: - name: Build (modern) Linux installer - if: ${{ contains(inputs.os_list, "linux-modern") }} + if: ${{ contains(inputs.os_list, 'linux-modern') }} uses: ./.github/workflows/linux.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -75,7 +75,7 @@ jobs: linux-legacy-installer: steps: - name: Build (legacy) Linux installer - if: ${{ contains(inputs.os_list, "linux-legacy") }} + if: ${{ contains(inputs.os_list, 'linux-legacy') }} uses: ./.github/workflows/linux.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -89,7 +89,7 @@ jobs: macos-installer: steps: - name: Build MacOS installer for Intel chips - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} uses: ./.github/workflows/macos.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -103,7 +103,7 @@ jobs: macos-arm-installer: steps: - name: Build MacOS installer for ARM chips - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} uses: ./.github/workflows/macos.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -140,17 +140,17 @@ jobs: import datetime enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" os_list = [x.strip() for x in "${{ inputs.os_list }}".split(",")] - if "linux-modern" in os_list: + if 'linux-modern' in os_list: linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" - if "linux-legacy" in os_list: + if 'linux-legacy' in os_list: linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" - if "macos-x64" in os_list: + if 'macos-x64' in os_list: mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" - if "macos-arm64" in os_list: + if 'macos-arm64' in os_list: mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" - if "windows" in os_list: + if 'windows' in os_list: win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" nightly_name = "UltiMaker-Cura-" + os.getenv('CURA_VERSION_FULL').split("+")[0] @@ -162,122 +162,122 @@ jobs: content = f.read() with open(output_env, "w") as f: f.write(content) - if "linux-modern" in os_list: + if 'linux-modern' in os_list: f.writelines(f"LINUX_MODERN={linux_modern}\n") - if "linux-legacy" in os_list: + if 'linux-legacy' in os_list: f.writelines(f"LINUX_LEGACY={linux_legacy}\n") - if "macos-x64" in os_list: + if 'macos-x64' in os_list: f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n") - if "macos-arm64" in os_list: + if 'macos-arm64' in os_list: f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") - if "windows" in os_list: + if 'windows' in os_list: f.writelines(f"WIN_MSI={win_msi}\n") f.writelines(f"WIN_EXE={win_exe}\n") f.writelines(f"NIGHTLY_NAME={nightly_name}\n") f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts - if: ${{ contains(inputs.os_list, "linux-modern") }} + if: ${{ contains(inputs.os_list, 'linux-modern') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts - if: ${{ contains(inputs.os_list, "linux-legacy") }} + if: ${{ contains(inputs.os_list, 'linux-legacy') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage path: installers - name: Download mac x64 dmg installer jobs artifacts - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg path: installers - name: Download mac x64 pkg installer jobs artifacts - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg path: installers - name: Download mac arm dmg installer jobs artifacts - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg path: installers - name: Download mac arm pkg installer jobs artifacts - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg path: installers - name: Download win msi installer jobs artifacts - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers - name: Rename Linux (modern) installer to nightlies - if: ${{ contains(inputs.os_list, "linux-modern") }} + if: ${{ contains(inputs.os_list, 'linux-modern') }} run: | mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage - name: Rename Linux (legacy) installer to nightlies - if: ${{ contains(inputs.os_list, "linux-legacy") }} + if: ${{ contains(inputs.os_list, 'linux-legacy') }} run: | mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage - name: Rename MacOS (X64) installers to nightlies - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} run: | mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg - name: Rename MacOS (ARM-64) installers to nightlies - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} run: | mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg - name: Rename Windows installers to nightlies - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} run: | mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe - name: Update nightly release for Linux (modern) - if: ${{ contains(inputs.os_list, "linux-modern") }} + if: ${{ contains(inputs.os_list, 'linux-modern') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Linux (legacy) - if: ${{ contains(inputs.os_list, "linux-legacy") }} + if: ${{ contains(inputs.os_list, 'linux-legacy') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for MacOS (X64) - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber @@ -285,7 +285,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for MacOS (ARM-64) - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber @@ -293,7 +293,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Windows - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber From 566fdfce1c75a75b360c92414ffe2d22468299f9 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 20:51:56 +0200 Subject: [PATCH 21/34] Whitespace can be important. part of CURA-9494 --- .github/workflows/installers.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 02b10e496b..766c174ed1 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -56,7 +56,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: windows-2022 - secrets: inherit + secrets: inherit linux-modern-installer: steps: @@ -70,7 +70,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: ubuntu-22.04 - secrets: inherit + secrets: inherit linux-legacy-installer: steps: @@ -84,7 +84,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: ubuntu-20.04 - secrets: inherit + secrets: inherit macos-installer: steps: @@ -98,7 +98,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: macos-11.0 - secrets: inherit + secrets: inherit macos-arm-installer: steps: @@ -112,7 +112,7 @@ jobs: staging: ${{ inputs.staging }} architecture: ARM64 operating_system: self-hosted - secrets: inherit + secrets: inherit # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: From e9fe6b9831324b65815817fa548772260398843e Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 21:10:46 +0200 Subject: [PATCH 22/34] Partial revert of unneeded code. It doesn't work out this way, and, due to the if-clause further on, it should work even if the 'need's aren't all met. part of CURA-9494 --- .github/workflows/installers.yml | 100 ++++++++++++++----------------- 1 file changed, 45 insertions(+), 55 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 766c174ed1..2fc4b76d41 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -45,73 +45,63 @@ env: jobs: windows-installer: - steps: - - name: Build Windows installer - if: ${{ contains(inputs.os_list, 'windows') }} - uses: ./.github/workflows/windows.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: windows-2022 + if: ${{ contains(inputs.os_list, 'windows') }} + uses: ./.github/workflows/windows.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: windows-2022 secrets: inherit linux-modern-installer: - steps: - - name: Build (modern) Linux installer - if: ${{ contains(inputs.os_list, 'linux-modern') }} - uses: ./.github/workflows/linux.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: ubuntu-22.04 + if: ${{ contains(inputs.os_list, 'linux-modern') }} + uses: ./.github/workflows/linux.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: ubuntu-22.04 secrets: inherit linux-legacy-installer: - steps: - - name: Build (legacy) Linux installer - if: ${{ contains(inputs.os_list, 'linux-legacy') }} - uses: ./.github/workflows/linux.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: ubuntu-20.04 + if: ${{ contains(inputs.os_list, 'linux-legacy') }} + uses: ./.github/workflows/linux.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: ubuntu-20.04 secrets: inherit macos-installer: - steps: - - name: Build MacOS installer for Intel chips - if: ${{ contains(inputs.os_list, 'macos-x64') }} - uses: ./.github/workflows/macos.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: macos-11.0 + if: ${{ contains(inputs.os_list, 'macos-x64') }} + uses: ./.github/workflows/macos.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: macos-11.0 secrets: inherit macos-arm-installer: - steps: - - name: Build MacOS installer for ARM chips - if: ${{ contains(inputs.os_list, 'macos-arm64') }} - uses: ./.github/workflows/macos.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: ARM64 - operating_system: self-hosted + if: ${{ contains(inputs.os_list, 'macos-arm64') }} + uses: ./.github/workflows/macos.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: ARM64 + operating_system: self-hosted secrets: inherit # Run and update nightly release when the nightly input is set to true or if the schedule is triggered From e1f2424f0ecc69c443d7ddebcc8f45f40dadcdaf Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 22:15:30 +0200 Subject: [PATCH 23/34] Should run nightly part even if some OS is skipped. part of CURA-9494 --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 2fc4b76d41..3b77fa7697 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -106,7 +106,7 @@ jobs: # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: - if: ${{ inputs.nightly || github.event_name == 'schedule' }} + if: ${{ always() && (! cancelled()) && contains(needs.*.result, 'success') && (! contains(needs.*.result, 'failure')) && (inputs.nightly || github.event_name == 'schedule') }} runs-on: ubuntu-latest needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] steps: From 13962a563e514d26975fa6c4765a864b7ec82bca Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 22:38:11 +0200 Subject: [PATCH 24/34] Make sure there is at least one run-info. part of CURA-9494 --- .github/workflows/installers.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 3b77fa7697..4ebea0660b 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -113,11 +113,26 @@ jobs: - name: Checkout uses: actions/checkout@v3 + # It's not necessary to download all three, but it does make sure we have at least one if an OS is skipped. + - name: Download the run info + if: ${{ contains(inputs.os_list, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: macos-run-info + - name: Download the run info II + if: ${{ contains(inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} + uses: actions/download-artifact@v2 + with: + name: linux-run-info + + - name: Download the run info III + if: ${{ contains(inputs.os_list, 'windows') }} + uses: actions/download-artifact@v2 + with: + name: windows-run-info + - name: Set the run info as environment variables run: | . run_info.sh From bb57220756b56b2c2820765eb5b0898440d819a5 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 8 Sep 2023 08:07:34 +0200 Subject: [PATCH 25/34] Fix scheduled build. ... but skip mac for now. Try out in about 15 minutes, after that I'll put it back to 5 o'clock. related to CURA-9494 --- .github/workflows/installers.yml | 45 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 4ebea0660b..2ec2f3ed13 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -36,7 +36,7 @@ on: type: string schedule: # Daily at 5:20 CET - - cron: '20 4 * * *' + - cron: '23 4 * * *' env: CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }} @@ -45,7 +45,7 @@ env: jobs: windows-installer: - if: ${{ contains(inputs.os_list, 'windows') }} + if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} uses: ./.github/workflows/windows.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -57,7 +57,7 @@ jobs: secrets: inherit linux-modern-installer: - if: ${{ contains(inputs.os_list, 'linux-modern') }} + if: ${{ contains(inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} uses: ./.github/workflows/linux.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -69,7 +69,7 @@ jobs: secrets: inherit linux-legacy-installer: - if: ${{ contains(inputs.os_list, 'linux-legacy') }} + if: ${{ contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} uses: ./.github/workflows/linux.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -122,13 +122,13 @@ jobs: name: macos-run-info - name: Download the run info II - if: ${{ contains(inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} + if: ${{ contains(inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} uses: actions/download-artifact@v2 with: name: linux-run-info - name: Download the run info III - if: ${{ contains(inputs.os_list, 'windows') }} + if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} uses: actions/download-artifact@v2 with: name: windows-run-info @@ -145,9 +145,10 @@ jobs: import datetime enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" os_list = [x.strip() for x in "${{ inputs.os_list }}".split(",")] - if 'linux-modern' in os_list: + scheduled = "${{ github.event_name == 'schedule' }}" == "true" + if 'linux-modern' in os_list or scheduled: linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" - if 'linux-legacy' in os_list: + if 'linux-legacy' in os_list or scheduled: linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" if 'macos-x64' in os_list: mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" @@ -155,7 +156,7 @@ jobs: if 'macos-arm64' in os_list: mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" - if 'windows' in os_list: + if 'windows' in os_list or scheduled: win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" nightly_name = "UltiMaker-Cura-" + os.getenv('CURA_VERSION_FULL').split("+")[0] @@ -167,9 +168,9 @@ jobs: content = f.read() with open(output_env, "w") as f: f.write(content) - if 'linux-modern' in os_list: + if 'linux-modern' in os_list or scheduled: f.writelines(f"LINUX_MODERN={linux_modern}\n") - if 'linux-legacy' in os_list: + if 'linux-legacy' in os_list or scheduled: f.writelines(f"LINUX_LEGACY={linux_legacy}\n") if 'macos-x64' in os_list: f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") @@ -177,21 +178,21 @@ jobs: if 'macos-arm64' in os_list: f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") - if 'windows' in os_list: + if 'windows' in os_list or scheduled: f.writelines(f"WIN_MSI={win_msi}\n") f.writelines(f"WIN_EXE={win_exe}\n") f.writelines(f"NIGHTLY_NAME={nightly_name}\n") f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts - if: ${{ contains(inputs.os_list, 'linux-modern') }} + if: ${{ contains(inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts - if: ${{ contains(inputs.os_list, 'linux-legacy') }} + if: ${{ contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule'}} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage @@ -226,26 +227,26 @@ jobs: path: installers - name: Download win msi installer jobs artifacts - if: ${{ contains(inputs.os_list, 'windows') }} + if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts - if: ${{ contains(inputs.os_list, 'windows') }} + if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers - name: Rename Linux (modern) installer to nightlies - if: ${{ contains(inputs.os_list, 'linux-modern') }} + if: ${{ contains(inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} run: | mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage - name: Rename Linux (legacy) installer to nightlies - if: ${{ contains(inputs.os_list, 'linux-legacy') }} + if: ${{ contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} run: | mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage @@ -262,20 +263,20 @@ jobs: mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg - name: Rename Windows installers to nightlies - if: ${{ contains(inputs.os_list, 'windows') }} + if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} run: | mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe - name: Update nightly release for Linux (modern) - if: ${{ contains(inputs.os_list, 'linux-modern') }} + if: ${{ contains(inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Linux (legacy) - if: ${{ contains(inputs.os_list, 'linux-legacy') }} + if: ${{ contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber env: @@ -298,7 +299,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Windows - if: ${{ contains(inputs.os_list, 'windows') }} + if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber From e3f8c8d2ae3eedee81ce3ca0fd521a206a30fb4c Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 8 Sep 2023 08:54:33 +0200 Subject: [PATCH 26/34] Put scheduled build back to early morning. --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 2ec2f3ed13..8f9f5690aa 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -36,7 +36,7 @@ on: type: string schedule: # Daily at 5:20 CET - - cron: '23 4 * * *' + - cron: '20 4 * * *' env: CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }} From 553ce41d0158dfc7081a7c722156e02087f3f72c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 10:01:11 +0200 Subject: [PATCH 27/34] Use default values for nightlies Contributes to CURA-10998 --- .github/workflows/installers.yml | 104 ++++++++++++++++--------------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 8f9f5690aa..79e97df79c 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -39,67 +39,69 @@ on: - cron: '20 4 * * *' env: - CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }} - ENTERPRISE: ${{ inputs.enterprise }} - STAGING: ${{ inputs.staging }} + CURA_CONAN_VERSION: ${{ inputs.cura_conan_version || 'cura/latest@ultimaker/testing' }} + CONAN_ARGS: ${{ inputs.conan_args || '' }} + ENTERPRISE: ${{ inputs.enterprise || false }} + STAGING: ${{ inputs.staging || false }} + OS_LIST: ${{ inputs.os_list || 'windows, linux-modern, linux-legacy, macos-x64, macos-arm64' }} jobs: windows-installer: - if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'windows') || github.event_name == 'schedule' }} uses: ./.github/workflows/windows.yml with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} + cura_conan_version: ${{ env.CURA_CONAN_VERSION }} + conan_args: ${{ env.CONAN_ARGS }} + enterprise: ${{ env.ENTERPRISE }} + staging: ${{ env.STAGING }} architecture: X64 operating_system: windows-2022 secrets: inherit linux-modern-installer: - if: ${{ contains(inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'linux-modern') || github.event_name == 'schedule' }} uses: ./.github/workflows/linux.yml with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} + cura_conan_version: ${{ env.CURA_CONAN_VERSION }} + conan_args: ${{ env.CONAN_ARGS }} + enterprise: ${{ env.ENTERPRISE }} + staging: ${{ env.STAGING }} architecture: X64 operating_system: ubuntu-22.04 secrets: inherit linux-legacy-installer: - if: ${{ contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'linux-legacy') || github.event_name == 'schedule' }} uses: ./.github/workflows/linux.yml with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} + cura_conan_version: ${{ env.CURA_CONAN_VERSION }} + conan_args: ${{ env.CONAN_ARGS }} + enterprise: ${{ env.ENTERPRISE }} + staging: ${{ env.STAGING }} architecture: X64 operating_system: ubuntu-20.04 secrets: inherit macos-installer: - if: ${{ contains(inputs.os_list, 'macos-x64') }} + if: ${{ contains(env.OS_LIST, 'macos-x64') || github.event_name == 'schedule' }} uses: ./.github/workflows/macos.yml with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} + cura_conan_version: ${{ env.CURA_CONAN_VERSION }} + conan_args: ${{ env.CONAN_ARGS }} + enterprise: ${{ env.ENTERPRISE }} + staging: ${{ env.STAGING }} architecture: X64 operating_system: macos-11.0 secrets: inherit macos-arm-installer: - if: ${{ contains(inputs.os_list, 'macos-arm64') }} + if: ${{ contains(env.OS_LIST, 'macos-arm64') || github.event_name == 'schedule' }} uses: ./.github/workflows/macos.yml with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} + cura_conan_version: ${{ env.CURA_CONAN_VERSION }} + conan_args: ${{ env.CONAN_ARGS }} + enterprise: ${{ env.ENTERPRISE }} + staging: ${{ env.STAGING }} architecture: ARM64 operating_system: self-hosted secrets: inherit @@ -116,19 +118,19 @@ jobs: # It's not necessary to download all three, but it does make sure we have at least one if an OS is skipped. - name: Download the run info - if: ${{ contains(inputs.os_list, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }} + if: ${{ contains(env.OS_LIST, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: macos-run-info - name: Download the run info II - if: ${{ contains(inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} + if: contains(env.OS_LIST, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} uses: actions/download-artifact@v2 with: name: linux-run-info - name: Download the run info III - if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} + if: contains(env.OS_LIST, windows') }} uses: actions/download-artifact@v2 with: name: windows-run-info @@ -143,8 +145,8 @@ jobs: run: | import os import datetime - enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" - os_list = [x.strip() for x in "${{ inputs.os_list }}".split(",")] + enterprise = "-Enterprise" if "${{ env.ENTERPRISE }}" == "true" else "" + os_list = [x.strip() for x in "${{ env.OS_LIST }}".split(",")] scheduled = "${{ github.event_name == 'schedule' }}" == "true" if 'linux-modern' in os_list or scheduled: linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" @@ -185,105 +187,105 @@ jobs: f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts - if: ${{ contains(inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'linux-modern') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts - if: ${{ contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule'}} + if: ${{ contains(env.OS_LIST, 'linux-legacy') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage path: installers - name: Download mac x64 dmg installer jobs artifacts - if: ${{ contains(inputs.os_list, 'macos-x64') }} + if: ${{ contains(env.OS_LIST, 'macos-x64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg path: installers - name: Download mac x64 pkg installer jobs artifacts - if: ${{ contains(inputs.os_list, 'macos-x64') }} + if: ${{ contains(env.OS_LIST, 'macos-x64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg path: installers - name: Download mac arm dmg installer jobs artifacts - if: ${{ contains(inputs.os_list, 'macos-arm64') }} + if: ${{ contains(env.OS_LIST, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg path: installers - name: Download mac arm pkg installer jobs artifacts - if: ${{ contains(inputs.os_list, 'macos-arm64') }} + if: ${{ contains(env.OS_LIST, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg path: installers - name: Download win msi installer jobs artifacts - if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'windows') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts - if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'windows') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers - name: Rename Linux (modern) installer to nightlies - if: ${{ contains(inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'linux-modern') }} run: | mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage - name: Rename Linux (legacy) installer to nightlies - if: ${{ contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'linux-legacy') }} run: | mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage - name: Rename MacOS (X64) installers to nightlies - if: ${{ contains(inputs.os_list, 'macos-x64') }} + if: ${{ contains(env.OS_LIST, 'macos-x64') }} run: | mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg - name: Rename MacOS (ARM-64) installers to nightlies - if: ${{ contains(inputs.os_list, 'macos-arm64') }} + if: ${{ contains(env.OS_LIST, 'macos-arm64') }} run: | mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg - name: Rename Windows installers to nightlies - if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'windows') }} run: | mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe - name: Update nightly release for Linux (modern) - if: ${{ contains(inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'linux-modern') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Linux (legacy) - if: ${{ contains(inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'linux-legacy') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for MacOS (X64) - if: ${{ contains(inputs.os_list, 'macos-x64') }} + if: ${{ contains(env.OS_LIST, 'macos-x64') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber @@ -291,7 +293,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for MacOS (ARM-64) - if: ${{ contains(inputs.os_list, 'macos-arm64') }} + if: ${{ contains(env.OS_LIST, 'macos-arm64') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber @@ -299,7 +301,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Windows - if: ${{ contains(inputs.os_list, 'windows') || github.event_name == 'schedule' }} + if: ${{ contains(env.OS_LIST, 'windows') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber From 965a30775d56106353482d59d82780105bb8b177 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 10:07:09 +0200 Subject: [PATCH 28/34] Use `github.event.inputs` Contributes to CURA-10998 --- .github/workflows/installers.yml | 52 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 79e97df79c..ce69f15528 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -47,7 +47,7 @@ env: jobs: windows-installer: - if: ${{ contains(env.OS_LIST, 'windows') || github.event_name == 'schedule' }} + if: ${{ contains(github.event.inputs.os_list, 'windows') || github.event_name == 'schedule' }} uses: ./.github/workflows/windows.yml with: cura_conan_version: ${{ env.CURA_CONAN_VERSION }} @@ -59,7 +59,7 @@ jobs: secrets: inherit linux-modern-installer: - if: ${{ contains(env.OS_LIST, 'linux-modern') || github.event_name == 'schedule' }} + if: ${{ contains(github.event.inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} uses: ./.github/workflows/linux.yml with: cura_conan_version: ${{ env.CURA_CONAN_VERSION }} @@ -71,7 +71,7 @@ jobs: secrets: inherit linux-legacy-installer: - if: ${{ contains(env.OS_LIST, 'linux-legacy') || github.event_name == 'schedule' }} + if: ${{ contains(github.event.inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} uses: ./.github/workflows/linux.yml with: cura_conan_version: ${{ env.CURA_CONAN_VERSION }} @@ -83,7 +83,7 @@ jobs: secrets: inherit macos-installer: - if: ${{ contains(env.OS_LIST, 'macos-x64') || github.event_name == 'schedule' }} + if: ${{ contains(github.event.inputs.os_list, 'macos-x64') || github.event_name == 'schedule' }} uses: ./.github/workflows/macos.yml with: cura_conan_version: ${{ env.CURA_CONAN_VERSION }} @@ -95,7 +95,7 @@ jobs: secrets: inherit macos-arm-installer: - if: ${{ contains(env.OS_LIST, 'macos-arm64') || github.event_name == 'schedule' }} + if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') || github.event_name == 'schedule' }} uses: ./.github/workflows/macos.yml with: cura_conan_version: ${{ env.CURA_CONAN_VERSION }} @@ -118,19 +118,19 @@ jobs: # It's not necessary to download all three, but it does make sure we have at least one if an OS is skipped. - name: Download the run info - if: ${{ contains(env.OS_LIST, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: macos-run-info - name: Download the run info II - if: contains(env.OS_LIST, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} + if: contains(github.event.inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} uses: actions/download-artifact@v2 with: name: linux-run-info - name: Download the run info III - if: contains(env.OS_LIST, windows') }} + if: contains(github.event.inputs.os_list, windows') }} uses: actions/download-artifact@v2 with: name: windows-run-info @@ -187,105 +187,105 @@ jobs: f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts - if: ${{ contains(env.OS_LIST, 'linux-modern') }} + if: ${{ contains(github.event.inputs.os_list, 'linux-modern') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts - if: ${{ contains(env.OS_LIST, 'linux-legacy') }} + if: ${{ contains(github.event.inputs.os_list, 'linux-legacy') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage path: installers - name: Download mac x64 dmg installer jobs artifacts - if: ${{ contains(env.OS_LIST, 'macos-x64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-x64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg path: installers - name: Download mac x64 pkg installer jobs artifacts - if: ${{ contains(env.OS_LIST, 'macos-x64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-x64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg path: installers - name: Download mac arm dmg installer jobs artifacts - if: ${{ contains(env.OS_LIST, 'macos-arm64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg path: installers - name: Download mac arm pkg installer jobs artifacts - if: ${{ contains(env.OS_LIST, 'macos-arm64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg path: installers - name: Download win msi installer jobs artifacts - if: ${{ contains(env.OS_LIST, 'windows') }} + if: ${{ contains(github.event.inputs.os_list, 'windows') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts - if: ${{ contains(env.OS_LIST, 'windows') }} + if: ${{ contains(github.event.inputs.os_list, 'windows') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers - name: Rename Linux (modern) installer to nightlies - if: ${{ contains(env.OS_LIST, 'linux-modern') }} + if: ${{ contains(github.event.inputs.os_list, 'linux-modern') }} run: | mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage - name: Rename Linux (legacy) installer to nightlies - if: ${{ contains(env.OS_LIST, 'linux-legacy') }} + if: ${{ contains(github.event.inputs.os_list, 'linux-legacy') }} run: | mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage - name: Rename MacOS (X64) installers to nightlies - if: ${{ contains(env.OS_LIST, 'macos-x64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-x64') }} run: | mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg - name: Rename MacOS (ARM-64) installers to nightlies - if: ${{ contains(env.OS_LIST, 'macos-arm64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') }} run: | mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg - name: Rename Windows installers to nightlies - if: ${{ contains(env.OS_LIST, 'windows') }} + if: ${{ contains(github.event.inputs.os_list, 'windows') }} run: | mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe - name: Update nightly release for Linux (modern) - if: ${{ contains(env.OS_LIST, 'linux-modern') }} + if: ${{ contains(github.event.inputs.os_list, 'linux-modern') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Linux (legacy) - if: ${{ contains(env.OS_LIST, 'linux-legacy') }} + if: ${{ contains(github.event.inputs.os_list, 'linux-legacy') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for MacOS (X64) - if: ${{ contains(env.OS_LIST, 'macos-x64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-x64') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber @@ -293,7 +293,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for MacOS (ARM-64) - if: ${{ contains(env.OS_LIST, 'macos-arm64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber @@ -301,7 +301,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Windows - if: ${{ contains(env.OS_LIST, 'windows') }} + if: ${{ contains(github.event.inputs.os_list, 'windows') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber From e586fca22e504a4388309b67a428c19138348afe Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 10:08:33 +0200 Subject: [PATCH 29/34] Use `github.event.inputs` Contributes to CURA-10998 --- .github/workflows/installers.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index ce69f15528..28f4dab0f7 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -50,10 +50,10 @@ jobs: if: ${{ contains(github.event.inputs.os_list, 'windows') || github.event_name == 'schedule' }} uses: ./.github/workflows/windows.yml with: - cura_conan_version: ${{ env.CURA_CONAN_VERSION }} - conan_args: ${{ env.CONAN_ARGS }} - enterprise: ${{ env.ENTERPRISE }} - staging: ${{ env.STAGING }} + cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} + conan_args: ${{ github.event.inputs.CONAN_ARGS }} + enterprise: ${{ github.event.inputs.ENTERPRISE }} + staging: ${{ github.event.inputs.STAGING }} architecture: X64 operating_system: windows-2022 secrets: inherit From c9bc1963e4cd6b47c2f074222accf2710cca3b27 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 10:11:21 +0200 Subject: [PATCH 30/34] Use `github.event.inputs` Contributes to CURA-10998 --- .github/workflows/installers.yml | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 28f4dab0f7..7208df4426 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -51,9 +51,9 @@ jobs: uses: ./.github/workflows/windows.yml with: cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} - conan_args: ${{ github.event.inputs.CONAN_ARGS }} - enterprise: ${{ github.event.inputs.ENTERPRISE }} - staging: ${{ github.event.inputs.STAGING }} + conan_args: ${{ github.event.inputs.conan_args }} + enterprise: ${{ github.event.inputs.enterprise }} + staging: ${{ github.event.inputs.staging }} architecture: X64 operating_system: windows-2022 secrets: inherit @@ -62,10 +62,10 @@ jobs: if: ${{ contains(github.event.inputs.os_list, 'linux-modern') || github.event_name == 'schedule' }} uses: ./.github/workflows/linux.yml with: - cura_conan_version: ${{ env.CURA_CONAN_VERSION }} - conan_args: ${{ env.CONAN_ARGS }} - enterprise: ${{ env.ENTERPRISE }} - staging: ${{ env.STAGING }} + cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} + conan_args: ${{ github.event.inputs.conan_args }} + enterprise: ${{ github.event.inputs.enterprise }} + staging: ${{ github.event.inputs.staging }} architecture: X64 operating_system: ubuntu-22.04 secrets: inherit @@ -74,10 +74,10 @@ jobs: if: ${{ contains(github.event.inputs.os_list, 'linux-legacy') || github.event_name == 'schedule' }} uses: ./.github/workflows/linux.yml with: - cura_conan_version: ${{ env.CURA_CONAN_VERSION }} - conan_args: ${{ env.CONAN_ARGS }} - enterprise: ${{ env.ENTERPRISE }} - staging: ${{ env.STAGING }} + cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} + conan_args: ${{ github.event.inputs.conan_args }} + enterprise: ${{ github.event.inputs.enterprise }} + staging: ${{ github.event.inputs.staging }} architecture: X64 operating_system: ubuntu-20.04 secrets: inherit @@ -86,10 +86,10 @@ jobs: if: ${{ contains(github.event.inputs.os_list, 'macos-x64') || github.event_name == 'schedule' }} uses: ./.github/workflows/macos.yml with: - cura_conan_version: ${{ env.CURA_CONAN_VERSION }} - conan_args: ${{ env.CONAN_ARGS }} - enterprise: ${{ env.ENTERPRISE }} - staging: ${{ env.STAGING }} + cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} + conan_args: ${{ github.event.inputs.conan_args }} + enterprise: ${{ github.event.inputs.enterprise }} + staging: ${{ github.event.inputs.staging }} architecture: X64 operating_system: macos-11.0 secrets: inherit @@ -98,10 +98,10 @@ jobs: if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') || github.event_name == 'schedule' }} uses: ./.github/workflows/macos.yml with: - cura_conan_version: ${{ env.CURA_CONAN_VERSION }} - conan_args: ${{ env.CONAN_ARGS }} - enterprise: ${{ env.ENTERPRISE }} - staging: ${{ env.STAGING }} + cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} + conan_args: ${{ github.event.inputs.conan_args }} + enterprise: ${{ github.event.inputs.enterprise }} + staging: ${{ github.event.inputs.staging }} architecture: ARM64 operating_system: self-hosted secrets: inherit From 4c8f8c8a00214d00820789e9dd1784b3807c5397 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 10:12:48 +0200 Subject: [PATCH 31/34] fixed missing start of context Contributes to CURA-10998 --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 7208df4426..403f8f9cb4 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -124,7 +124,7 @@ jobs: name: macos-run-info - name: Download the run info II - if: contains(github.event.inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} + if: ${{ contains(github.event.inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} uses: actions/download-artifact@v2 with: name: linux-run-info From d1e4e018b9b3a70ae38e5f976eabcd540b60a50f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 10:13:54 +0200 Subject: [PATCH 32/34] fixed missing start of context Contributes to CURA-10998 --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 403f8f9cb4..ca7455678a 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -130,7 +130,7 @@ jobs: name: linux-run-info - name: Download the run info III - if: contains(github.event.inputs.os_list, windows') }} + if: ${{ contains(github.event.inputs.os_list, windows') }} uses: actions/download-artifact@v2 with: name: windows-run-info From 7a3d852d41b45a4c6d551f6bf75be3bc7c1c9d6d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 10:18:32 +0200 Subject: [PATCH 33/34] fixed syntax erros Contributes to CURA-10998 --- .github/workflows/installers.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index ca7455678a..d7dc34c735 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -118,19 +118,19 @@ jobs: # It's not necessary to download all three, but it does make sure we have at least one if an OS is skipped. - name: Download the run info - if: ${{ contains(github.event.inputs.os_list, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }} + if: ${{ contains(github.event.inputs.os_list, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: macos-run-info - name: Download the run info II - if: ${{ contains(github.event.inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} + if: ${{ contains(github.event.inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} uses: actions/download-artifact@v2 with: name: linux-run-info - name: Download the run info III - if: ${{ contains(github.event.inputs.os_list, windows') }} + if: ${{ contains(github.event.inputs.os_list, 'windows') }} uses: actions/download-artifact@v2 with: name: windows-run-info From 312c2a5bb292783d99b4167b773d2f4d285ba1c5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 10:20:43 +0200 Subject: [PATCH 34/34] github.event.inputs are strings Contributes to CURA-10998 --- .github/workflows/installers.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index d7dc34c735..93fa12c43e 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -52,8 +52,8 @@ jobs: with: cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} conan_args: ${{ github.event.inputs.conan_args }} - enterprise: ${{ github.event.inputs.enterprise }} - staging: ${{ github.event.inputs.staging }} + enterprise: ${{ github.event.inputs.enterprise == 'true' }} + staging: ${{ github.event.inputs.staging == 'true' }} architecture: X64 operating_system: windows-2022 secrets: inherit @@ -64,8 +64,8 @@ jobs: with: cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} conan_args: ${{ github.event.inputs.conan_args }} - enterprise: ${{ github.event.inputs.enterprise }} - staging: ${{ github.event.inputs.staging }} + enterprise: ${{ github.event.inputs.enterprise == 'true' }} + staging: ${{ github.event.inputs.staging == 'true' }} architecture: X64 operating_system: ubuntu-22.04 secrets: inherit @@ -76,8 +76,8 @@ jobs: with: cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} conan_args: ${{ github.event.inputs.conan_args }} - enterprise: ${{ github.event.inputs.enterprise }} - staging: ${{ github.event.inputs.staging }} + enterprise: ${{ github.event.inputs.enterprise == 'true' }} + staging: ${{ github.event.inputs.staging == 'true' }} architecture: X64 operating_system: ubuntu-20.04 secrets: inherit @@ -88,8 +88,8 @@ jobs: with: cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} conan_args: ${{ github.event.inputs.conan_args }} - enterprise: ${{ github.event.inputs.enterprise }} - staging: ${{ github.event.inputs.staging }} + enterprise: ${{ github.event.inputs.enterprise == 'true' }} + staging: ${{ github.event.inputs.staging == 'true' }} architecture: X64 operating_system: macos-11.0 secrets: inherit @@ -100,8 +100,8 @@ jobs: with: cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }} conan_args: ${{ github.event.inputs.conan_args }} - enterprise: ${{ github.event.inputs.enterprise }} - staging: ${{ github.event.inputs.staging }} + enterprise: ${{ github.event.inputs.enterprise == 'true' }} + staging: ${{ github.event.inputs.staging == 'true' }} architecture: ARM64 operating_system: self-hosted secrets: inherit