Skip to content

Commit

Permalink
[ci] universal conda build (#1471)
Browse files Browse the repository at this point in the history
* Update setup.cfg

* rm conda_build_config

* rm conda_build_config
  • Loading branch information
Jeff Yang authored Nov 24, 2020
1 parent 3bde732 commit 3094966
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exclude: "^conda.recipe"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
Expand Down
8 changes: 2 additions & 6 deletions conda.recipe/build_and_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ set -xeu
conda install -y conda-build conda-verify anaconda-client
conda config --set anaconda_upload no

conda build --quiet --no-test --output-folder conda_build conda.recipe -c pytorch

# Convert to other platforms: OSX, WIN
conda convert --platform win-64 conda_build/linux-64/*.tar.bz2 -o conda_build/
conda convert --platform osx-64 conda_build/linux-64/*.tar.bz2 -o conda_build/
conda build --no-test --output-folder conda_build conda.recipe -c pytorch

# Upload to Anaconda
# We could use --all but too much platforms to uploaded
ls conda_build/*/*.tar.bz2 | xargs -I {} anaconda -v -t $ANACONDA_TOKEN upload -u $UPLOAD_USER {}
ls conda_build/*/*.tar.bz2 | xargs -I {} anaconda -v -t $ANACONDA_TOKEN upload -u $UPLOAD_USER {}
5 changes: 0 additions & 5 deletions conda.recipe/conda_build_config.yaml

This file was deleted.

9 changes: 5 additions & 4 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ source:

build:
number: 0
noarch: python
script: python setup.py install --single-version-externally-managed --record=record.txt

# https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#export-runtime-requirements
requirements:
build:
- python
- python>=3.5
- setuptools
- pytorch 1.*.*
- pytorch>=1.3

run:
- python
- pytorch 1.*.*
- python>=3.5
- pytorch>=1.3

test:
imports:
Expand Down

0 comments on commit 3094966

Please sign in to comment.