diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c8fbe16b7..8393586f6 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -10,29 +10,33 @@ permissions: id-token: write jobs: - # Builds the sdist and wheels on all supported platforms and uploads the resulting - # wheels as GitHub artifacts `dev-cibw-*` or `cibw-*`, depending on whether the - # workflow is triggered from a PR or a release, respectively. - python-packaging: + build-sdist: name: 🐍 Packaging - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging.yml@v1.12 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@v1.14 + + # Builds wheels on all supported platforms using cibuildwheel. + # The wheels are uploaded as GitHub artifacts `dev-cibw-*` or `cibw-*`, depending on whether + # the workflow is triggered from a PR or a release, respectively. + build-wheel: + name: 🐍 Packaging + 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/reusable-python-packaging-wheel-cibuildwheel.yml@v1.14 with: - # Make sure Z3 is available + runs-on: ${{ matrix.runs-on }} setup-z3: true # 4.13.0 has incorrectly tagged manylinux wheels z3-version: 4.12.6 - # Runs to enable - enable-ubuntu2404: true - enable-ubuntu2404-arm: true - enable-macos13: true - enable-macos14: true - enable-windows2022: true - enable-windows11-arm: true - # Runs to disable - enable-ubuntu2204: false - enable-ubuntu2204-arm: false - enable-macos15: false - enable-windows2025: false # Downloads the previously generated artifacts and deploys to PyPI on published releases. deploy: @@ -42,7 +46,7 @@ jobs: environment: name: pypi url: https://pypi.org/p/mqt.qmap - needs: [python-packaging] + needs: [build-sdist, build-wheel] steps: - uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d34fe87a9..ae74bc0eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,116 +14,141 @@ concurrency: jobs: change-detection: name: 🔍 Change - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@v1.12 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@v1.14 - cpp-tests: - name: 🇨‌ Test + cpp-tests-ubuntu: + name: 🇨‌ Test 🐧 needs: change-detection - if: fromJSON(needs.change-detection.outputs.run-cpp-tests) - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-ci.yml@v1.12 + 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@v1.14 + with: + runs-on: ${{ matrix.runs-on }} + compiler: ${{ matrix.compiler }} + config: ${{ matrix.config }} + setup-z3: true + + 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/reusable-cpp-tests-macos.yml@v1.14 + with: + runs-on: ${{ matrix.runs-on }} + compiler: ${{ matrix.compiler }} + config: ${{ matrix.config }} + cmake-args: -DMQT_CORE_WITH_GMP=ON + setup-z3: true + + 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] + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@v1.14 + with: + runs-on: ${{ matrix.runs-on }} + compiler: ${{ matrix.compiler }} + config: ${{ matrix.config }} + setup-z3: true + + # 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] + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@v1.14 with: - # Runs to enable - enable-ubuntu2404-gcc-release: true - enable-ubuntu2404-arm-gcc-release: true - enable-macos13-clang-release: true - enable-macos14-clang-release: true - enable-windows2022-msvc-release: true - enable-windows11-arm-msvc-release: true - # Runs to disable - enable-ubuntu2404-gcc-debug: false - enable-ubuntu2404-clang-release: false - enable-ubuntu2404-clang-debug: false - enable-ubuntu2204-gcc-release: false - enable-ubuntu2204-gcc-debug: false - enable-ubuntu2204-clang-release: false - enable-ubuntu2204-clang-debug: false - enable-ubuntu2404-arm-gcc-debug: false - enable-ubuntu2404-arm-clang-release: false - enable-ubuntu2404-arm-clang-debug: false - enable-ubuntu2204-arm-gcc-release: false - enable-ubuntu2204-arm-gcc-debug: false - enable-ubuntu2204-arm-clang-release: false - enable-ubuntu2204-arm-clang-debug: false - enable-macos13-clang-debug: false - enable-macos13-gcc-release: false - enable-macos13-gcc-debug: false - enable-macos14-clang-debug: false - enable-macos14-gcc-release: false - enable-macos14-gcc-debug: false - enable-macos15-clang-release: false - enable-macos15-clang-debug: false - enable-macos15-gcc-release: false - enable-macos15-gcc-debug: false - enable-windows2022-msvc-debug: false - enable-windows2022-clang-release: false - enable-windows2022-clang-debug: false - enable-windows2025-msvc-release: false - enable-windows2025-msvc-debug: false - enable-windows2025-clang-release: false - enable-windows2025-clang-debug: false - enable-windows11-arm-msvc-debug: false - enable-windows11-arm-clang-release: false - enable-windows11-arm-clang-debug: false - # General settings + runs-on: ${{ matrix.runs-on }} + compiler: ${{ matrix.compiler }} + config: ${{ matrix.config }} setup-z3: true - # run extensive C++ tests whenever this is on a PR and the PR has the `extensive-cpp-ci` label - cpp-tests-extensive: - name: 🇨‌ Test (Extensive) + # 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') - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-ci.yml@v1.12 + 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: + # see https://github.com/munich-quantum-toolkit/core/issues/979 + - runs-on: macos-15 + compiler: gcc-14 + - runs-on: macos-15 + compiler: gcc-15 + # see https://github.com/munich-quantum-toolkit/qmap/issues/704 + - compiler: gcc-15 + config: Debug + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@v1.14 with: - # Runs to enable - enable-ubuntu2404-gcc-debug: true - enable-ubuntu2404-clang-release: true - enable-ubuntu2404-clang-debug: true - enable-ubuntu2204-gcc-release: true - enable-ubuntu2204-gcc-debug: true - enable-ubuntu2204-clang-release: true - enable-ubuntu2204-clang-debug: true - enable-ubuntu2404-arm-gcc-debug: true - enable-ubuntu2404-arm-clang-release: true - enable-ubuntu2404-arm-clang-debug: true - enable-ubuntu2204-arm-gcc-release: true - enable-ubuntu2204-arm-gcc-debug: true - enable-ubuntu2204-arm-clang-release: true - enable-ubuntu2204-arm-clang-debug: true - enable-macos13-clang-debug: true - enable-macos13-gcc-release: true - enable-macos13-gcc-debug: true - enable-macos14-clang-debug: true - enable-macos14-gcc-release: true - enable-macos14-gcc-debug: true - enable-macos15-clang-release: true - enable-macos15-clang-debug: true - enable-macos15-gcc-release: true - enable-macos15-gcc-debug: true - enable-windows2022-msvc-debug: true - enable-windows2022-clang-release: true - enable-windows2022-clang-debug: true - enable-windows2025-msvc-release: true - enable-windows2025-msvc-debug: true - enable-windows2025-clang-release: true - enable-windows2025-clang-debug: true - enable-windows11-arm-msvc-debug: true - enable-windows11-arm-clang-release: true - enable-windows11-arm-clang-debug: true - # Runs to disable (these are already enabled in the non-extensive run) - enable-ubuntu2404-gcc-release: false - enable-ubuntu2404-arm-gcc-release: false - enable-macos13-clang-release: false - enable-macos14-clang-release: false - enable-windows2022-msvc-release: false - enable-windows11-arm-msvc-release: false - # General settings + runs-on: ${{ matrix.runs-on }} + compiler: ${{ matrix.compiler }} + config: ${{ matrix.config }} + cmake-args: -DMQT_CORE_WITH_GMP=ON + setup-z3: true + + # 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] + exclude: + # see https://github.com/munich-quantum-toolkit/qmap/issues/704 + - config: Debug + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@v1.14 + with: + runs-on: ${{ matrix.runs-on }} + compiler: ${{ matrix.compiler }} + config: ${{ matrix.config }} setup-z3: true 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@v1.12 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@v1.14 with: setup-z3: true permissions: @@ -135,7 +160,7 @@ jobs: 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@v1.12 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@v1.14 with: clang-version: 20 cmake-args: -DBUILD_MQT_QMAP_BINDINGS=ON @@ -144,62 +169,51 @@ jobs: setup-python: true setup-z3: true - # run extensive Python tests whenever this is on a PR and the PR has the `extensive-python-ci` label python-tests: name: 🐍 Test needs: change-detection if: fromJSON(needs.change-detection.outputs.run-python-tests) - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-ci.yml@v1.12 + 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/reusable-python-tests.yml@v1.14 with: - # Runs to enable - enable-ubuntu2404: true - enable-ubuntu2404-arm: true - enable-macos13: true - enable-macos14: true - enable-windows2022: true - # Runs to disable - enable-ubuntu2204: false - enable-ubuntu2204-arm: false - enable-macos15: false - enable-windows2025: false - # Testing on Windows 11 ARM is not supported yet - enable-windows11-arm: false - # General settings + runs-on: ${{ matrix.runs-on }} setup-z3: true + + 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@v1.14 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') - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-ci.yml@v1.12 + 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/qmap/issues/703 + - runs-on: macos-15 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@v1.14 with: - # Runs to enable - enable-ubuntu2204: true - enable-ubuntu2204-arm: true - enable-macos15: true - enable-windows2025: true - # Runs to disable (these are already enabled in the non-extensive run) - enable-ubuntu2404: false - enable-ubuntu2404-arm: false - enable-macos13: false - enable-macos14: false - enable-windows2022: false - # Testing on Windows 11 ARM is not supported yet - enable-windows11-arm: false - # General settings + runs-on: ${{ matrix.runs-on }} setup-z3: true - permissions: - contents: read - id-token: write 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@v1.12 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@v1.14 with: setup-z3: true @@ -207,46 +221,59 @@ jobs: name: 📝 CodeQL needs: change-detection if: fromJSON(needs.change-detection.outputs.run-code-ql) - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-code-ql.yml@v1.12 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-code-ql.yml@v1.14 with: setup-z3: true - cd: + 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.yml@v1.12 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@v1.14 + + 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/reusable-python-packaging-wheel-cibuildwheel.yml@v1.14 with: + runs-on: ${{ matrix.runs-on }} setup-z3: true # 4.13.0 has incorrectly tagged manylinux wheels z3-version: 4.12.6 - # Runs to enable - enable-ubuntu2404: true - enable-ubuntu2404-arm: true - enable-macos13: true - enable-macos14: true - enable-windows2022: true - enable-windows11-arm: true - # Runs to disable - enable-ubuntu2204: false - enable-ubuntu2204-arm: false - enable-macos15: false - enable-windows2025: false - required-checks-pass: # This job does nothing and is only used for branch protection + # this job does nothing and is only used for branch protection + required-checks-pass: name: 🚦 Check if: always() needs: - change-detection - - cpp-tests - - cpp-tests-extensive + - 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 + - python-tests-extensive - code-ql - - cd + - build-sdist + - build-wheel runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed @@ -254,12 +281,12 @@ jobs: with: allowed-skips: >- ${{ - fromJSON(needs.change-detection.outputs.run-cpp-tests) - && '' || 'cpp-tests,' + 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,' + && '' || 'cpp-tests-extensive-ubuntu,cpp-tests-extensive-macos,cpp-tests-extensive-windows,' }} ${{ fromJSON(needs.change-detection.outputs.run-cpp-tests) @@ -271,7 +298,7 @@ jobs: }} ${{ fromJSON(needs.change-detection.outputs.run-python-tests) - && '' || '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') @@ -287,6 +314,6 @@ jobs: }} ${{ fromJSON(needs.change-detection.outputs.run-cd) - && '' || 'cd,' + && '' || 'build-sdist,build-wheel' }} jobs: ${{ toJSON(needs) }} diff --git a/.github/workflows/update-mqt-core.yml b/.github/workflows/update-mqt-core.yml index 8eb649514..32d20f3c9 100644 --- a/.github/workflows/update-mqt-core.yml +++ b/.github/workflows/update-mqt-core.yml @@ -21,7 +21,7 @@ concurrency: jobs: update-mqt-core: name: ⬆️ Update MQT Core - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-mqt-core-update.yml@v1.12 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-mqt-core-update.yml@v1.14 with: update-to-head: ${{ github.event.inputs.update-to-head == 'true' }} secrets: diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 2e42728a4..d12953d37 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -22,8 +22,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04, macos-15, windows-2025] - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream.yml@v1.12 + os: [ubuntu-24.04, macos-14, windows-2022] + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream.yml@v1.14 with: runs-on: ${{ matrix.os }} setup-z3: true diff --git a/README.md b/README.md index e2b800f60..0e3520de6 100644 --- a/README.md +++ b/README.md @@ -148,10 +148,7 @@ In _Int'l Conference on CAD_, 2025. ## Acknowledgements -The Munich Quantum Toolkit has been supported by the European -Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement -No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the -Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus. +The Munich Quantum Toolkit has been supported by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.