Skip to content
Open
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
4 changes: 4 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- uses: dtolnay/rust-toolchain@stable
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox coverage
- name: Build package
run: |
pip install -e .
- name: Run coverage
run: |
tox -e coverage
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ jobs:
- uses: actions/setup-python@v7
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
sudo apt-get update
sudo apt-get install -y pandoc
- name: Build package
run: |
pip install -e .
- name: Tell reno to name the upcoming release after the branch we are on
shell: bash
run: |
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install tox
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rust Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Run lint check
run: |
tox -e lint
72 changes: 58 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,73 @@ on:

jobs:

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
- name: Build distribution
run: |
python -m pip install --upgrade pip "maturin>=1.9,<2.0" build
python -m build --sdist
- name: Store the distribution packages
uses: actions/upload-artifact@v7
with:
name: pkg-sdist
path: dist/*.tar.gz

build_wheels:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-14, macos-15-intel, windows-latest]

steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
- uses: dtolnay/rust-toolchain@stable
- name: Build wheel
uses: pypa/cibuildwheel@v3.4.0
- name: Store the wheel
uses: actions/upload-artifact@v7
with:
name: pkg-wheel-${{ matrix.os }}
path: ./wheelhouse/*.whl

github:
name: github
name: Publish to GitHub
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs:
- build_sdist
- build_wheels
steps:
- name: Checkout tag
uses: actions/checkout@v7
- name: Download artifacts
uses: actions/download-artifact@v8
with:
ref: ${{ github.ref_name }}
pattern: pkg-*
path: dist
merge-multiple: true
- name: Publish release
uses: ghalactic/github-release-from-tag@v6
if: github.ref_type == 'tag'
with:
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: "true"
assets: |
- path: dist/*

pypi:
name: pypi
name: Publish to pypi
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: github
needs:
- build_sdist
- build_wheels
- github
environment:
name: pypi
url: https://pypi.org/p/qiskit-addon-slc
Expand All @@ -36,14 +83,11 @@ jobs:
steps:
- name: Checkout tag
uses: actions/checkout@v7
- name: Download artifacts
uses: actions/download-artifact@v8
with:
ref: ${{ github.ref_name }}
- name: Install `build` tool
run: |
python -m pip install --upgrade pip
pip install build
- name: Build distribution
run: |
python -m build
pattern: pkg-*
path: dist
merge-multiple: true
- name: Publish release to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 4 additions & 0 deletions .github/workflows/test_development_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- uses: dtolnay/rust-toolchain@stable
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install tools from pypi
run: |
python -m pip install tox build extremal-python-dependencies==0.1.0
- name: Build package
run: |
pip install -e .
- name: Build Qiskit SDK development wheel
run: |
git clone https://github.com/Qiskit/qiskit
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test_latest_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,22 @@ jobs:
include:
- os: macos-latest
python-version: "3.13"
- os: windows-latest
python-version: "3.13"
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Build package
run: |
pip install -e .
- name: Test using tox environment
shell: bash
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test_minimum_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies (minimum versions)
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install extremal-python-dependencies==0.1.0
pip install "tox==$(extremal-python-dependencies get-tox-minversion)"
extremal-python-dependencies pin-dependencies-to-minimum --inplace
- name: Build package
run: |
pip install -e .
- name: Test using tox environment
run: |
tox -e py --parallel --parallel-no-spinner
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,8 @@ dmypy.json

# Pyre type checker
.pyre/

# Rust / compiled extension artifacts
/target/
*.pyd
*.pdb
Loading