mirror of
https://github.com/YuzuZensai/spleeter.git
synced 2026-01-31 14:58:23 +00:00
fix: conda deploy
This commit is contained in:
@@ -77,25 +77,22 @@ jobs:
|
|||||||
name: upload to PyPi
|
name: upload to PyPi
|
||||||
# TODO: Infer destination regarding of branch.
|
# TODO: Infer destination regarding of branch.
|
||||||
# - master => production PyPi
|
# - master => production PyPi
|
||||||
# - development => testing PyPi
|
# - other => testing PyPi
|
||||||
command: make deploy
|
command: make deploy
|
||||||
|
|
||||||
# =======================================================================================
|
# =======================================================================================
|
||||||
# Conda distribution.
|
# Conda distribution.
|
||||||
# =======================================================================================
|
# =======================================================================================
|
||||||
#conda-deploy:
|
conda-forge-deploy:
|
||||||
# docker:
|
docker:
|
||||||
# - image: null # TODO: use circle ci python image.
|
- image: python:3
|
||||||
# steps:
|
steps:
|
||||||
# - run:
|
- run:
|
||||||
# name: checkout feedstock
|
name: install dependencies
|
||||||
# command: git clone https://github.com/conda-forge/spleeter-feedstock
|
command: apt-get update && apt-get install -y git openssl hub
|
||||||
# - run:
|
- run:
|
||||||
# name: update version
|
name: checkout feedstock
|
||||||
# command: sed -i 's///g'
|
command: make feedstock
|
||||||
# - run:
|
|
||||||
# name: deploy
|
|
||||||
# command: git add recipe && git commit -m "" && git push
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
spleeter-workflow:
|
spleeter-workflow:
|
||||||
@@ -112,4 +109,11 @@ workflows:
|
|||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
requires:
|
requires:
|
||||||
- sdist
|
- sdist
|
||||||
|
- conda-forge-deploy:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
requires:
|
||||||
|
- pypi-deploy
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -109,4 +109,5 @@ __pycache__
|
|||||||
|
|
||||||
pretrained_models
|
pretrained_models
|
||||||
docs/build
|
docs/build
|
||||||
.vscode
|
.vscode
|
||||||
|
spleeter-feedstock/
|
||||||
41
Makefile
41
Makefile
@@ -5,33 +5,36 @@
|
|||||||
# @licence MIT Licence
|
# @licence MIT Licence
|
||||||
# =======================================================
|
# =======================================================
|
||||||
|
|
||||||
|
FFEDSTOCK = spleeter-feedstock
|
||||||
|
FEEDSTOCK_REPOSITORY = https://github.com/deezer/$(FEEDSTOCK)
|
||||||
|
FEEDSTOCK_RECIPE = $(FEEDSTOCK)/recipe/spleeter/meta.yaml
|
||||||
|
|
||||||
|
all: clean build test deploy
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -Rf *.egg-info
|
rm -Rf *.egg-info
|
||||||
rm -Rf dist
|
rm -Rf dist
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@echo "=== Build CPU bdist package"
|
|
||||||
python3 setup.py sdist
|
python3 setup.py sdist
|
||||||
@echo "=== CPU version checksum"
|
|
||||||
@openssl sha256 dist/*.tar.gz
|
|
||||||
|
|
||||||
build-gpu:
|
test:
|
||||||
@echo "=== Build GPU bdist package"
|
|
||||||
python3 setup.py sdist --target gpu
|
|
||||||
@echo "=== GPU version checksum"
|
|
||||||
@openssl sha256 dist/*.tar.gz
|
|
||||||
|
|
||||||
pip-dependencies:
|
|
||||||
pip install twine
|
|
||||||
|
|
||||||
test: pip-dependencies
|
|
||||||
pytest -W ignore::FutureWarning -W ignore::DeprecationWarning -vv --forked
|
pytest -W ignore::FutureWarning -W ignore::DeprecationWarning -vv --forked
|
||||||
|
|
||||||
test-distribution: pip-dependencies
|
feedstock: build
|
||||||
bash tests/test_pypi_sdist.sh
|
$(eval VERSION = $(shell grep 'project_version = ' setup.py | cut -d' ' -f3 | sed "s/'//g"))
|
||||||
|
$(eval CHECKSUM = $(shell openssl sha256 dist/spleeter-$(VERSION).tar.gz | cut -d' ' -f2))
|
||||||
|
git clone $(FEEDSTOCK_REPOSITORY)
|
||||||
|
sed 's/{% set version = "[0-9]*\.[0-9]*\.[0-9]*" %}/{% set version = "$(VERSION)" %}/g' $(FEEDSTOCK_RECIPE)
|
||||||
|
sed 's/sha256: [0-9a-z]*/sha: $(CHECKSUM)/g' $(FEEDSTOCK_RECIPE)
|
||||||
|
git config credential.helper 'cache --timeout=120'
|
||||||
|
git config user.email "research@deezer.com"
|
||||||
|
git config user.name "spleeter-ci"
|
||||||
|
git add recipe/spleeter/meta.yaml
|
||||||
|
git commit --allow-empty -m "feat: update spleeter version from CI"
|
||||||
|
git push -q https://$$FEEDSTOCK_TOKEN@github.com/deezer/$(FEEDSTOCK)
|
||||||
|
hub pull-request -m "Update spleeter version to $(VERSION)"
|
||||||
|
|
||||||
deploy: pip-dependencies
|
deploy: pip-dependencies
|
||||||
twine upload dist/*
|
pip install twine
|
||||||
|
twine upload dist/*
|
||||||
all: clean test build build-gpu upload
|
|
||||||
Reference in New Issue
Block a user