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
|
2019-11-08 19:54:33 -05:00
|
|
|
- restore_cache:
|
|
|
|
|
key: models-{{ checksum "spleeter/model/__init__.py" }}
|
2019-11-08 19:23:26 -05:00
|
|
|
- run:
|
|
|
|
|
name: install ffmpeg
|
|
|
|
|
command: apt-get update && apt-get install -y ffmpeg
|
|
|
|
|
- run:
|
|
|
|
|
name: install python dependencies
|
2019-11-08 20:21:37 -05:00
|
|
|
command: pip install -r requirements.txt && pip install pytest pytest-xdist
|
2019-11-08 19:23:26 -05:00
|
|
|
- run:
|
2019-11-14 14:44:19 -05:00
|
|
|
name: run tests
|
|
|
|
|
command: make test
|
2019-11-08 19:54:33 -05:00
|
|
|
- save_cache:
|
|
|
|
|
key: models-{{ checksum "spleeter/model/__init__.py" }}
|
|
|
|
|
paths:
|
|
|
|
|
- "pretrained_models"
|
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-08 19:54:33 -05:00
|
|
|
- restore_cache:
|
|
|
|
|
key: models-{{ checksum "spleeter/model/__init__.py" }}
|
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
|
2019-11-08 20:21:37 -05:00
|
|
|
command: pip install -r requirements.txt && pip install pytest pytest-xdist
|
2019-11-08 19:35:30 -05:00
|
|
|
- run:
|
2019-11-14 14:44:19 -05:00
|
|
|
name: run tests
|
|
|
|
|
command: make test
|
2019-11-08 19:54:33 -05:00
|
|
|
- save_cache:
|
|
|
|
|
key: models-{{ checksum "spleeter/model/__init__.py" }}
|
|
|
|
|
paths:
|
|
|
|
|
- "pretrained_models"
|
2019-11-08 19:35:30 -05:00
|
|
|
# =======================================================================================
|
|
|
|
|
# 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-14 14:44:19 -05:00
|
|
|
name: package source distribution
|
|
|
|
|
command: make build
|
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-14 13:03:55 -05:00
|
|
|
# TODO: Infer destination regarding of branch.
|
|
|
|
|
# - master => production PyPi
|
|
|
|
|
# - development => testing PyPi
|
2019-11-14 14:44:19 -05:00
|
|
|
command: make deploy
|
2019-11-14 13:03:55 -05:00
|
|
|
|
|
|
|
|
# =======================================================================================
|
|
|
|
|
# Conda distribution.
|
|
|
|
|
# =======================================================================================
|
2019-11-14 13:04:40 -05:00
|
|
|
#conda-deploy:
|
|
|
|
|
# docker:
|
|
|
|
|
# - image: null # TODO: use circle ci python image.
|
|
|
|
|
# steps:
|
|
|
|
|
# - run:
|
|
|
|
|
# name: checkout feedstock
|
|
|
|
|
# command: git clone https://github.com/conda-forge/spleeter-feedstock
|
|
|
|
|
# - run:
|
|
|
|
|
# name: update version
|
|
|
|
|
# command: sed -i 's///g'
|
|
|
|
|
# - run:
|
|
|
|
|
# name: deploy
|
|
|
|
|
# command: git add recipe && git commit -m "" && git push
|
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
|
|
|
|
|
requires:
|
2019-11-08 19:35:30 -05:00
|
|
|
- sdist
|