✨ Switch to mqt-core
Python package
#45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- .github/workflows/cd.yml # This is to make sure changes to the CD workflow are tested before deployment. | |
jobs: | |
python-packaging: | |
name: 🐍 Packaging | |
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | |
experimental-free-threading: | |
name: 🧵 Free Threading | |
runs-on: windows-latest | |
steps: | |
# check out the repository (including submodules and all history) | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
# set up MSVC development environment (Windows only) | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Setup ccache | |
uses: Chocobo1/setup-ccache-action@v1 | |
with: | |
prepend_symlinks_to_path: false | |
windows_compile_environment: msvc | |
override_cache_key: wheels-${{ matrix.runs-on }}-experimental | |
- uses: yezz123/setup-uv@v4 | |
- name: Install Python 3.13t from nuget | |
run: | | |
nuget.exe install python-freethreaded -Version 3.13.0-rc1 -FallbackSource https://api.nuget.org/v3/index.json -OutputDirectory 'C:\Users\runneradmin\AppData\Local\test\Cache\nuget-cpython' | |
- name: Setup venv | |
run: | | |
uv venv --python 'C:\Users\runneradmin\AppData\Local\test\Cache\nuget-cpython\python-freethreaded.3.13.0-rc1\tools\python.exe' | |
- name: Running install | |
run: | | |
uv pip install -v . | |
deploy: | |
if: github.event_name == 'release' && github.event.action == 'published' | |
name: 🚀 Deploy to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/mqt.qcec | |
permissions: | |
id-token: write | |
attestations: write | |
contents: read | |
needs: [python-packaging] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- name: Generate artifact attestation for sdist and wheel(s) | |
uses: actions/[email protected] | |
with: | |
subject-path: "dist/*" | |
- uses: pypa/gh-action-pypi-publish@release/v1 |