From 90b794d7dda6216eb3dc8918cbb8b03c0e6ebb33 Mon Sep 17 00:00:00 2001 From: jspijker Date: Wed, 22 Feb 2023 10:58:57 +0100 Subject: [PATCH] Synced main workflows with 5.3.0 --- .github/workflows/conan-recipe-version.yml | 18 +++++++++++++++--- .github/workflows/cura-installer.yml | 4 ++++ .github/workflows/printer-linter-format.yml | 15 ++++++++------- .../workflows/printer-linter-pr-diagnose.yml | 15 ++++++++------- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 3d5da55d6a..75408b0d16 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -170,9 +170,21 @@ jobs: 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}" else: - bump_up_minor = int(latest_branch_version.minor) + 1 - reset_patch = 0 - actual_version = f"{latest_branch_version.major}.{bump_up_minor}.{reset_patch}-alpha+{buildmetadata}{channel_metadata}" + max_branches_version = tools.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: + 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}" + else: + actual_version = f"{latest_branch_version.major}.{int(latest_branch_version.minor) + 1}.0-alpha+{buildmetadata}{channel_metadata}" # %% Set the environment output output_env = os.environ["GITHUB_OUTPUT"] diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index c067de19c0..9429f24e8a 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -122,6 +122,10 @@ jobs: if: ${{ runner.os == 'Macos' }} run: brew install autoconf automake ninja create-dmg # Delete create-dmg when deprecating dmg + - name: Hack needed specifically for ubuntu-22.04 from mid-Feb 2023 onwards + if: ${{ runner.os == 'Linux' && startsWith(inputs.platform, 'ubuntu-22.04') }} + run: sudo apt remove libodbc2 libodbcinst2 unixodbc-common -y + - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} run: | diff --git a/.github/workflows/printer-linter-format.yml b/.github/workflows/printer-linter-format.yml index e5e1b5b1d6..8e65a481c4 100644 --- a/.github/workflows/printer-linter-format.yml +++ b/.github/workflows/printer-linter-format.yml @@ -18,19 +18,20 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Setup Python and pip - uses: actions/setup-python@v4 - with: - python-version: 3.11.x - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-printer-linter.txt - - uses: technote-space/get-diff-action@v6 with: PATTERNS: | resources/+(definitions|extruders)/*.def.json resources/+(intent|quality|variants)/**/*.inst.cfg + - name: Setup Python and pip + if: env.GIT_DIFF && !env.MATCHED_FILES # If nothing happens with python and/or pip after, the clean-up crashes. + uses: actions/setup-python@v4 + with: + python-version: 3.11.x + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-printer-linter.txt + - name: Install Python requirements for runner if: env.GIT_DIFF && !env.MATCHED_FILES run: pip install -r .github/workflows/requirements-printer-linter.txt diff --git a/.github/workflows/printer-linter-pr-diagnose.yml b/.github/workflows/printer-linter-pr-diagnose.yml index 0dac8ba7e7..57c3732d81 100644 --- a/.github/workflows/printer-linter-pr-diagnose.yml +++ b/.github/workflows/printer-linter-pr-diagnose.yml @@ -16,19 +16,20 @@ jobs: with: fetch-depth: 2 - - name: Setup Python and pip - uses: actions/setup-python@v4 - with: - python-version: 3.11.x - cache: "pip" - cache-dependency-path: .github/workflows/requirements-printer-linter.txt - - uses: technote-space/get-diff-action@v6 with: PATTERNS: | resources/+(extruders|definitions)/*.def.json resources/+(intent|quality|variants)/**/*.inst.cfg + - name: Setup Python and pip + if: env.GIT_DIFF && !env.MATCHED_FILES # If nothing happens with python and/or pip after, the clean-up crashes. + uses: actions/setup-python@v4 + with: + python-version: 3.11.x + cache: "pip" + cache-dependency-path: .github/workflows/requirements-printer-linter.txt + - name: Install Python requirements for runner if: env.GIT_DIFF && !env.MATCHED_FILES run: pip install -r .github/workflows/requirements-printer-linter.txt