Fix Linux build command (#23)

This commit is contained in:
Chidi Williams 2022-10-04 21:54:16 +01:00 committed by GitHub
parent 14765badc6
commit 0c61940bd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 124 additions and 49 deletions

View file

@ -3,28 +3,13 @@ name: CI
'on': push
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
CMD_BUILD: |
brew install create-dmg
poetry run make bundle_mac version=$GITHUB_REF_NAME
PATH: |
dist/buzz*.dmg
dist/buzz*.tar.gz
- os: windows-latest
CMD_BUILD: |
poetry run make bundle_windows version=$env:GITHUB_REF_NAME
PATH: |
dist/buzz*.tar.gz
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10.6'
python-version: '3.9.13'
- name: Install Poetry Action
uses: snok/install-poetry@v1.3.1
@ -42,15 +27,51 @@ jobs:
- run: poetry install
- name: Test
run: poetry run pytest --cov --cov-fail-under=73
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
CMD_BUILD: |
brew install create-dmg
poetry run make bundle_mac version=$GITHUB_REF_NAME
- os: ubuntu-latest
CMD_BUILD: |
poetry run make bundle_linux version=$GITHUB_REF_NAME
- os: windows-latest
CMD_BUILD: |
poetry run make bundle_windows version=$env:GITHUB_REF_NAME
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9.13'
- name: Install Poetry Action
uses: snok/install-poetry@v1.3.1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-2
- run: poetry install
- run: ${{ matrix.CMD_BUILD }}
- uses: actions/upload-artifact@v3
with:
name: Buzz
path: |
${{ matrix.PATH }}
dist/buzz*.dmg
dist/buzz*.tar.gz
release:
runs-on: ubuntu-latest
needs: build
needs: [build, test]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3

View file

@ -4,16 +4,12 @@ buzz:
clean:
rm -r dist/* || true
bundle_windows:
make buzz
tar -czf dist/buzz-${version}-windows.tar.gz dist/Buzz
test:
pytest --cov --cov-fail-under=75
bundle_mac:
make buzz
tar -czf dist/buzz-${version}-unix.tar.gz dist/Buzz
tar -czf dist/buzz-${version}-mac.tar.gz dist/Buzz
mkdir -p dist/dmg && cp -r dist/Buzz.app dist/dmg
create-dmg \
--volname "Buzz" \
@ -27,6 +23,14 @@ bundle_mac:
"dist/buzz-${version}-mac.dmg" \
"dist/dmg/"
bundle_linux:
make buzz
tar -czf dist/buzz-${version}-unix.tar.gz dist/Buzz
bundle_windows:
make buzz
tar -czf dist/buzz-${version}-windows.tar.gz dist/Buzz
release:
make clean
make bundle_mac version=${version}

94
poetry.lock generated
View file

@ -10,7 +10,7 @@ python-versions = "*"
name = "attrs"
version = "22.1.0"
description = "Classes Without Boilerplate"
category = "dev"
category = "main"
optional = false
python-versions = ">=3.5"
@ -128,7 +128,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
[[package]]
name = "huggingface-hub"
version = "0.9.1"
version = "0.10.0"
description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
category = "main"
optional = false
@ -143,12 +143,13 @@ tqdm = "*"
typing-extensions = ">=3.7.4.3"
[package.extras]
all = ["black (==22.3)", "datasets", "flake8 (>=3.8.3)", "flake8-bugbear", "isort (>=5.5.4)", "pytest", "pytest-cov", "soundfile"]
dev = ["black (==22.3)", "datasets", "flake8 (>=3.8.3)", "flake8-bugbear", "isort (>=5.5.4)", "pytest", "pytest-cov", "soundfile"]
all = ["InquirerPy (==0.3.4)", "Jinja2", "black (==22.3)", "flake8 (>=3.8.3)", "flake8-bugbear", "isort (>=5.5.4)", "jedi", "mypy", "pytest", "pytest-cov", "soundfile"]
cli = ["InquirerPy (==0.3.4)"]
dev = ["InquirerPy (==0.3.4)", "Jinja2", "black (==22.3)", "flake8 (>=3.8.3)", "flake8-bugbear", "isort (>=5.5.4)", "jedi", "mypy", "pytest", "pytest-cov", "soundfile"]
fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"]
quality = ["black (==22.3)", "flake8 (>=3.8.3)", "flake8-bugbear", "isort (>=5.5.4)"]
quality = ["black (==22.3)", "flake8 (>=3.8.3)", "flake8-bugbear", "isort (>=5.5.4)", "mypy"]
tensorflow = ["graphviz", "pydot", "tensorflow"]
testing = ["datasets", "pytest", "pytest-cov", "soundfile"]
testing = ["InquirerPy (==0.3.4)", "Jinja2", "isort (>=5.5.4)", "jedi", "pytest", "pytest-cov", "soundfile"]
torch = ["torch"]
[[package]]
@ -163,7 +164,7 @@ python-versions = ">=3.5"
name = "iniconfig"
version = "1.1.1"
description = "iniconfig: brain-dead simple config-ini parsing"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -220,7 +221,7 @@ future = "*"
name = "pluggy"
version = "1.0.0"
description = "plugin and hook calling mechanisms for python"
category = "dev"
category = "main"
optional = false
python-versions = ">=3.6"
@ -232,7 +233,7 @@ testing = ["pytest", "pytest-benchmark"]
name = "py"
version = "1.11.0"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
@ -323,7 +324,7 @@ python-versions = ">=3.7"
name = "pytest"
version = "7.1.3"
description = "pytest: simple powerful testing with Python"
category = "dev"
category = "main"
optional = false
python-versions = ">=3.7"
@ -354,6 +355,41 @@ pytest = ">=4.6"
[package.extras]
testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"]
[[package]]
name = "pytest-qt"
version = "4.1.0"
description = "pytest support for PyQt and PySide applications"
category = "main"
optional = false
python-versions = ">=3.7"
[package.dependencies]
pytest = ">=3.0.0"
[package.extras]
dev = ["pre-commit", "tox"]
doc = ["sphinx", "sphinx-rtd-theme"]
[[package]]
name = "pytest-xvfb"
version = "2.0.0"
description = "A pytest plugin to run Xvfb for tests."
category = "dev"
optional = false
python-versions = ">=3.5"
[package.dependencies]
pytest = ">=2.8.1"
pyvirtualdisplay = ">=1.3"
[[package]]
name = "PyVirtualDisplay"
version = "3.0"
description = "python wrapper for Xvfb, Xephyr and Xvnc"
category = "dev"
optional = false
python-versions = "*"
[[package]]
name = "pywin32-ctypes"
version = "0.2.0"
@ -398,14 +434,14 @@ use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"]
[[package]]
name = "setuptools"
version = "65.4.0"
version = "65.4.1"
description = "Easily download, build, install, upgrade, and uninstall Python packages"
category = "dev"
optional = false
python-versions = ">=3.7"
[package.extras]
docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mock", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"]
testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"]
@ -455,7 +491,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
name = "tomli"
version = "2.0.1"
description = "A lil' TOML parser"
category = "dev"
category = "main"
optional = false
python-versions = ">=3.7"
@ -489,7 +525,7 @@ telegram = ["requests"]
[[package]]
name = "transformers"
version = "4.22.1"
version = "4.22.2"
description = "State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow"
category = "main"
optional = false
@ -593,12 +629,12 @@ dev = ["pytest"]
type = "git"
url = "https://github.com/openai/whisper.git"
reference = "HEAD"
resolved_reference = "0b1ba3d46ebf7fe6f953acfd8cad62a4f851b49f"
resolved_reference = "9e653bd0ea0f1e9493cb4939733e9de249493cfb"
[metadata]
lock-version = "1.1"
python-versions = "~3.10.1"
content-hash = "d62dae30187aa00d143e75390b3760a34e6be7cdb4060dabc7896e5edf414d66"
python-versions = "~3.9.13"
content-hash = "317773e01f6d9ee6f87008201e2e2a7bf13b9cbd540f5ffdf2539552b40646ed"
[metadata.files]
altgraph = [
@ -758,8 +794,8 @@ future = [
{file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"},
]
huggingface-hub = [
{file = "huggingface_hub-0.9.1-py3-none-any.whl", hash = "sha256:7a588046bdeb84e7bc99b3da58bbb4312a56d94ba51ebc60dfe610c18b3d0b9f"},
{file = "huggingface_hub-0.9.1.tar.gz", hash = "sha256:6395f26aaf44bbb4a73d3e14aca228fa39534696f651c6c82a6347f8c9f5950b"},
{file = "huggingface_hub-0.10.0-py3-none-any.whl", hash = "sha256:71c6ca3014cbf1245cafbc0b426a27e0ff0465853b4f85aefcd2863f61f1dc2d"},
{file = "huggingface_hub-0.10.0.tar.gz", hash = "sha256:1c7ec31b837db090abdf60c3e008e8d8569d47d976671699adb880aacf60d491"},
]
idna = [
{file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"},
@ -891,6 +927,18 @@ pytest-cov = [
{file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
{file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
]
pytest-qt = [
{file = "pytest-qt-4.1.0.tar.gz", hash = "sha256:027f3d3f5dd04af0530d846cf50fb858f719f7e87c2e4a1c686abd4e0f72172a"},
{file = "pytest_qt-4.1.0-py2.py3-none-any.whl", hash = "sha256:edd08dae3b207405edddfc482d4dda4b848e85a8e6a0e7c36f20bac11ab328de"},
]
pytest-xvfb = [
{file = "pytest-xvfb-2.0.0.tar.gz", hash = "sha256:c4ba642de05499940db7f65ee111621939be513e3e75c3da9156b7235e2ed8cf"},
{file = "pytest_xvfb-2.0.0-py3-none-any.whl", hash = "sha256:6d21b46f099c06d6b8b200e73341da3adb73d67e9139c55d617930881779360b"},
]
PyVirtualDisplay = [
{file = "PyVirtualDisplay-3.0-py3-none-any.whl", hash = "sha256:40d4b8dfe4b8de8552e28eb367647f311f88a130bf837fe910e7f180d5477f0e"},
{file = "PyVirtualDisplay-3.0.tar.gz", hash = "sha256:09755bc3ceb6eb725fb07eca5425f43f2358d3bf08e00d2a9b792a1aedd16159"},
]
pywin32-ctypes = [
{file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"},
{file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"},
@ -1032,8 +1080,8 @@ requests = [
{file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"},
]
setuptools = [
{file = "setuptools-65.4.0-py3-none-any.whl", hash = "sha256:c2d2709550f15aab6c9110196ea312f468f41cd546bceb24127a1be6fdcaeeb1"},
{file = "setuptools-65.4.0.tar.gz", hash = "sha256:a8f6e213b4b0661f590ccf40de95d28a177cd747d098624ad3f69c40287297e9"},
{file = "setuptools-65.4.1-py3-none-any.whl", hash = "sha256:1b6bdc6161661409c5f21508763dc63ab20a9ac2f8ba20029aaaa7fdb9118012"},
{file = "setuptools-65.4.1.tar.gz", hash = "sha256:3050e338e5871e70c72983072fe34f6032ae1cdeeeb67338199c2f74e083a80e"},
]
six = [
{file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
@ -1116,8 +1164,8 @@ tqdm = [
{file = "tqdm-4.64.1.tar.gz", hash = "sha256:5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4"},
]
transformers = [
{file = "transformers-4.22.1-py3-none-any.whl", hash = "sha256:8f06d0dbdb95717fc4a48c61d876f25a35ca67e95851581c681fe4e6d1cf9f94"},
{file = "transformers-4.22.1.tar.gz", hash = "sha256:b9834aa01979778c16130ad260e41d314f4c3a65930bdc40b1232833c988280b"},
{file = "transformers-4.22.2-py3-none-any.whl", hash = "sha256:4f3b81578683cbabe06c68240d096997026f950ae4fdcd40566c2b84cf875cf7"},
{file = "transformers-4.22.2.tar.gz", hash = "sha256:bbdd0271d86b23e86b4ad83b38e82681105dd6b080e142b16af5f5f3b68fefc4"},
]
typing-extensions = [
{file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"},

View file

@ -7,7 +7,7 @@ license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = "~3.10.1"
python = "~3.9.13"
sounddevice = "^0.4.5"
whisper = {git = "https://github.com/openai/whisper.git"}
PyQt5 = "^5.15.7"
@ -16,6 +16,7 @@ tqdm = "^4.64.1"
ffmpeg = "^1.4"
numpy = "^1.23.3"
transformers = "^4.22.1"
pytest-qt = "^4.1.0"
[tool.poetry.group.dev.dependencies]
autopep8 = "^1.7.0"
@ -23,6 +24,7 @@ pyinstaller = "^5.4.1"
six = "^1.16.0"
pytest = "^7.1.3"
pytest-cov = "^4.0.0"
pytest-xvfb = "^2.0.0"
[build-system]
requires = ["poetry-core"]