Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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:
Expand Down
51 changes: 30 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -68,18 +81,14 @@ 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)
&& '' || 'code-ql,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'cd,'
&& '' || 'build-sdist,build-wheel,'
}}
jobs: ${{ toJSON(needs) }}
Loading