Skip to content

⬆️🩹 Update munich-quantum-toolkit/workflows action to v1.17.15#1549

Merged
denialhaag merged 22 commits intomainfrom
update-mqt-workflows-1.17.15
Mar 11, 2026
Merged

⬆️🩹 Update munich-quantum-toolkit/workflows action to v1.17.15#1549
denialhaag merged 22 commits intomainfrom
update-mqt-workflows-1.17.15

Conversation

@burgholzer
Copy link
Copy Markdown
Member

@burgholzer burgholzer commented Mar 11, 2026

Description

This PR updates the MQT Workflows to their latest version, which contains fixes for the setup-mlir action that should unblock the CI here.
This PR furthermore updates the LLVM version to 22.1.0 and aims to fix all issues popping up based on that.

Checklist:

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer added this to the MLIR Support milestone Mar 11, 2026
@burgholzer burgholzer self-assigned this Mar 11, 2026
@burgholzer burgholzer added dependencies Pull requests that update a dependency file continuous integration Anything related to the CI setup c++ Anything related to C++ code MLIR Anything related to MLIR backport-potential Changes to be backported to the stable branch and removed backport-potential Changes to be backported to the stable branch labels Mar 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 94.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mlir/lib/Dialect/QCO/IR/SCF/IfOp.cpp 72.7% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@burgholzer burgholzer added the extensive-cpp-ci Adding this label indicates that extensive C++ CI runs should be started for this PR. label Mar 11, 2026
@burgholzer
Copy link
Copy Markdown
Member Author

Okay, this seems to be mostly working so far 🎉
I am enabling the extensive C++ checks now so that we can catch any potential outlier errors.

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer force-pushed the update-mqt-workflows-1.17.15 branch from 0cdf66d to ce202fc Compare March 11, 2026 16:20
@burgholzer
Copy link
Copy Markdown
Member Author

Okay, turns out the changes from ea0d2a2 are not backwards compatible as there have been breaking changes in the underlying interfaces.
I do not want to add ugly preprocess code here again, so I would argue that we simply bump to LLVM 22 as a minimum here, which also fits with the general LLVM philosophy of updating often.

@denialhaag
Copy link
Copy Markdown
Member

Apart from some flukes on macOS x GCC, all tests are passing. I'm removing the extensive label again.

@denialhaag denialhaag removed the extensive-cpp-ci Adding this label indicates that extensive C++ CI runs should be started for this PR. label Mar 11, 2026
@denialhaag denialhaag marked this pull request as ready for review March 11, 2026 19:25
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

Updated CI reusable workflows to v1.17.15, bumped LLVM/MLIR requirement to 22.1, replaced builder.create usages with static Op::create(...) across MLIR code, tightened several CMake link visibilities to PRIVATE, and added a runStage wrapper in the compiler pipeline.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Updates
.github/workflows/cd.yml, .github/workflows/ci.yml, .github/workflows/upstream.yml
Repointed reusable workflow refs from v1.17.12@ to v1.17.15@; preserved job parameters; bumped llvm-version inputs in CI.
LLVM/MLIR Version & Docs
.github/workflows/ci.yml, .readthedocs.yaml, AGENTS.md, cmake/SetupMLIR.cmake, CHANGELOG.md, UPGRADING.md
Raised MLIR/LLVM minimum from 21.1 → 22.1 and updated CI/docs/changelog/upgrade notes accordingly.
MLIR Op Construction API
mlir/lib/Conversion/QCToQIR/QCToQIR.cpp, mlir/lib/Dialect/QIR/Utils/QIRUtils.cpp, mlir/lib/Dialect/QC/IR/Modifiers/CtrlOp.cpp
Replaced builder.create<Op>(...) with Op::create(...) static factory calls and adapted argument forms for multiple LLVM/MLIR ops.
Compiler Pipeline Wrapper
mlir/lib/Compiler/CompilerPipeline.cpp
Added runStage helper that creates a local PassManager per stage, applies diagnostics/config, invokes a population lambda, runs passes, and reports stage result; removed pm.clear() usage.
CMake Link Visibility & Targets
mlir/lib/Dialect/QC/IR/CMakeLists.txt, mlir/lib/Dialect/QCO/IR/CMakeLists.txt, mlir/lib/Dialect/QCO/Transforms/CMakeLists.txt, mlir/unittests/programs/CMakeLists.txt
Changed several LINK_LIBS from PUBLICPRIVATE; exposed headers via PUBLIC FILE_SET HEADERS; added PRIVATE MQT::ProjectOptions to a test target.
SCF IfOp Region Logic
mlir/lib/Dialect/QCO/IR/SCF/IfOp.cpp
Adjusted successor/entry-successor handling for empty else regions and non-constant conditions; updated canonicalization population invocation.
External deps & Small Configs
cmake/ExternalDependencies.cmake, .pre-commit-config.yaml, pyproject.toml
Updated jeff-mlir git tag, bumped validate-pyproject-hook revision, and a minor formatting tweak in pyproject.toml.

Sequence Diagram(s)

sequenceDiagram
  participant Caller as CompilerPipeline
  participant Wrapper as runStage
  participant PM as PassManager
  participant Module as MLIR Module

  Caller->>Wrapper: runStage(stageName, populateFn)
  Wrapper->>PM: create local PassManager
  Wrapper->>PM: apply diagnostics/config
  Wrapper->>PM: call populateFn(PM)
  PM->>Module: run passes on Module
  PM-->>Wrapper: return success/failure
  Wrapper-->>Caller: return stage result
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

github-actions

Suggested reviewers

  • burgholzer

Poem

🐰 Hop, hop — the compilers dance anew,
From twenty-one to twenty-two we flew,
Static creates and pipelines wrapped tight,
Workflows updated, CI takes flight,
A rabbit cheers: code shines bright! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: updating the MQT Workflows action to v1.17.15, which aligns with the primary objective of the PR.
Description check ✅ Passed The pull request description includes a summary of changes, marks all checklist items as complete, and explains the rationale for updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-mqt-workflows-1.17.15

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.readthedocs.yaml:
- Line 35: Replace the mutable branch ref in the curl command that fetches
setup-mlir.sh with a specific release tag; locate the line that calls "curl
-LsSf
https://raw.githubusercontent.com/munich-quantum-software/setup-mlir/refs/heads/bump-package-version/installation/setup-mlir.sh
| bash -s -- -v 22.1.0 -p $HOME/mlir" and change the path segment
"refs/heads/bump-package-version" to a stable tag (for example
"refs/tags/v1.3.0" or the tag that matches MLIR 22.1.0) so the installer URL
points to an immutable release.

In `@cmake/SetupMLIR.cmake`:
- Around line 12-14: Add an UPGRADING.md entry that explains the new MLIR/LLVM
minimum version set by MQT_MLIR_MIN_VERSION ("22.1"), describes the user impact
(source builds that used older MLIR/LLVM may break), and points users to the
project's supported prebuilt LLVM/MLIR distributions and migration steps
(installing the prebuilt, updating LLVM/MLIR paths, or rebuilding with the newer
toolchain); reference the CHANGELOG.md entry and include precise instructions
for where to change build variables or environment variables so downstream
builders can migrate smoothly.

In `@mlir/unittests/programs/CMakeLists.txt`:
- Around line 24-25: The target MLIRQuantumComputationPrograms currently exports
MQT::ProjectOptions as a PUBLIC dependency; change the linkage so MQT::CoreIR
remains PUBLIC (API dependency) but MQT::ProjectOptions is linked PRIVATE to
avoid propagating compiler/linker flags. Update the target_link_libraries call
for MLIRQuantumComputationPrograms to reference MQT::CoreIR as PUBLIC and
MQT::ProjectOptions as PRIVATE.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d38715bd-2593-4b5e-b806-b9b72d363a64

📥 Commits

Reviewing files that changed from the base of the PR and between 81abfca and 00f8933.

📒 Files selected for processing (19)
  • .github/workflows/cd.yml
  • .github/workflows/ci.yml
  • .github/workflows/upstream.yml
  • .pre-commit-config.yaml
  • .readthedocs.yaml
  • AGENTS.md
  • CHANGELOG.md
  • cmake/ExternalDependencies.cmake
  • cmake/SetupMLIR.cmake
  • mlir/lib/Compiler/CompilerPipeline.cpp
  • mlir/lib/Conversion/QCToQIR/QCToQIR.cpp
  • mlir/lib/Dialect/QC/IR/CMakeLists.txt
  • mlir/lib/Dialect/QC/IR/Modifiers/CtrlOp.cpp
  • mlir/lib/Dialect/QCO/IR/CMakeLists.txt
  • mlir/lib/Dialect/QCO/IR/SCF/IfOp.cpp
  • mlir/lib/Dialect/QCO/Transforms/CMakeLists.txt
  • mlir/lib/Dialect/QIR/Utils/QIRUtils.cpp
  • mlir/unittests/programs/CMakeLists.txt
  • pyproject.toml

Comment thread .readthedocs.yaml Outdated
Comment thread cmake/SetupMLIR.cmake
Comment thread mlir/unittests/programs/CMakeLists.txt Outdated
@denialhaag
Copy link
Copy Markdown
Member

@burgholzer, given that CodeRabbit and CI are happy, I'd say we can merge this now. 🤔

@burgholzer
Copy link
Copy Markdown
Member Author

@burgholzer, given that CodeRabbit and CI are happy, I'd say we can merge this now. 🤔

Yeah. Just had a final look and this should be good to go! 🚀
Thanks for finishing what I started here 🙏

@denialhaag denialhaag enabled auto-merge (squash) March 11, 2026 22:25
@denialhaag denialhaag merged commit 7e7853c into main Mar 11, 2026
43 checks passed
@denialhaag denialhaag deleted the update-mqt-workflows-1.17.15 branch March 11, 2026 22:51
@coderabbitai coderabbitai Bot mentioned this pull request Mar 17, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code continuous integration Anything related to the CI setup dependencies Pull requests that update a dependency file MLIR Anything related to MLIR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants