8000 refactored the demo_waterfall to not use depricated libraries · pyrtlsdr/pyrtlsdr@a643c3b · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactored demo_waterfall to not use depricated libraries, runs much smoother now. #36

refactored demo_waterfall to not use depricated libraries, runs much smoother now.

refactored demo_waterfall to not use depricated libraries, runs much smoother now. #36

Workflow file for this run

name: Test Distribution
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
allow_deploy:
description: 'Deploy with twine'
required: true
type: boolean
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Build dists
run: python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: 'dists'
path: 'dist/*'
test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest ]
python-version: ["2.7", "3.8", "3.9", "3.10", "3.11"]
dist-type: [sdist, wheel]
exclude:
- os: windows-latest
python-version: "2.7"
- os: macos-latest
python-version: "2.7"
fail-fast: false
env:
LD_LIBRARY_PATH: ''
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: MatteoH2O1999/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
cache-build: true
- name: Build librtlsdr
if: ${{ matrix.python-version == 2.7 }}
run: |
sudo apt-get install -y libusb-1.0-0-dev
cd tools/ci
./install-librtlsdr.sh
cd ../..
echo "NEW_LD_LIBPATH=$HOME/.local:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -U pytest pytest-forked pytest-cov
pip install numpy
- name: Install py3 dependencies
run: pip install pytest-asyncio
if: ${{ matrix.python-version != 2.7 }}
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: 'dists'
path: dist
- name: Delete source directories
shell: bash
run: |
rm -Rf rtlsdr
- name: Install wheel
shell: bash
if: ${{ matrix.dist-type == 'wheel' }}
run: pip install dist/*.whl
- name: Install sdist
shell: bash
if: ${{ matrix.dist-type == 'sdist' }}
run: pip install dist/*.tar.gz
- name: Install pyrtlsdrlib
if: ${{ matrix.python-version != 2.7 }}
run: pip install pyrtlsdrlib
- name: Test distribution
shell: bash
run: |
py.test --cov-config .coveragerc --cov=rtlsdr
py.test --cov-append --cov-config .coveragerc --cov=rtlsdr --no-overrides --pyargs tests/no_override_client_mode.py
py.test --cov-append --cov-config .coveragerc --cov=rtlsdr --no-overrides --pyargs tests/no_override_dll_loader.py
env:
LD_LIBRARY_PATH: ${{ env.NEW_LD_LIBPATH }}
deploy:
needs: test
if: ${{ success() && (github.event.inputs.allow_deploy == 'true') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: 'dists'
path: dist
- name: Publish to PyPI
if: ${{ success() && github.event.inputs.allow_deploy == 'true' }}
env:
TWINE_REPOSITORY: ${{ secrets.TWINE_REPOSITORY }}
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*
0