Skip to content

⬆️ Update munich-quantum-toolkit/core #1067

⬆️ Update munich-quantum-toolkit/core

⬆️ Update munich-quantum-toolkit/core #1067

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/[email protected]
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/[email protected]
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
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-13, macos-14]
compiler: [clang]
config: [Release]
include:
- runs-on: macos-14
compiler: clang
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
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-2022, windows-11-arm]
compiler: [msvc]
config: [Release]
include:
- runs-on: windows-2022
compiler: msvc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
# 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-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm]
compiler: [gcc, clang, clang-19, clang-20]
config: [Release, Debug]
exclude:
# both combinations do not support C++20 due to the compiler being too old
- runs-on: ubuntu-22.04
compiler: clang
- runs-on: ubuntu-22.04-arm
compiler: clang
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
# 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-13, macos-14, macos-15]
compiler: [clang, clang-19, clang-20, gcc-14, gcc-15]
config: [Release, Debug]
exclude:
- runs-on: macos-15
compiler: gcc-14
- runs-on: macos-15
compiler: gcc-15
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
# 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/[email protected]
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cpp-coverage:
name: 🇨‌ Coverage
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
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/[email protected]
with:
clang-version: 20
cmake-args: -DBUILD_MQT_DDSIM_BINDINGS=ON
files-changed-only: false
install-pkgs: "pybind11==3.0.0"
setup-python: true
cpp-linter-extra-args: "-std=c++20"
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-13, macos-14, windows-2022]
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
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/[email protected]
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: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025]
exclude:
# see https://github.com/munich-quantum-toolkit/ddsim/issues/597
- runs-on: macos-15
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
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/[email protected]
code-ql:
name: 📝 CodeQL
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-code-ql)
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
build-sdist:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
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-13,
macos-14,
windows-2022,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/[email protected]
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-linter
- python-tests-extensive
- code-ql
- build-sdist
- build-wheel
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
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,'
}}
${{
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-python-tests)
&& '' || 'python-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-code-ql)
&& '' || 'code-ql,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'build-sdist,build-wheel'
}}
jobs: ${{ toJSON(needs) }}