Files
spleeter/.circleci/config.yml

322 lines
9.4 KiB
YAML
Raw Normal View History

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:
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:
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:
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
# TODO: Infer destination regarding of branch.
# - master => production PyPi
2019-11-19 11:27:34 +01:00
# - other => testing PyPi
command: make deploy
# =======================================================================================
# Conda distribution.
# =======================================================================================
2019-11-19 11:27:34 +01:00
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
2019-11-19 11:50:57 +01:00
# =======================================================================================
# Docker build.
# =======================================================================================
docker-conda-cpu:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
command: docker build -t spleeter:conda -f docker/cpu/conda.dockerfile .
docker-conda-cpu-2stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
command: docker build -t spleeter:2-stems-conda -f docker/cpu/conda-2stems.dockerfile .
docker-conda-cpu-4stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
command: docker build -t spleeter:4-stems-conda -f docker/cpu/conda-4stems.dockerfile .
docker-conda-cpu-5stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
command: docker build -t spleeter:5-stems-conda -f docker/cpu/conda-5stems.dockerfile .
docker-3.6-cpu:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
command: docker build -t spleeter:3.6 -f docker/cpu/python-3.6.dockerfile .
docker-3.6-cpu-2stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
2019-11-19 11:52:53 +01:00
command: docker build -t spleeter:3.6-2stems -f docker/cpu/python-3.6-2stems.dockerfile .
2019-11-19 11:50:57 +01:00
docker-3.6-cpu-4stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
2019-11-19 11:52:53 +01:00
command: docker build -t spleeter:3.6-4stems -f docker/cpu/python-3.6-4stems.dockerfile .
2019-11-19 11:50:57 +01:00
docker-3.6-cpu-5stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
2019-11-19 11:52:53 +01:00
command: docker build -t spleeter:3.6-5stems -f docker/cpu/python-3.6-5stems.dockerfile .
2019-11-19 11:50:57 +01:00
docker-3.7-cpu:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
2019-11-19 11:52:53 +01:00
command: docker build -t spleeter:3.7 -f docker/cpu/python-3.7.dockerfile .
2019-11-19 11:50:57 +01:00
docker-3.7-cpu-2stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
2019-11-19 11:52:53 +01:00
command: docker build -t spleeter:3.7-2stems -f docker/cpu/python-3.7-2stems.dockerfile .
2019-11-19 11:50:57 +01:00
docker-3.7-cpu-4stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
2019-11-19 11:52:53 +01:00
command: docker build -t spleeter:3.7-4stems -f docker/cpu/python-3.7-4stems.dockerfile .
2019-11-19 11:50:57 +01:00
docker-3.7-cpu-5stems:
docker:
- image: docker:17.05.0-ce-git
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: build image
2019-11-19 11:52:53 +01:00
command: docker build -t spleeter:3.7-5stems -f docker/cpu/python-3.7-5stems.dockerfile .
2019-11-06 23:20:33 +01:00
workflows:
version: 2
2019-11-19 11:54:24 +01:00
spleeter-release-pipeline:
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-19 11:27:34 +01:00
- sdist
- conda-forge-deploy:
filters:
branches:
only:
- master
requires:
- pypi-deploy
2019-11-19 11:50:57 +01:00
- hold:
type: approval
requires:
- pypi-deploy
- conda-forge-deploy
2019-11-19 11:54:24 +01:00
filters:
branches:
only:
- master
2019-11-19 11:50:57 +01:00
- docker-conda-cpu:
requires:
- hold
filters:
branches:
only:
- master
- docker-conda-cpu-2stems:
requires:
- docker-conda-cpu
filters:
branches:
only:
- master
- docker-conda-cpu-4stems:
requires:
- docker-conda-cpu
filters:
branches:
only:
- master
- docker-conda-cpu-5stems:
requires:
- docker-conda-cpu
filters:
branches:
only:
- master
- docker-3.6-cpu:
requires:
- hold
filters:
branches:
only:
- master
- docker-3.6-cpu-2stems:
requires:
- docker-3.6-cpu
filters:
branches:
only:
- master
- docker-3.6-cpu-4stems:
requires:
- docker-3.6-cpu
filters:
branches:
only:
- master
- docker-3.6-cpu-5stems:
requires:
- docker-3.6-cpu
filters:
branches:
only:
- master
- docker-3.7-cpu:
requires:
- hold
filters:
branches:
only:
- master
- docker-3.7-cpu-2stems:
requires:
- docker-3.7-cpu
filters:
branches:
only:
- master
- docker-3.7-cpu-4stems:
requires:
- docker-3.7-cpu
filters:
branches:
only:
- master
- docker-3.7-cpu-5stems:
requires:
- docker-3.7-cpu
filters:
branches:
only:
- master