Skip to content

✨ Analog information decoding #785

✨ Analog information decoding

✨ Analog information decoding #785

Workflow file for this run

name: Python Packaging
on:
release:
types: [published]
pull_request:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build_wheels:
name: ${{ matrix.runs-on }} wheels
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-11]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- if: matrix.runs-on != 'ubuntu-latest'
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 }}
- if: runner.os == 'macOS'
name: Install flint
run: |
brew install gmp mpfr ntl
git clone --branch v2.9.0 --depth 1 https://github.com/flintlib/flint2.git
cd flint2 && ./configure && make -j 3 && make install
- name: Build wheels
uses: pypa/[email protected]
- name: Verify clean directory
run: git diff --exit-code
shell: bash
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.runs-on }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install flint
run: sudo apt-get install libflint-dev
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
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.qecc
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1