fix windows runs-on #94
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: Python | |
on: [push] | |
jobs: | |
build_sdist: | |
name: sdist Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Build Deps | |
run: sudo apt install libusb-1.0-0-dev | |
- name: setup pkg-config | |
run: export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install Latest Rust Nightly | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
- name: Python Build | |
run: | | |
pip install -U setuptools wheel setuptools-rust twine | |
cd driver | |
python setup.py build sdist | |
- name: Publish to TestPyPI | |
env: | |
TWINE_USERNAME: ericevenchick | |
TWINE_PASSWORD: ${{ secrets.test_pypi_password }} | |
TWINE_REPOSITORY: testpypi | |
run: | | |
python -m twine upload --skip-existing driver/dist/* | |
- name: Publish to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
env: | |
TWINE_USERNAME: ericevenchick | |
TWINE_PASSWORD: ${{ secrets.test_pypi_password }} | |
run: | | |
python -m twine upload --skip-existing driver/dist/* | |
build_manylinux: | |
name: manylinux2014 Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run manylinux Builds | |
uses: docker://quay.io/pypa/manylinux2014_x86_64 | |
with: | |
entrypoint: driver/build-wheels.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-manylinux2014-${{ matrix.python-version }} | |
path: driver/dist/ | |
- name: Publish to TestPyPI | |
env: | |
TWINE_USERNAME: ericevenchick | |
TWINE_PASSWORD: ${{ secrets.test_pypi_password }} | |
TWINE_REPOSITORY: testpypi | |
run: | | |
pip install -U twine | |
python -m twine upload --skip-existing driver/dist/* | |
- name: Publish to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
env: | |
TWINE_USERNAME: ericevenchick | |
TWINE_PASSWORD: ${{ secrets.test_pypi_password }} | |
run: | | |
python -m twine upload --skip-existing driver/dist/* | |
build_windows: | |
name: Windows Build | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install libusb | |
run: | | |
git clone https://github.com/Microsoft/vcpkg.git | |
cd vcpkg | |
./bootstrap-vcpkg.bat | |
./vcpkg integrate install | |
vcpkg install libusb:x64-windows-static-md | |
- name: Install Latest Rust Nightly | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
- name: Python Build | |
run: | | |
pip install -U setuptools wheel setuptools-rust twine | |
cd driver | |
python setup.py build bdist_wheel | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-windows | |
path: driver/dist | |
- name: Publish to TestPyPI | |
env: | |
TWINE_USERNAME: ericevenchick | |
TWINE_PASSWORD: ${{ secrets.test_pypi_password }} | |
TWINE_REPOSITORY: testpypi | |
run: | | |
python -m twine upload --skip-existing driver/dist/* | |
- name: Publish to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
env: | |
TWINE_USERNAME: ericevenchick | |
TWINE_PASSWORD: ${{ secrets.pypi_password }} | |
run: | | |
python -m twine upload --skip-existing driver/dist/* |