Hi
I want to test multiple python and numpy versions using miniconda python. I tried to use different python images but it uses only python 3.7 as I install latest miniconda version. could you tell us how to use multiple versions?
below is config.yml
version: 2.0
workflows:
version: 2
test:
jobs:
- py3.6-np1.15
- py3.5-np1.15
- py3.6-np1.14
- py3.5-np1.14
- py3.7-np1.15
- py3.5-np1.16
- py3.6-np1.16
- py3.7-np1.16
jobs:
py3.6-np1.15: &test-template
docker:
- image: circleci/python:3.6.8
environment:
NUMPY_VERSION: 1.15.2
CYTHON_VERSION: 0.29.2
working_directory: ~/repo
steps:
- checkout
- run:
name: Install System Dependencies
command: sudo apt-get update && sudo apt-get install -y libmpich12 libmpich-dev build-essential
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}
- run:
name: install anaconda
command: |
wget https://repo.continuum.io/miniconda/Miniconda3-4.7.10-Linux-x86_64.sh -O ~/miniconda.sh
chmod +x ~/miniconda.sh && ~/miniconda.sh -b
export PATH=$HOME/miniconda3/bin:$PATH
conda update --quiet --yes conda
- run:
name: Install numpy, cython, mdtraj
command: |
export PATH=$HOME/miniconda3/bin:$PATH
conda install --quiet --yes numpy==$NUMPY_VERSION cython==$CYTHON_VERSION
conda install --quiet --yes -c conda-forge mdtraj
# - run:
# name: Upgrade pip
# command: |
# python3 -m venv venv
# . venv/bin/activate
# pip install pip==18.0
# - run:
# name: Install numpy and cython
# command: |
# python3 -m venv venv
# . venv/bin/activate
# pip install --progress-bar off numpy==$NUMPY_VERSION cython==$CYTHON_VERSION
- run:
name: Install and build
command: |
export PATH=$HOME/miniconda3/bin:$PATH
pip install --progress-bar off .[dev]
python setup.py build_ext --inplace
python setup.py install
py3.5-np1.15:
<<: *test-template
docker:
- image: circleci/python:3.5.7
environment:
NUMPY_VERSION: 1.14.2
CYTHON_VERSION: 0.29.2
py3.6-np1.14:
<<: *test-template
environment:
NUMPY_VERSION: 1.14.2
CYTHON_VERSION: 0.29.2
py3.5-np1.14:
<<: *test-template
docker:
- image: circleci/python:3.5.7
environment:
NUMPY_VERSION: 1.14.2
CYTHON_VERSION: 0.29.2
py3.7-np1.15:
<<: *test-template
docker:
- image: circleci/python:3.7.3
py3.5-np1.16:
<<: *test-template
docker:
- image: circleci/python:3.5.7
environment:
NUMPY_VERSION: 1.16.5
CYTHON_VERSION: 0.29.2
py3.6-np1.16:
<<: *test-template
environment:
NUMPY_VERSION: 1.16.5
CYTHON_VERSION: 0.29.2
py3.7-np1.16:
<<: *test-template
docker:
- image: circleci/python:3.7.3
environment:
NUMPY_VERSION: 1.16.5
CYTHON_VERSION: 0.29.2