Browse Source

Moved conda build env spec to separate .yml file

lon0
Kevin Hallock 7 years ago
parent
commit
c9d5ed9941
  1. 11
      .circleci/conda_env.yml
  2. 13
      .circleci/config.yml

11
.circleci/conda_env.yml

@ -0,0 +1,11 @@
name: wrf-python
channels:
- conda-forge
dependencies:
- gcc
- setuptools
- python
- numpy
- wrapt
- xarray
- netcdf4

13
.circleci/config.yml

@ -23,29 +23,26 @@ jobs:
# Download and cache dependencies # Download and cache dependencies
- restore_cache: - restore_cache:
keys: keys:
- v1-dependencies-{{ checksum ".circleci/config.yml" }} - v1-dependencies-{{ checksum ".circleci/conda_env.yml" }}
# fallback to using the latest cache if no exact match is found # fallback to using the latest cache if no exact match is found
- v1-dependencies- - v1-dependencies-
- run: - run:
name: install conda name: install conda and dependencies
command: | command: |
test -d ~/miniconda3 || exit 0
echo "Installing a fresh version of Miniconda." echo "Installing a fresh version of Miniconda."
MINICONDA_URL="https://repo.continuum.io/miniconda" MINICONDA_URL="https://repo.continuum.io/miniconda"
MINICONDA_FILE="Miniconda3-latest-Linux-x86_64.sh" MINICONDA_FILE="Miniconda3-latest-Linux-x86_64.sh"
curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}"
bash $MINICONDA_FILE -b bash $MINICONDA_FILE -b
- run:
name: install dependencies
command: |
source ~/miniconda3/bin/activate root source ~/miniconda3/bin/activate root
conda create -n wrf-python -c conda-forge gcc setuptools python numpy wrapt xarray netcdf4 conda env create -f .circleci/conda_env.yml
- save_cache: - save_cache:
paths: paths:
- ~/miniconda3 - ~/miniconda3
key: v1-dependencies-{{ checksum ".circleci/config.yml" }} key: v1-dependencies-{{ checksum ".circleci/conda_env.yml" }}
- run: - run:
name: build wrf-python name: build wrf-python

Loading…
Cancel
Save