2019-11-06 23:16:20 +01:00
|
|
|
version: 2
|
|
|
|
|
jobs:
|
2019-11-08 19:35:30 -05:00
|
|
|
# =======================================================================================
|
|
|
|
|
# Python 3.6 testing.
|
|
|
|
|
# =======================================================================================
|
2019-11-08 19:23:26 -05:00
|
|
|
test-3.6:
|
|
|
|
|
docker:
|
|
|
|
|
- image: python:3.6
|
|
|
|
|
working_directory: ~/spleeter
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
|
- run:
|
|
|
|
|
name: install ffmpeg
|
|
|
|
|
command: apt-get update && apt-get install -y ffmpeg
|
|
|
|
|
- run:
|
|
|
|
|
name: install python dependencies
|
|
|
|
|
command: pip install -r requirements.txt && pip install pytest
|
|
|
|
|
- run:
|
|
|
|
|
name: pytest
|
|
|
|
|
command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning
|
2019-11-08 19:35:30 -05:00
|
|
|
# =======================================================================================
|
|
|
|
|
# Python 3.7 testing.
|
|
|
|
|
# =======================================================================================
|
2019-11-08 19:23:26 -05:00
|
|
|
test-3.7:
|
2019-11-06 23:16:20 +01:00
|
|
|
docker:
|
2019-11-06 23:42:02 +01:00
|
|
|
- image: python:3.7
|
2019-11-06 23:16:20 +01:00
|
|
|
working_directory: ~/spleeter
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
2019-11-06 23:32:52 +01:00
|
|
|
- run:
|
|
|
|
|
name: install ffmpeg
|
2019-11-06 23:36:41 +01:00
|
|
|
command: apt-get update && apt-get install -y ffmpeg
|
2019-11-06 23:16:20 +01:00
|
|
|
- run:
|
2019-11-08 19:23:26 -05:00
|
|
|
name: install python dependencies
|
|
|
|
|
command: pip install -r requirements.txt && pip install pytest
|
2019-11-08 19:35:30 -05:00
|
|
|
- run:
|
|
|
|
|
name: pytest
|
|
|
|
|
command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning
|
|
|
|
|
# =======================================================================================
|
|
|
|
|
# Source distribution packaging.
|
|
|
|
|
# =======================================================================================
|
|
|
|
|
sdist:
|
2019-11-06 23:16:20 +01:00
|
|
|
docker:
|
2019-11-06 23:35:41 +01:00
|
|
|
- image: python:3
|
2019-11-06 23:16:20 +01:00
|
|
|
steps:
|
|
|
|
|
- checkout
|
2019-11-06 23:20:33 +01:00
|
|
|
- run:
|
2019-11-06 23:16:20 +01:00
|
|
|
name: package
|
2019-11-07 00:24:27 +01:00
|
|
|
command: python setup.py sdist
|
2019-11-08 19:35:30 -05:00
|
|
|
- save_cache:
|
2019-11-08 19:38:20 -05:00
|
|
|
key: sdist-{{ .Branch }}-{{ checksum "setup.py" }}
|
2019-11-08 19:35:30 -05:00
|
|
|
paths:
|
|
|
|
|
- dist
|
|
|
|
|
# =======================================================================================
|
|
|
|
|
# PyPi deployment.
|
|
|
|
|
# =======================================================================================
|
|
|
|
|
pypi-deploy:
|
|
|
|
|
docker:
|
|
|
|
|
- image: python:3
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
|
- restore_cache:
|
2019-11-08 19:38:20 -05:00
|
|
|
key: sdist-{{ .Branch }}-{{ checksum "setup.py" }}
|
2019-11-06 23:16:20 +01:00
|
|
|
- run:
|
|
|
|
|
name: upload to PyPi
|
2019-11-06 23:35:41 +01:00
|
|
|
command: pip install twine && twine upload dist/*
|
2019-11-06 23:20:33 +01:00
|
|
|
workflows:
|
|
|
|
|
version: 2
|
2019-11-08 19:40:45 -05:00
|
|
|
spleeter-workflow:
|
2019-11-06 23:20:33 +01:00
|
|
|
jobs:
|
2019-11-08 19:23:26 -05:00
|
|
|
- test-3.6
|
|
|
|
|
- test-3.7
|
2019-11-08 19:35:30 -05:00
|
|
|
- sdist:
|
|
|
|
|
requires:
|
|
|
|
|
- test-3.6
|
|
|
|
|
- test-3.7
|
2019-11-08 19:23:26 -05:00
|
|
|
- pypi-deploy:
|
2019-11-06 23:20:33 +01:00
|
|
|
filters:
|
|
|
|
|
branches:
|
|
|
|
|
only:
|
|
|
|
|
- master
|
2019-11-08 19:35:30 -05:00
|
|
|
- development
|
2019-11-06 23:20:33 +01:00
|
|
|
requires:
|
2019-11-08 19:35:30 -05:00
|
|
|
- sdist
|