From c60c322b1170b3a381c9468202d00a514953f96f Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 24 Feb 2023 14:28:13 +0100 Subject: [PATCH 01/13] Add resize handle to recommended window CURA-10076 --- .../PrintSetupSelectorContents.qml | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml index 05407e6e0e..8621a8088c 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml @@ -68,9 +68,28 @@ Item } visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended height: { - const height = base.height - (customPrintSetup.mapToItem(null, 0, 0).y + buttonRow.height + UM.Theme.getSize("default_margin").height); + const height = base.height - (recommendedPrintSetup.mapToItem(null, 0, 0).y + buttonRow.height + UM.Theme.getSize("default_margin").height); const maxHeight = UM.Preferences.getValue("view/settings_list_height"); - return Math.min(implicitHeight, height, maxHeight); + return Math.min(height, maxHeight); + } + + Connections + { + target: UM.Preferences + function onPreferenceChanged(preference) + { + if (preference !== "view/settings_list_height" && preference !== "general/window_height" && preference !== "general/window_state") + { + return; + } + + const height = base.height - (recommendedPrintSetup.mapToItem(null, 0, 0).y + buttonRow.height + UM.Theme.getSize("default_margin").height); + const maxHeight = UM.Preferences.getValue("view/settings_list_height"); + + recommendedPrintSetup.height = Math.min(maxHeight, height); + + updateDragPosition(); + } } function onModeChanged() @@ -126,7 +145,6 @@ Item width: parent.width height: UM.Theme.getSize("default_lining").height color: UM.Theme.getColor("lining") - visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom } Item @@ -135,11 +153,12 @@ Item property real padding: UM.Theme.getSize("default_margin").width height: { + const draggable_area_height = draggableArea.visible ? draggableArea.height : 0; if (currentModeIndex == PrintSetupSelectorContents.Mode.Custom) { - return recommendedButton.height + 2 * padding + (draggableArea.visible ? draggableArea.height : 0) + return recommendedButton.height + 2 * padding + draggable_area_height; } - return 0 + return draggable_area_height; } anchors @@ -175,7 +194,6 @@ Item } height: childrenRect.height cursorShape: Qt.SplitVCursor - visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom drag { target: parent From b5b82224395179ca87c2b3d39b86a52566cd98b3 Mon Sep 17 00:00:00 2001 From: MariMakes <40423138+MariMakes@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:06:18 +0100 Subject: [PATCH 02/13] Include more Modix Printers Correctly reflect https://github.com/Ultimaker/Cura/pull/12056 by updating the list of all included printers. As mentioned here https://github.com/Ultimaker/Cura/discussions/14637#discussioncomment-5102476 --- resources/texts/change_log.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 0f52a9fa22..1ea7026f7a 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -103,7 +103,7 @@ - Added Fusion3 F410, contributed by 64bittuning - Added Geetech A10Pro, A30Pro, A30T, E180, GiantArmD200, I3ProB, i3ProC, I3PrW, MeCreator, MeCreator2, MeDucer, Mizar, MizarM, MizarMax, MizarMax, MizarPro, and Thunder, contributed by whoseyoung - Added Klema 180, Klema 250, Klema 250 Pro, Klema 250 Twin, and Klema 500, contributed by polyntsev -- Added Modix V3 BIG-120X, Modix V3 BIG-120Z, Modix V3 BIG-180X, Modix V3 BIG-40, Modix V3 BIG-60, and Modix V3 BIG-Meter, contributed by Modix3D +- Added Modix V3 BIG-120X, V3 BIG-120Z, V3 BIG-180X, V3 BIG-40, V3 BIG-60, V3 BIG-Meter, V4 BIG 60, V4 120x, V4 120z, V4 180x, and V4 BIG-Meter contributed by Modix3D - Added SnakeOil Standard 180, and SnakeOil Standard 250, contributed by ChipCE - Added Sovol SV01PRO, SV05, and SV06, contributed by eropple - Added UMO+ DXU, contributed by ansonl From 44667c4b07e83dfd8c5efa7c78e85979ef9c201f Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 12:45:30 +0100 Subject: [PATCH 03/13] Sync workflows with main This should also trigger a new conan package, with the correct latest --- .github/workflows/conan-recipe-version.yml | 71 ++++++++++++---------- .github/workflows/cura-installer.yml | 26 ++++++++ 2 files changed, 64 insertions(+), 33 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 75408b0d16..1091b6cb4e 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -7,6 +7,11 @@ on: required: true type: string + user: + required: false + default: ultimaker + type: string + additional_buildmetadata: required: false default: "" @@ -86,12 +91,12 @@ jobs: run: | import subprocess import os - from conans import tools - from conans.errors import ConanException + from conan.tools.scm import Version + from conan.errors import ConanException from git import Repo repo = Repo('.') - user = "${{ github.repository_owner }}".lower() + user = "${{ inputs.user }}".lower() project_name = "${{ inputs.project_name }}" event_name = "${{ github.event_name }}" issue_number = "${{ github.ref }}".split('/')[2] @@ -103,16 +108,16 @@ jobs: # FIXME: for when we push a tag (such as an release) channel = "testing" if is_tag: - branch_version = tools.Version(ref_name) + branch_version = Version(ref_name) is_release_branch = True channel = "_" user = "_" actual_version = f"{branch_version}" else: try: - branch_version = tools.Version(repo.active_branch.name) + branch_version = Version(repo.active_branch.name) except ConanException: - branch_version = tools.Version('0.0.0') + branch_version = Version('0.0.0') if ref_name == f"{branch_version.major}.{branch_version.minor}": channel = 'stable' is_release_branch = True @@ -125,17 +130,17 @@ jobs: channel = f"pr_{issue_number}" # %% Get the actual version - latest_branch_version = tools.Version("0.0.0") + latest_branch_version = Version("0.0.0") latest_branch_tag = None for tag in repo.git.tag(merged = True).splitlines(): if str(tag).startswith("firmware") or str(tag).startswith("master"): continue # Quick-fix for the versioning scheme name of the embedded team in fdm_materials(_private) repo try: - version = tools.Version(tag) + version = Version(tag) except ConanException: continue - if version > latest_branch_version and version < tools.Version("10.0.0"): - # FIXME: stupid old Cura tags 13.04 etc. keep popping up + if version > latest_branch_version and version < Version("6.0.0"): + # FIXME: stupid old Cura tags 13.04 etc. keep popping up, als the fdm_material tag for firmware are messing with this latest_branch_version = version latest_branch_tag = repo.tag(tag) @@ -146,10 +151,10 @@ jobs: if commit == latest_branch_tag.commit: break no_commits += 1 - latest_branch_version_prerelease = latest_branch_version.prerelease - if latest_branch_version.prerelease and not "." in latest_branch_version.prerelease: + latest_branch_version_prerelease = latest_branch_version.pre + if latest_branch_version.pre and not "." in str(latest_branch_version.pre): # The prerealese did not contain a version number, default it to 1 - latest_branch_version_prerelease = f"{latest_branch_version.prerelease}.1" + latest_branch_version_prerelease = f"{latest_branch_version.pre}.1" if event_name == "pull_request": actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version_prerelease.lower()}+{buildmetadata}pr_{issue_number}_{no_commits}" channel_metadata = f"{channel}_{no_commits}" @@ -159,32 +164,32 @@ jobs: else: channel_metadata = f"{channel}_{no_commits}" if is_release_branch: - if latest_branch_version.prerelease == "" and branch_version > latest_branch_version: + if latest_branch_version.pre == "" and branch_version > latest_branch_version: actual_version = f"{branch_version.major}.{branch_version.minor}.0-beta.1+{buildmetadata}{channel_metadata}" - elif latest_branch_version.prerelease == "": + elif latest_branch_version.pre == "": # An actual full release has been created, we are working on patch - bump_up_patch = int(latest_branch_version.patch) + 1 + bump_up_patch = int(str(latest_branch_version.patch)) + 1 actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{bump_up_patch}-beta.1+{buildmetadata}{channel_metadata}" else: # An beta release has been created we are working toward a next beta or full release - bump_up_release_tag = int(latest_branch_version.prerelease.split('.')[1]) + 1 - actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.prerelease.split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}" + bump_up_release_tag = int(str(latest_branch_version.pre.split('.')[1])) + 1 + actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.pre.split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}" else: - max_branches_version = tools.Version("0.0.0") + max_branches_version = Version("0.0.0") branches_no_commits = no_commits for branch in repo.references: try: if "remotes/origin" in branch.abspath: - b_version = tools.Version(branch.name.split("/")[-1]) - if b_version < tools.Version("10.0.0") and b_version > max_branches_version: + b_version = Version(branch.name.split("/")[-1]) + if b_version < Version("10.0.0") and b_version > max_branches_version: max_branches_version = b_version branches_no_commits = repo.commit().count() - branch.commit.count() except: pass if max_branches_version > latest_branch_version: - actual_version = f"{max_branches_version.major}.{int(max_branches_version.minor) + 1}.0-alpha+{buildmetadata}{channel}_{branches_no_commits}" + actual_version = f"{max_branches_version.major}.{int(str(max_branches_version.minor)) + 1}.0-alpha+{buildmetadata}{channel}_{branches_no_commits}" else: - actual_version = f"{latest_branch_version.major}.{int(latest_branch_version.minor) + 1}.0-alpha+{buildmetadata}{channel_metadata}" + actual_version = f"{latest_branch_version.major}.{int(str(latest_branch_version.minor)) + 1}.0-alpha+{buildmetadata}{channel_metadata}" # %% Set the environment output output_env = os.environ["GITHUB_OUTPUT"] @@ -203,14 +208,14 @@ jobs: f.writelines(f"semver_full={actual_version}\n") f.writelines(f"is_release_branch={str(is_release_branch).lower()}\n") - print("::group::Conan Recipe Information") - print(f"name = {project_name}") - print(f"version = {actual_version}") - print(f"user = {user}") - print(f"channel = {channel}") - print(f"recipe_id_full = {project_name}/{actual_version}@{user}/{channel}") - print(f"recipe_id_latest = {project_name}/latest@{user}/{channel}") - print(f"semver_full = {actual_version}") - print(f"is_release_branch = {str(is_release_branch).lower()}") - print("::endgroup::") + summary_env = os.environ["GITHUB_STEP_SUMMARY"] + with open(summary_env, "w") as f: + f.writelines(f"# {project_name}\n") + f.writelines(f"name={project_name}\n") + f.writelines(f"version={actual_version}\n") + f.writelines(f"channel={channel}\n") + f.writelines(f"recipe_id_full={project_name}/{actual_version}@{user}/{channel}\n") + f.writelines(f"recipe_id_latest={project_name}/latest@{user}/{channel}\n") + f.writelines(f"semver_full={actual_version}\n") + f.writelines(f"is_release_branch={str(is_release_branch).lower()}\n") shell: python diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 00ca6ce776..df021c44fc 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -273,6 +273,32 @@ jobs: f.writelines(f"INSTALLER_EXT={installer_ext}\n") f.writelines(f"FULL_INSTALLER_FILENAME={installer_filename}.{installer_ext}\n") + - name: Summarize the used Conan dependencies + shell: python + run: | + import os + import json + from pathlib import Path + + conan_install_info_path = Path("cura_inst/conan_install_info.json") + conan_info = {"installed": []} + if os.path.exists(conan_install_info_path): + with open(conan_install_info_path, "r") as f: + conan_info = json.load(f) + sorted_deps = sorted([dep["recipe"]["id"] for dep in conan_info["installed"]]) + + summary_env = os.environ["GITHUB_STEP_SUMMARY"] + content = "" + if os.path.exists(summary_env): + with open(summary_env, "r") as f: + content = f.read() + + with open(summary_env, "w") as f: + f.write(content) + f.writelines("# ${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }} uses:\n") + for dep in sorted_deps: + f.writelines(f"{dep.replace('#', '\#')}\n") + - name: Archive the artifacts (bash) if: ${{ !inputs.installer && runner.os != 'Windows' }} run: tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}.tar.gz" "./UltiMaker-Cura/" From b521e7795a89477885ebe1b68017ece39d0d81b2 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 12:48:10 +0100 Subject: [PATCH 04/13] Only cast pre to str (cherry picked from commit dd866c4bb8c668b6d8954cb22c6cd2a045171903) --- .github/workflows/conan-recipe-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 1091b6cb4e..2ee5416ed7 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -172,7 +172,7 @@ jobs: actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{bump_up_patch}-beta.1+{buildmetadata}{channel_metadata}" else: # An beta release has been created we are working toward a next beta or full release - bump_up_release_tag = int(str(latest_branch_version.pre.split('.')[1])) + 1 + bump_up_release_tag = int(str(latest_branch_version.pre).split('.')[1]) + 1 actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.pre.split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}" else: max_branches_version = Version("0.0.0") From c985614896430f27f011002c2eb29bf59fb4a7c7 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 12:51:17 +0100 Subject: [PATCH 05/13] cast pre to str (cherry picked from commit ed2db086c0557bf3d4c8ef5c7354aa6e3c551b94) --- .github/workflows/conan-recipe-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 2ee5416ed7..4964dc4903 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -173,7 +173,7 @@ jobs: else: # An beta release has been created we are working toward a next beta or full release bump_up_release_tag = int(str(latest_branch_version.pre).split('.')[1]) + 1 - actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.pre.split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}" + actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{str(latest_branch_version.pre).split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}" else: max_branches_version = Version("0.0.0") branches_no_commits = no_commits From d072942eb8e53393731508a49abae5f44f323bf3 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 13:32:29 +0100 Subject: [PATCH 06/13] ensure that the latest is removed (cherry picked from commit 840aada83d46fae87793d8b630a1add79b87fa5a) --- .github/workflows/conan-package.yml | 4 ++-- .github/workflows/conan-recipe-export.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index b0970f60a8..b5465fdb03 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -128,8 +128,8 @@ jobs: - name: Remove the latest alias if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} run: | - conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f || true - conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f || true + conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f + conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f - name: Create the latest alias if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' && always() }} diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index eebcd06f46..d0e74498d3 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -91,8 +91,8 @@ jobs: - name: Remove the latest alias if: ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} run: | - conan remove ${{ inputs.recipe_id_latest }} -r cura -f || true - conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f || true + conan remove ${{ inputs.recipe_id_latest }} -r cura -f + conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f - name: Create the latest alias if: ${{ inputs.recipe_id_latest != '' && always() }} From 9cf3c2dd62af2bc13852947542df0254bcc05482 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 13:53:14 +0100 Subject: [PATCH 07/13] allow latest removal to fail --- .github/workflows/conan-package.yml | 12 +++++++----- .github/workflows/conan-recipe-export.yml | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index b5465fdb03..d3d75610ee 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -126,13 +126,15 @@ jobs: run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True - name: Remove the latest alias - if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} - run: | - conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f - conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f + if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} + run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f + + - name: Remove the latest alias from cura-ce + if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} + run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f - name: Create the latest alias - if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' && always() }} + if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} run: conan alias ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - name: Upload the Package(s) diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index d0e74498d3..483fc9154a 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -89,13 +89,19 @@ jobs: run: conan export . ${{ inputs.recipe_id_full }} - name: Remove the latest alias - if: ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} - run: | - conan remove ${{ inputs.recipe_id_latest }} -r cura -f - conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f + if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} + run: conan remove ${{ inputs.recipe_id_latest }} -r cura -f + + - name: Remove the latest alias from cura-ce + if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} + run: conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f - name: Create the latest alias - if: ${{ inputs.recipe_id_latest != '' && always() }} + if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} + run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} + + - name: Create the latest alias + if: always() && ${{ inputs.recipe_id_latest != '' }} run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} - name: Upload the Package(s) @@ -103,5 +109,5 @@ jobs: run: conan upload "*" -r cura --all -c - name: Upload the Package(s) community - if: ${{ always() && inputs.conan_upload_community == true }} + if: always() && ${{ inputs.conan_upload_community == true }} run: conan upload "*" -r cura-ce -c From d45f65d4003215a3da49f51275bdbb332268226d Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 14:11:17 +0100 Subject: [PATCH 08/13] Always remove upload latest --- .github/workflows/conan-package.yml | 8 ++++---- .github/workflows/conan-recipe-export.yml | 12 ++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index d3d75610ee..a7137debab 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -122,19 +122,19 @@ jobs: - name: Get Conan configuration run: conan config install https://github.com/Ultimaker/conan-config.git - - name: Create the Packages using lockfile + - name: Create the Packages run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True - name: Remove the latest alias - if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} + if: always() run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f - name: Remove the latest alias from cura-ce - if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} + if: always() run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f - name: Create the latest alias - if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} + if: always() run: conan alias ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - name: Upload the Package(s) diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index 483fc9154a..9bab7c6bb5 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -89,19 +89,15 @@ jobs: run: conan export . ${{ inputs.recipe_id_full }} - name: Remove the latest alias - if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} + if: always() run: conan remove ${{ inputs.recipe_id_latest }} -r cura -f - name: Remove the latest alias from cura-ce - if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} + if: always() run: conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f - name: Create the latest alias - if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} - run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} - - - name: Create the latest alias - if: always() && ${{ inputs.recipe_id_latest != '' }} + if: always() run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} - name: Upload the Package(s) @@ -109,5 +105,5 @@ jobs: run: conan upload "*" -r cura --all -c - name: Upload the Package(s) community - if: always() && ${{ inputs.conan_upload_community == true }} + if: ${{ inputs.conan_upload_community && always() }} run: conan upload "*" -r cura-ce -c From e40eb61ad8755bb7f6f997426e717e112026aa89 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 14:29:19 +0100 Subject: [PATCH 09/13] Only upload the actual package (cherry picked from commit 5e2511252e996115d6386decac229aa47e4af8c3) --- .github/workflows/conan-package-create.yml | 30 ++++++++-------------- .github/workflows/conan-package.yml | 10 +++++--- .github/workflows/conan-recipe-export.yml | 12 ++++++--- 3 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 855888a059..2d35fa5a63 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -163,30 +163,20 @@ jobs: if: ${{ inputs.build_info }} run: conan_build_info --v2 create buildinfo.json --lockfile conan.lock --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }} - - name: Upload the Package(s) - if: always() - run: conan upload "*" -r cura --all -c - - name: Upload the build info if: ${{ inputs.build_info }} run: | conan_build_info --v2 publish buildinfo.json --url https://ultimaker.jfrog.io/artifactory --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }} conan_build_info --v2 stop - - name: Upload the Package(s) community - if: ${{ always() && inputs.conan_upload_community == true }} - run: conan upload "*" -r cura-ce -c - - - name: Upload the log and build artifacts + - name: Upload the Package(s) if: always() - uses: actions/upload-artifact@v3 - with: - name: log-${{ inputs.runs_on }}-${{ runner.arch }} - path: | - buildinfo.json - conan.lock - conanbuildinfo.txt - conaninfo.txt - graph_info.json - build/** - retention-days: 1 + run: | + conan upload ${{ inputs.recipe_id_full }} -r cura --all -c + conan upload ${{ inputs.recipe_id_latest }} -r cura --all -c + + - name: Upload the Package(s) community + if: ${{ inputs.conan_upload_community && always() }} + run: | + conan upload ${{ inputs.recipe_id_full }} -r cura-ce -c + conan upload ${{ inputs.recipe_id_latest }} -r cura-ce -c diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index a7137debab..74e1fb8d12 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -127,11 +127,11 @@ jobs: - name: Remove the latest alias if: always() - run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f + run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f || true - name: Remove the latest alias from cura-ce if: always() - run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f + run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f || true - name: Create the latest alias if: always() @@ -140,8 +140,10 @@ jobs: - name: Upload the Package(s) if: always() run: | - conan upload "*" -r cura --all -c - conan upload "*" -r cura-ce -c + conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cura --all -c + conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura --all -c + conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cura-ce -c + conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -c notify-create: if: ${{ always() && (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index 9bab7c6bb5..d263320556 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -90,11 +90,11 @@ jobs: - name: Remove the latest alias if: always() - run: conan remove ${{ inputs.recipe_id_latest }} -r cura -f + run: conan remove ${{ inputs.recipe_id_latest }} -r cura -f || true - name: Remove the latest alias from cura-ce if: always() - run: conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f + run: conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f || true - name: Create the latest alias if: always() @@ -102,8 +102,12 @@ jobs: - name: Upload the Package(s) if: always() - run: conan upload "*" -r cura --all -c + run: | + conan upload ${{ inputs.recipe_id_full }} -r cura --all -c + conan upload ${{ inputs.recipe_id_latest }} -r cura --all -c - name: Upload the Package(s) community if: ${{ inputs.conan_upload_community && always() }} - run: conan upload "*" -r cura-ce -c + run: | + conan upload ${{ inputs.recipe_id_full }} -r cura-ce -c + conan upload ${{ inputs.recipe_id_latest }} -r cura-ce -c From 1018d8fc5ca32867d0ba3fc3d56f65f0e269f308 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 16:35:23 +0100 Subject: [PATCH 10/13] Remove cura-ce (cherry picked from commit 51f843b478d932a918d3a14fb673749c1ab88cfe) --- .github/workflows/conan-package-create.yml | 6 ------ .github/workflows/conan-package.yml | 6 ------ .github/workflows/conan-recipe-export.yml | 10 ---------- 3 files changed, 22 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 2d35fa5a63..0cdcf84f19 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -174,9 +174,3 @@ jobs: run: | conan upload ${{ inputs.recipe_id_full }} -r cura --all -c conan upload ${{ inputs.recipe_id_latest }} -r cura --all -c - - - name: Upload the Package(s) community - if: ${{ inputs.conan_upload_community && always() }} - run: | - conan upload ${{ inputs.recipe_id_full }} -r cura-ce -c - conan upload ${{ inputs.recipe_id_latest }} -r cura-ce -c diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index 74e1fb8d12..2ba4cf3ec0 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -129,10 +129,6 @@ jobs: if: always() run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f || true - - name: Remove the latest alias from cura-ce - if: always() - run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f || true - - name: Create the latest alias if: always() run: conan alias ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} ${{ needs.conan-recipe-version.outputs.recipe_id_full }} @@ -142,8 +138,6 @@ jobs: run: | conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cura --all -c conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura --all -c - conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cura-ce -c - conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -c notify-create: if: ${{ always() && (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index d263320556..a9436d1d58 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -92,10 +92,6 @@ jobs: if: always() run: conan remove ${{ inputs.recipe_id_latest }} -r cura -f || true - - name: Remove the latest alias from cura-ce - if: always() - run: conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f || true - - name: Create the latest alias if: always() run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} @@ -105,9 +101,3 @@ jobs: run: | conan upload ${{ inputs.recipe_id_full }} -r cura --all -c conan upload ${{ inputs.recipe_id_latest }} -r cura --all -c - - - name: Upload the Package(s) community - if: ${{ inputs.conan_upload_community && always() }} - run: | - conan upload ${{ inputs.recipe_id_full }} -r cura-ce -c - conan upload ${{ inputs.recipe_id_latest }} -r cura-ce -c From e3f6c74f46e84f2d580558e66de09436e956d62e Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 16:50:49 +0100 Subject: [PATCH 11/13] Don't remove the latest --- .github/workflows/conan-package-create.yml | 1 - .github/workflows/conan-package.yml | 6 +----- .github/workflows/conan-recipe-export.yml | 6 +----- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 0cdcf84f19..cfaabb2933 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -173,4 +173,3 @@ jobs: if: always() run: | conan upload ${{ inputs.recipe_id_full }} -r cura --all -c - conan upload ${{ inputs.recipe_id_latest }} -r cura --all -c diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index 2ba4cf3ec0..e155a1dd70 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -125,10 +125,6 @@ jobs: - name: Create the Packages run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True - - name: Remove the latest alias - if: always() - run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f || true - - name: Create the latest alias if: always() run: conan alias ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} ${{ needs.conan-recipe-version.outputs.recipe_id_full }} @@ -137,7 +133,7 @@ jobs: if: always() run: | conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cura --all -c - conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura --all -c + conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -c notify-create: if: ${{ always() && (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index a9436d1d58..dd08eda4ac 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -88,10 +88,6 @@ jobs: if: ${{ !inputs.conan_export_binaries }} run: conan export . ${{ inputs.recipe_id_full }} - - name: Remove the latest alias - if: always() - run: conan remove ${{ inputs.recipe_id_latest }} -r cura -f || true - - name: Create the latest alias if: always() run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} @@ -100,4 +96,4 @@ jobs: if: always() run: | conan upload ${{ inputs.recipe_id_full }} -r cura --all -c - conan upload ${{ inputs.recipe_id_latest }} -r cura --all -c + conan upload ${{ inputs.recipe_id_latest }} -r cura -c From d7d7a7302d9970cbfac3838be24a9f43c49cb076 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 28 Feb 2023 11:50:54 +0100 Subject: [PATCH 12/13] Set defaultExtruderIndex to activeExtruderIndex This doesn't fix the problem in it's entirety, but it does make the behavior to be the same as it was in the previous releases CURA-10342 --- resources/qml/Widgets/SingleSettingComboBox.qml | 2 +- resources/qml/Widgets/SingleSettingSlider.qml | 2 +- resources/qml/Widgets/SingleSettingTextField.qml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Widgets/SingleSettingComboBox.qml b/resources/qml/Widgets/SingleSettingComboBox.qml index 338e14b144..1b7101e9e7 100644 --- a/resources/qml/Widgets/SingleSettingComboBox.qml +++ b/resources/qml/Widgets/SingleSettingComboBox.qml @@ -20,7 +20,7 @@ Cura.ComboBox { // The displayed value will be read from the extruder with index "defaultExtruderIndex" instead of the machine. property bool updateAllExtruders: false // This is only used if updateAllExtruders == true - property int defaultExtruderIndex: 0 + property int defaultExtruderIndex: Cura.ExtruderManager.activeExtruderIndex model: ListModel { diff --git a/resources/qml/Widgets/SingleSettingSlider.qml b/resources/qml/Widgets/SingleSettingSlider.qml index 27e2be562c..aac204970e 100644 --- a/resources/qml/Widgets/SingleSettingSlider.qml +++ b/resources/qml/Widgets/SingleSettingSlider.qml @@ -21,7 +21,7 @@ UM.Slider // The displayed value will be read from the extruder with index "defaultExtruderIndex" instead of the machine. property bool updateAllExtruders: false // This is only used if updateAllExtruders == true - property int defaultExtruderIndex: 0 + property int defaultExtruderIndex: Cura.ExtruderManager.activeExtruderIndex property int previousValue: -1 // set range from 0 to 100 diff --git a/resources/qml/Widgets/SingleSettingTextField.qml b/resources/qml/Widgets/SingleSettingTextField.qml index 12d24d285d..22c080ebf4 100644 --- a/resources/qml/Widgets/SingleSettingTextField.qml +++ b/resources/qml/Widgets/SingleSettingTextField.qml @@ -20,7 +20,7 @@ UM.TextField // The displayed value will be read from the extruder with index "defaultExtruderIndex" instead of the machine. property bool updateAllExtruders: false // This is only used if updateAllExtruders == true - property int defaultExtruderIndex: 0 + property int defaultExtruderIndex: Cura.ExtruderManager.activeExtruderIndex // Resolving the value in the textField. Binding From bce2b4751bb38a0f22c4a129d3ab610e7935439c Mon Sep 17 00:00:00 2001 From: jspijker Date: Wed, 1 Mar 2023 11:32:55 +0100 Subject: [PATCH 13/13] Sync workflow with main --- .github/workflows/cura-installer.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index df021c44fc..998ef067f7 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -285,7 +285,7 @@ jobs: if os.path.exists(conan_install_info_path): with open(conan_install_info_path, "r") as f: conan_info = json.load(f) - sorted_deps = sorted([dep["recipe"]["id"] for dep in conan_info["installed"]]) + sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]]) summary_env = os.environ["GITHUB_STEP_SUMMARY"] content = "" @@ -297,7 +297,7 @@ jobs: f.write(content) f.writelines("# ${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }} uses:\n") for dep in sorted_deps: - f.writelines(f"{dep.replace('#', '\#')}\n") + f.writelines(f"`{dep}`\n") - name: Archive the artifacts (bash) if: ${{ !inputs.installer && runner.os != 'Windows' }}