Skip to content

Use mamba to install Continuous Integration dependencies #841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,21 @@ jobs:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
channels: conda-forge
miniconda-version: "latest"
channels: conda-forge,nodefaults
channel-priority: strict
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
use-mamba: true

# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
run: |
conda install gmt=6.2.0 \
mamba install gmt=6.2.0 \
numpy pandas xarray netCDF4 packaging matplotlib

# Install the package that we want to test
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,29 @@ jobs:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: pygmt
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniconda-version: "latest"
channels: conda-forge,nodefaults
channel-priority: strict
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
use-mamba: true

# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
run: |
conda install gmt=6.2.0 numpy pandas xarray netCDF4 packaging \
mamba install gmt=6.2.0 numpy pandas xarray netCDF4 packaging \
ipython make myst-parser geopandas \
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme

# Show installed pkg information for postmortem diagnostic
- name: List installed packages
run: conda list
run: mamba list

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,23 @@ jobs:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: pygmt
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniconda-version: "latest"
channels: conda-forge,nodefaults
channel-priority: strict
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
use-mamba: true

# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
run: |
conda install gmt=6.2.0 numpy=${{ matrix.numpy-version }} \
mamba install gmt=6.2.0 numpy=${{ matrix.numpy-version }} \
pandas xarray netCDF4 packaging \
${{ matrix.optional-packages }} \
coverage[toml] dvc ipython make \
Expand All @@ -98,7 +102,7 @@ jobs:

# Show installed pkg information for postmortem diagnostic
- name: List installed packages
run: conda list
run: mamba list

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,23 @@ jobs:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: pygmt
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniconda-version: "latest"
channels: conda-forge,nodefaults
channel-priority: strict
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
use-mamba: true

# Install dependencies from conda-forge
- name: Install dependencies
run: |
conda install ninja cmake libblas libcblas liblapack fftw gdal geopandas \
mamba install ninja cmake libblas libcblas liblapack fftw gdal geopandas \
ghostscript libnetcdf hdf5 zlib curl pcre make dvc
pip install --pre numpy pandas xarray netCDF4 packaging \
ipython pytest-cov pytest-mpl pytest>=6.0 sphinx-gallery \
Expand All @@ -98,7 +102,7 @@ jobs:
if: runner.os != 'Windows'

- name: Install GMT dev version from conda-forge (Windows)
run: conda install -c conda-forge/label/dev gmt
run: mamba install -c conda-forge/label/dev gmt=6.3
if: runner.os == 'Windows'

# Download cached remote files (artifacts) from GitHub
Expand Down