Skip to content

Commit

Permalink
CI Use conda instead of pip to install anaconda-client (scikit-learn#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alfaro96 authored Mar 17, 2021
1 parent 95b7c68 commit edc6995
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion build_tools/github/upload_anaconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ else
ANACONDA_TOKEN="$SCIKIT_LEARN_STAGING_UPLOAD_TOKEN"
fi

pip install git+https://github.com/Anaconda-Server/anaconda-client
# Install Python 3.8 because of a bug with Python 3.9
export PATH=$CONDA/bin:$PATH
conda create -n upload -y python=3.8
source activate upload
conda install -y anaconda-client

# Force a replacement if the remote file already exists
anaconda -t $ANACONDA_TOKEN upload --force -u $ANACONDA_ORG dist/artifact/*
Expand Down
11 changes: 10 additions & 1 deletion build_tools/travis/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ if [[ $BUILD_WHEEL == true && $TRAVIS_EVENT_TYPE != pull_request ]]; then
ANACONDA_TOKEN="$SCIKIT_LEARN_STAGING_UPLOAD_TOKEN"
fi

pip install git+https://github.com/Anaconda-Server/anaconda-client
MINICONDA_URL="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh"
wget $MINICONDA_URL -O miniconda.sh
MINICONDA_PATH=$HOME/miniconda
chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH

# Install Python 3.8 because of a bug with Python 3.9
export PATH=$MINICONDA_PATH/bin:$PATH
conda create -n upload -y python=3.8
source activate upload
conda install -y anaconda-client

# Force a replacement if the remote file already exists
anaconda -t $ANACONDA_TOKEN upload --force -u $ANACONDA_ORG wheelhouse/*.whl
Expand Down

0 comments on commit edc6995

Please sign in to comment.