Files
spleeter/.circleci/config.yml
Félix Voituret 2c6c927f47 fix: conda deploy
2019-11-19 11:27:34 +01:00

120 lines
3.7 KiB
YAML

version: 2
jobs:
# =======================================================================================
# Python 3.6 testing.
# =======================================================================================
test-3.6:
docker:
- image: python:3.6
working_directory: ~/spleeter
steps:
- checkout
- restore_cache:
key: models-{{ checksum "spleeter/model/__init__.py" }}
- 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 pytest-xdist
- run:
name: run tests
command: make test
- save_cache:
key: models-{{ checksum "spleeter/model/__init__.py" }}
paths:
- "pretrained_models"
# =======================================================================================
# Python 3.7 testing.
# =======================================================================================
test-3.7:
docker:
- image: python:3.7
working_directory: ~/spleeter
steps:
- checkout
- restore_cache:
key: models-{{ checksum "spleeter/model/__init__.py" }}
- 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 pytest-xdist
- run:
name: run tests
command: make test
- save_cache:
key: models-{{ checksum "spleeter/model/__init__.py" }}
paths:
- "pretrained_models"
# =======================================================================================
# Source distribution packaging.
# =======================================================================================
sdist:
docker:
- image: python:3
steps:
- checkout
- run:
name: package source distribution
command: make build
- save_cache:
key: sdist-{{ .Branch }}-{{ checksum "setup.py" }}
paths:
- dist
# =======================================================================================
# PyPi deployment.
# =======================================================================================
pypi-deploy:
docker:
- image: python:3
steps:
- checkout
- restore_cache:
key: sdist-{{ .Branch }}-{{ checksum "setup.py" }}
- run:
name: upload to PyPi
# TODO: Infer destination regarding of branch.
# - master => production PyPi
# - other => testing PyPi
command: make deploy
# =======================================================================================
# Conda distribution.
# =======================================================================================
conda-forge-deploy:
docker:
- image: python:3
steps:
- run:
name: install dependencies
command: apt-get update && apt-get install -y git openssl hub
- run:
name: checkout feedstock
command: make feedstock
workflows:
version: 2
spleeter-workflow:
jobs:
- test-3.6
- test-3.7
- sdist:
requires:
- test-3.6
- test-3.7
- pypi-deploy:
filters:
branches:
only:
- master
requires:
- sdist
- conda-forge-deploy:
filters:
branches:
only:
- master
requires:
- pypi-deploy