Skip to content

✨ Add inv Modifier for MLIR Redesign #7294

✨ Add inv Modifier for MLIR Redesign

✨ Add inv Modifier for MLIR Redesign #7294

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
change-detection:
name: 🔍 Change
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
cpp-tests-ubuntu:
name: 🇨‌ Test 🐧
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && !contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
compiler: [gcc]
config: [Release]
include:
- runs-on: ubuntu-24.04
compiler: gcc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
setup-mlir: true
llvm-version: 21.1.8
cpp-tests-macos:
name: 🇨‌ Test 🍎
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && !contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [macos-15-intel, macos-15]
compiler: [clang]
config: [Release]
include:
- runs-on: macos-15
compiler: clang
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cmake-args: -DMQT_CORE_WITH_GMP=ON
setup-mlir: true
llvm-version: 21.1.8
cpp-tests-windows:
name: 🇨‌ Test 🏁
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && !contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [windows-2025, windows-11-arm]
compiler: [msvc]
config: [Release]
include:
- runs-on: windows-2025
compiler: msvc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
setup-mlir: true
llvm-version: 21.1.8
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
cpp-tests-extensive-ubuntu:
name: 🇨‌ Test (Extensive) 🐧
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
compiler: [gcc, clang, clang-20, clang-21]
config: [Release, Debug]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
setup-mlir: true
llvm-version: 21.1.8
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
cpp-tests-extensive-macos:
name: 🇨‌ Test (Extensive) 🍎
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [macos-14, macos-15, macos-15-intel]
compiler: [clang, clang-20, clang-21, gcc-14, gcc-15]
config: [Release, Debug]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cmake-args: -DMQT_CORE_WITH_GMP=ON
setup-mlir: true
llvm-version: 21.1.8
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
cpp-tests-extensive-windows:
name: 🇨‌ Test (Extensive) 🏁
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [windows-2022, windows-2025, windows-11-arm]
compiler: [msvc, clang]
config: [Release, Debug]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
setup-mlir: true
llvm-version: 21.1.8
cpp-coverage:
name: 🇨‌ Coverage
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
setup-mlir: true
llvm-version: 21.1.8
permissions:
contents: read
id-token: write
cpp-linter:
name: 🇨‌ Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
cmake-args: -DBUILD_MQT_CORE_BENCHMARKS=ON -DBUILD_MQT_CORE_BINDINGS=ON
clang-version: 21
build-project: true
files-changed-only: true
setup-python: true
install-pkgs: "nanobind==2.10.2"
cpp-linter-extra-args: "-std=c++20"
setup-mlir: true
llvm-version: 21.1.8
python-tests:
name: 🐍 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
strategy:
fail-fast: false
matrix:
runs-on:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15-intel,
macos-15,
windows-2025,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
python-coverage:
name: 🐍 Coverage
needs: [change-detection, python-tests]
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
permissions:
contents: read
id-token: write
# run extensive Python tests on PRs labeled with the `extensive-python-ci` label
python-tests-extensive:
name: 🐍 Test (Extensive)
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-python-ci')
strategy:
fail-fast: false
matrix:
runs-on: [macos-14, windows-2022]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
python-linter:
name: 🐍 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
check-stubs: true
enable-ty: true
enable-mypy: false
build-sdist:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
build-wheel:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
strategy:
fail-fast: false
matrix:
runs-on:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15-intel,
macos-15,
windows-2025,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
# this job does nothing and is only used for branch protection
required-checks-pass:
name: 🚦 Check
if: always()
needs:
- change-detection
- cpp-tests-ubuntu
- cpp-tests-macos
- cpp-tests-windows
- cpp-tests-extensive-ubuntu
- cpp-tests-extensive-macos
- cpp-tests-extensive-windows
- cpp-coverage
- cpp-linter
- python-tests
- python-tests-extensive
- python-linter
- build-sdist
- build-wheel
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
allowed-skips: >-
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests) && !contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
&& '' || 'cpp-tests-ubuntu,cpp-tests-macos,cpp-tests-windows,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
&& '' || 'cpp-tests-extensive-ubuntu,cpp-tests-extensive-macos,cpp-tests-extensive-windows,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests)
&& '' || 'cpp-coverage,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-linter)
&& '' || 'cpp-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-python-tests)
&& '' || 'python-tests,python-coverage,python-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-python-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-python-ci')
&& '' || 'python-tests-extensive,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'build-sdist,build-wheel,'
}}
jobs: ${{ toJSON(needs) }}