docs: Adds example scripts #23
Workflow file for this run
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: Continuous Integration/Build | |
on: | |
push: | |
jobs: | |
testing: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Set up apt sources | |
run: | | |
sudo add-apt-repository -y ppa:ettusresearch/uhd | |
- name: Install apt packages | |
uses: awalsh128/cache-apt-pkgs-action@v1.4.2 | |
with: | |
packages: cmake build-essential pkg-config uhd-host libusb-1.0-0-dev libfftw3-dev python3-dev libuhd-dev libairspy-dev libhackrf-dev | |
version: 1.1 | |
execute_install_scripts: true | |
- name: Install Dependencies | |
run: | | |
sudo apt install -y libboost-all-dev | |
- name: Install package | |
run: | | |
python -m pip install . | |
python -m pip install pylint pytest | |
- name: Runs Pylint | |
run: | | |
python -m pylint $(git ls-files *.py) | |
- name: Runs PyTest | |
run: | | |
python -m pytest tests | |
release: | |
runs-on: ubuntu-24.04 | |
needs: [testing] | |
if: github.ref == 'refs/heads/master' | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
ref: master | |
token: ${{ secrets.RELEASER }} | |
persist-credentials: true | |
- name: Python Semantic Release | |
uses: python-semantic-release/python-semantic-release@v9.8.6 | |
id: release | |
with: | |
github_token: ${{ secrets.RELEASER }} | |
root_options: "-vv" | |
outputs: | |
release: ${{ steps.release.outputs.released }} | |
build_wheels: | |
if: needs.release.outputs.release == 'true' | |
name: Build wheels on ${{ matrix.python-version }} | |
needs: [release] | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
# os: [ubuntu-latest, windows-latest] # Not supporting macos due to https://github.com/stbrumme/hash-library/pull/4/files not being resolved | |
python-version: ["3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
ref: master | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up apt sources | |
run: | | |
sudo add-apt-repository -y ppa:ettusresearch/uhd | |
- name: Install apt packages | |
uses: awalsh128/cache-apt-pkgs-action@v1.4.2 | |
with: | |
packages: cmake build-essential pkg-config uhd-host libusb-1.0-0-dev libfftw3-dev python3-dev libuhd-dev libairspy-dev libhackrf-dev | |
version: 1.1 | |
execute_install_scripts: true | |
- name: Install Dependencies | |
run: | | |
sudo apt install -y libboost-all-dev | |
# - name: Install cibuildwheel | |
# run: python -m pip install cibuildwheel | |
# - name: Build wheels | |
# run: python -m cibuildwheel --output-dir dist | |
# # to supply options, put them in 'env', like: | |
# # env: | |
# # CIBW_SOME_OPTION: value | |
# env: | |
# CIBW_BUILD: "cp39-*64 cp310-*64 cp311-*64 cp312-*64" | |
# CIBW_BEFORE_BUILD: git submodule update --init --recursive && pip install . | |
- name: Build wheels | |
run: python -m pip wheel -w dist . | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
./dist/*.whl | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build_wheels] | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
ref: master | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: dist | |
- name: Check dist | |
run: ls -R dist | |
- name: Publish package distributions to GitHub Releases | |
id: github-release | |
uses: python-semantic-release/upload-to-gh-release@main | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |