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 permissions: {} jobs: change-detection: name: 🔍 Change uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 permissions: contents: read cpp-tests-ubuntu: name: 🇨 Test 🐧 needs: change-detection if: fromJSON(needs.change-detection.outputs.run-cpp-tests) strategy: fail-fast: false matrix: runs-on: [ubuntu-24.04, ubuntu-24.04-arm] compiler: [gcc] preset: [release] include: - runs-on: ubuntu-24.04 compiler: gcc preset: debug uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 with: runs-on: ${{ matrix.runs-on }} compiler: ${{ matrix.compiler }} preset-name: ${{ matrix.preset }} permissions: contents: read cpp-tests-macos: name: 🇨 Test 🍎 needs: change-detection if: fromJSON(needs.change-detection.outputs.run-cpp-tests) strategy: fail-fast: false matrix: runs-on: [macos-26, macos-26-intel] compiler: [clang] preset: [release] include: - runs-on: macos-26 compiler: clang preset: debug uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 with: runs-on: ${{ matrix.runs-on }} compiler: ${{ matrix.compiler }} preset-name: ${{ matrix.preset }} permissions: contents: read cpp-tests-windows: name: 🇨 Test 🏁 needs: change-detection if: fromJSON(needs.change-detection.outputs.run-cpp-tests) strategy: fail-fast: false matrix: runs-on: [windows-2025, windows-11-arm] compiler: [msvc] preset: [release-windows] include: - runs-on: windows-2025 compiler: msvc preset: debug-windows uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 with: runs-on: ${{ matrix.runs-on }} compiler: ${{ matrix.compiler }} preset-name: ${{ matrix.preset }} permissions: contents: read 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@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 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@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 with: build-project: true clang-version: 20 files-changed-only: true install-pkgs: "nanobind==2.15.0" setup-python: true cpp-linter-extra-args: "-std=c++20" permissions: contents: read pull-requests: write # Needed to post review comments 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-26, macos-26-intel, windows-2025, ] uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 with: runs-on: ${{ matrix.runs-on }} permissions: contents: read 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@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 permissions: contents: read id-token: write python-linter: name: 🐍 Lint needs: change-detection if: fromJSON(needs.change-detection.outputs.run-python-linter) uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 with: check-stubs: true enable-mypy: false enable-ty: true permissions: contents: read 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@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 permissions: contents: read 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-26, macos-26-intel, windows-2025, windows-11-arm, ] uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@f33c11c5cf68957b3074fff11ae43cfce2aaf593 # v2.2.3 with: runs-on: ${{ matrix.runs-on }} permissions: contents: read # 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-coverage - cpp-linter - python-tests - python-coverage - python-linter - build-sdist - build-wheel runs-on: ubuntu-slim 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) && 'cpp-tests-ubuntu,cpp-tests-macos,cpp-tests-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-linter) && 'python-linter,' || '' }} ${{ !fromJSON(needs.change-detection.outputs.run-cd) && 'build-sdist,build-wheel' || '' }} jobs: ${{ toJSON(needs) }}