-
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from kadirnar/feature/whisplus-enhancements
feat: π Add GitHub workflows for package testing and CI, integrate logger support in whisper.py π€
- Loading branch information
Showing
6 changed files
with
204 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: kadirnar |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Python package CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.8, 3.9, 3.10, 3.11] | ||
torch-version: [2.1.0, 2.1.1] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Restore Ubuntu cache | ||
uses: actions/cache@v2 | ||
if: matrix.operating-system == 'ubuntu-latest' | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ matrix.operating-system }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.operating-system }}-${{ matrix.python-version }}- | ||
|
||
- name: Restore MacOS cache | ||
uses: actions/cache@v2 | ||
if: matrix.operating-system == 'macos-latest' | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: ${{ matrix.operating-system }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.operating-system }}-${{ matrix.python-version }}- | ||
|
||
- name: Restore Windows cache | ||
uses: actions/cache@v2 | ||
if: matrix.operating-system == 'windows-latest' | ||
with: | ||
path: ~\AppData\Local\pip\Cache | ||
key: ${{ matrix.operating-system }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.operating-system }}-${{ matrix.python-version }}- | ||
|
||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Check styling with pre-commit | ||
run: | | ||
pre-commit install | ||
pre-commit run --all-files | ||
- name: Install PyTorch on Linux and Windows | ||
if: > | ||
matrix.operating-system == 'ubuntu-latest' || | ||
matrix.operating-system == 'windows-latest' | ||
run: > | ||
pip install torch==${{ matrix.torch-version }}+cpu | ||
-f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install PyTorch on MacOS | ||
if: matrix.operating-system == 'macos-latest' | ||
run: pip install torch==${{ matrix.torch-version }} | ||
- name: Install PyTorch on Linux and Windows | ||
|
||
- name: Install whisperplus package from local setup.py | ||
run: > | ||
pip install -e . | ||
- name: Unittest whisperplus | ||
run: | | ||
python -m unittest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Package Testing | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.8, 3.9, 3.10, 3.11] | ||
torch-version: [2.1.0, 2.1.1] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Restore Ubuntu cache | ||
uses: actions/cache@v2 | ||
if: matrix.operating-system == 'ubuntu-latest' | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ matrix.operating-system }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.operating-system }}-${{ matrix.python-version }}- | ||
|
||
- name: Restore MacOS cache | ||
uses: actions/cache@v2 | ||
if: matrix.operating-system == 'macos-latest' | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: ${{ matrix.operating-system }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.operating-system }}-${{ matrix.python-version }}- | ||
|
||
- name: Restore Windows cache | ||
uses: actions/cache@v2 | ||
if: matrix.operating-system == 'windows-latest' | ||
with: | ||
path: ~\AppData\Local\pip\Cache | ||
key: ${{ matrix.operating-system }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.operating-system }}-${{ matrix.python-version }}- | ||
|
||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install Numpy | ||
run: > | ||
pip install numpy | ||
- name: Install PyTorch on Linux and Windows | ||
if: > | ||
matrix.operating-system == 'ubuntu-latest' || | ||
matrix.operating-system == 'windows-latest' | ||
run: > | ||
pip install torch==${{ matrix.torch-version }}+cpu | ||
-f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install PyTorch on MacOS | ||
if: matrix.operating-system == 'macos-latest' | ||
run: pip install torch==${{ matrix.torch-version }} | ||
|
||
- name: Install latest whisperplus package | ||
run: > | ||
pip install --upgrade --force-reinstall whisperplus | ||
- name: Unittest whisperplus | ||
run: | | ||
python -m unittest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish Python distributions to PyPI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python distributions to PyPI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
- name: Publish distribution π¦ to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_WHISPERPLUS_API_KEY }} |
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
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