diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 211c3b18d..f14caa792 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,11 +8,13 @@ on: - .github/workflows/cd.yml jobs: - python-packaging: + build-sdist: name: 🐍 Packaging - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging.yml@v1.10 - with: - pure-python: true + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@v1.14 + + build-wheel: + name: 🐍 Packaging + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-build.yml@v1.14 deploy: if: github.event_name == 'release' && github.event.action == 'published' @@ -25,7 +27,7 @@ jobs: id-token: write attestations: write contents: read - 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 a9b549ad1..5b0ff5a77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,25 +14,31 @@ concurrency: jobs: change-detection: name: 🔍 Change - uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@v1.10 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@v1.14 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.10 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@v1.14 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.10 + strategy: + fail-fast: false + matrix: + runs-on: [ubuntu-24.04, macos-13, macos-14, windows-2022] + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@v1.14 with: - enable-ubuntu2404: true - enable-ubuntu2404-arm: false # not supported by BQSKit - enable-macos13: true - enable-macos14: true - enable-windows2022: true + 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@v1.14 permissions: contents: read id-token: write @@ -41,25 +47,32 @@ 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-python.yml@v1.10 + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-code-ql-python.yml@v1.14 - 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.10 - with: - pure-python: true + 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) + uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-build.yml@v1.14 - 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 - python-linter - python-tests - - cd + - python-coverage - code-ql + - build-sdist + - build-wheel runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed @@ -68,11 +81,7 @@ jobs: allowed-skips: >- ${{ fromJSON(needs.change-detection.outputs.run-python-tests) - && '' || 'python-linter,' - }} - ${{ - fromJSON(needs.change-detection.outputs.run-python-tests) - && '' || 'python-tests,' + && '' || 'python-linter,python-tests,python-coverage,' }} ${{ fromJSON(needs.change-detection.outputs.run-code-ql) @@ -80,6 +89,6 @@ jobs: }} ${{ fromJSON(needs.change-detection.outputs.run-cd) - && '' || 'cd,' + && '' || 'build-sdist,build-wheel,' }} jobs: ${{ toJSON(needs) }}