Skip to content

AugDiskCachedDataset to map the copy index to augmentation parameter #490

AugDiskCachedDataset to map the copy index to augmentation parameter

AugDiskCachedDataset to map the copy index to augmentation parameter #490

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
multitest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2022]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- if: matrix.os == 'ubuntu-latest'
name: install audio library libsndfile
run: sudo apt-get -y update && sudo apt-get install -y libsndfile1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install -r test/requirements.txt
pip install -r test/torch_requirements.txt
pip install .
- name: Test with pytest
run: pytest test
env:
CI: true
coverage:
needs: multitest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install audio library libsndfile
run: sudo apt-get -y update && sudo apt-get install -y libsndfile1
- name: Setup Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Generate coverage report
run: |
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install -r test/requirements.txt
pip install -r test/torch_requirements.txt
pip install .
coverage run -m pytest test
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
documentation:
needs: multitest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install audio library libsndfile
run: sudo apt-get -y update && sudo apt-get install -y libsndfile1
- name: Setup Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install -r docs/requirements.txt
pip install .
- name: Build documentation
run: cd docs && make clean && make html # Use SPHINXOPTS="-W" to fail on warning.
build-and-publish:
needs: documentation
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install audio library libsndfile
run: sudo apt-get -y update && sudo apt-get install -y libsndfile1
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install wheel
run: pip install wheel
- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel
- name: Publish distribution package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_DEPLOYMENT }}
skip-existing: true
- name: Github release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')