-
Notifications
You must be signed in to change notification settings - Fork 228
CI: Use mamba-org/provision-with-micromamba to setup micromamba #2435
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
Changes from 35 commits
f7e9764
b05467a
67af438
c103e11
5382970
bda67da
aa0dfc8
03a4ddb
504977b
2abf4b3
8cf78c7
31d85c7
9b0050a
eb89e80
fa7c7d6
464a3ea
8080e77
b20f9b6
44cda10
2c3e0e1
14837f7
8f886ec
07fa2ac
754fe52
ff3af0b
3fe4d1a
c640a76
d84a4e1
2659a05
e6fbc7d
d66fe43
a979e70
62bcc8f
f47dedd
417cab4
47f58d5
b18d8d8
c915e39
b69d741
cfcdfbe
a8123b2
923570b
6d7047c
0df26af
f591d7f
1562377
b8490ec
fc1e1bc
36c4a01
8bf51be
9f1e310
cf4636c
08df3b0
ece3db9
bd4037f
733ef1b
00c1d0a
69bb40d
069e070
69e0336
df1c606
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,23 +24,20 @@ jobs: | |
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
# Install Mambaforge with conda-forge dependencies | ||
- name: Setup Mambaforge | ||
uses: conda-incubator/[email protected] | ||
- name: Setup Micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
environment-name: pygmt | ||
channels: conda-forge,nodefaults | ||
channel-priority: strict | ||
miniforge-version: latest | ||
miniforge-variant: Mambaforge | ||
mamba-version: "*" | ||
run-post: false | ||
use-mamba: true | ||
|
||
# Install GMT and other required dependencies from conda-forge | ||
- name: Install dependencies | ||
run: | | ||
mamba install gmt=6.4.0 numpy pandas xarray netCDF4 packaging \ | ||
build | ||
extra-specs: | | ||
python=3.11 | ||
gmt=6.4.0 | ||
numpy | ||
pandas | ||
xarray | ||
netCDF4 | ||
packaging | ||
build | ||
|
||
# Install the package that we want to test | ||
- name: Install the package | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,30 +53,18 @@ jobs: | |
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
# Install Mambaforge with conda-forge dependencies | ||
- name: Setup Mambaforge | ||
uses: conda-incubator/[email protected] | ||
- name: Setup Micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
activate-environment: pygmt | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge,nodefaults | ||
channel-priority: strict | ||
miniforge-version: latest | ||
miniforge-variant: Mambaforge | ||
mamba-version: "*" | ||
run-post: false | ||
use-mamba: true | ||
|
||
# Install GMT and other required dependencies from conda-forge | ||
- name: Install dependencies | ||
run: | | ||
mamba install gmt=6.4.0 numpy pandas xarray netCDF4 packaging \ | ||
build ipython make myst-parser contextily geopandas rioxarray \ | ||
sphinx sphinx-copybutton sphinx-design sphinx-gallery sphinx_rtd_theme | ||
environment-file: "ci/requirements/docs.yml" | ||
seisman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cache-downloads: true | ||
cache-env: true | ||
extra-specs: | | ||
python=${{ matrix.python-version }} | ||
|
||
# Show installed pkg information for postmortem diagnostic | ||
- name: List installed packages | ||
run: mamba list | ||
run: micromamba list | ||
|
||
# Download cached remote files (artifacts) from GitHub | ||
- name: Download remote data from GitHub | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,10 +44,11 @@ jobs: | |
include: | ||
- python-version: '3.8' | ||
numpy-version: '1.21' | ||
optional-packages: '' | ||
environment-file: 'ci/requirements/tests.yml' | ||
- python-version: '3.11' | ||
numpy-version: '1.24' | ||
optional-packages: 'contextily geopandas ipython rioxarray' | ||
environment-file: 'ci/requirements/tests_with_optional_dependencies.yml' | ||
|
||
timeout-minutes: 30 | ||
defaults: | ||
run: | ||
|
@@ -73,32 +74,19 @@ jobs: | |
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
# Install Mambaforge with conda-forge dependencies | ||
- name: Setup Mambaforge | ||
uses: conda-incubator/[email protected] | ||
- name: Setup Micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
activate-environment: pygmt | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge,nodefaults | ||
channel-priority: strict | ||
miniforge-version: latest | ||
miniforge-variant: Mambaforge | ||
mamba-version: "*" | ||
run-post: false | ||
use-mamba: true | ||
|
||
# Install GMT and other required dependencies from conda-forge | ||
- name: Install dependencies | ||
run: | | ||
mamba install gmt=6.4.0 numpy=${{ matrix.numpy-version }} \ | ||
pandas xarray netCDF4 packaging \ | ||
${{ matrix.optional-packages }} \ | ||
build dvc make 'pytest>=6.0' \ | ||
pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery | ||
environment-file: ${{ matrix.environment-file }} | ||
cache-downloads: true | ||
cache-env: true | ||
Comment on lines
+107
to
+108
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to https://github.com/mamba-org/provision-with-micromamba/tree/v15#cache-env-key:
And at https://github.com/mamba-org/provision-with-micromamba/tree/v15#notes-on-caching / mamba-org/provision-with-micromamba#38 (comment)
So we want to use both env and download caching? We could try both for now, and can modify things later if it becomes problematic. |
||
extra-specs: | | ||
python=${{ matrix.python-version }} | ||
numpy=${{ matrix.numpy-version }} | ||
|
||
# Show installed pkg information for postmortem diagnostic | ||
- name: List installed packages | ||
run: mamba list | ||
run: micromamba list | ||
|
||
# Download cached remote files (artifacts) from GitHub | ||
- name: Download remote data from GitHub | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
# push: | ||
# branches: [ main ] | ||
pull_request: | ||
types: [ready_for_review] | ||
# types: [ready_for_review] | ||
seisman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
paths-ignore: | ||
- 'doc/**' | ||
- 'examples/**' | ||
|
@@ -79,32 +79,42 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
||
# Install Mambaforge with conda-forge dependencies | ||
- name: Setup Mambaforge | ||
uses: conda-incubator/[email protected] | ||
- name: Setup Micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
activate-environment: pygmt | ||
# python-version: ${{ matrix.python-version }} | ||
channels: conda-forge,nodefaults | ||
channel-priority: strict | ||
miniforge-version: latest | ||
miniforge-variant: Mambaforge | ||
mamba-version: "*" | ||
run-post: false | ||
use-mamba: true | ||
|
||
# Install dependencies from conda-forge | ||
cache-downloads: true | ||
cache-env: true | ||
extra-specs: | | ||
python=${{ matrix.python-version }} | ||
cmake | ||
make | ||
ninja | ||
curl | ||
fftw | ||
ghostscript | ||
hdf5 | ||
libblas | ||
libcblas | ||
libgdal | ||
liblapack | ||
libnetcdf | ||
pcre | ||
zlib | ||
geopandas | ||
|
||
# Install dependencies from PyPI | ||
- name: Install dependencies | ||
run: | | ||
mamba install python=${{ matrix.python-version }} \ | ||
ninja cmake libblas libcblas liblapack fftw libgdal \ | ||
geopandas ghostscript libnetcdf hdf5 zlib curl pcre make | ||
pip install --pre --prefer-binary \ | ||
numpy pandas xarray netCDF4 packaging \ | ||
build contextily dvc ipython rioxarray \ | ||
'pytest>=6.0' pytest-cov pytest-doctestplus pytest-mpl \ | ||
sphinx-gallery | ||
|
||
# Show installed pkg information for postmortem diagnostic | ||
- name: List installed packages | ||
run: micromamba list | ||
|
||
# Pull baseline image data from dvc remote (DAGsHub) | ||
- name: Pull baseline image data from dvc remote | ||
if: github.event_name == 'schedule' | ||
|
@@ -128,7 +138,7 @@ jobs: | |
if: runner.os != 'Windows' | ||
|
||
- name: Install GMT dev version from conda-forge (Windows) | ||
run: mamba install -c conda-forge/label/dev gmt | ||
run: micromamba install -c conda-forge/label/dev gmt | ||
if: runner.os == 'Windows' | ||
|
||
# Download cached remote files (artifacts) from GitHub | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ name: GMT Legacy Tests | |
on: | ||
# push: | ||
# branches: [ main ] | ||
# pull_request: | ||
pull_request: | ||
seisman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# types: [ready_for_review] | ||
# paths-ignore: | ||
# - 'doc/**' | ||
|
@@ -47,32 +47,19 @@ jobs: | |
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
# Install Mambaforge with conda-forge dependencies | ||
- name: Setup Mambaforge | ||
uses: conda-incubator/[email protected] | ||
- name: Setup Micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
activate-environment: pygmt | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge,nodefaults | ||
channel-priority: strict | ||
miniforge-version: latest | ||
miniforge-variant: Mambaforge | ||
mamba-version: "*" | ||
run-post: false | ||
use-mamba: true | ||
|
||
# Install GMT and other required dependencies from conda-forge | ||
- name: Install dependencies | ||
run: | | ||
mamba install gmt=${{ matrix.gmt_version }} numpy \ | ||
pandas xarray netCDF4 packaging \ | ||
contextily geopandas ipython rioxarray \ | ||
build dvc make 'pytest>=6.0' \ | ||
pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery | ||
environment-file: "ci/requirements/tests_legacy.yml" | ||
seisman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cache-downloads: true | ||
cache-env: true | ||
extra-specs: | | ||
python=${{ matrix.python-version }} | ||
gmt=${{ matrix.gmt_version }} | ||
|
||
# Show installed pkg information for postmortem diagnostic | ||
- name: List installed packages | ||
run: mamba list | ||
run: micromamba list | ||
|
||
# Download cached remote files (artifacts) from GitHub | ||
- name: Download remote data from GitHub | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: pygmt | ||
channels: | ||
- conda-forge | ||
- nodefaults | ||
dependencies: | ||
# Required dependencies | ||
- pip | ||
- gmt=6.4.0 | ||
- numpy>=1.21 | ||
- pandas | ||
- xarray | ||
- netCDF4 | ||
- packaging | ||
# Development dependencies (general) | ||
- build | ||
- dvc | ||
- make | ||
# Dev dependencies (unit testing) | ||
- matplotlib | ||
- pytest-cov | ||
- pytest-doctestplus | ||
- pytest-mpl | ||
- pytest>=6.0 | ||
- sphinx-gallery |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: pygmt | ||
channels: | ||
- conda-forge | ||
- nodefaults | ||
dependencies: | ||
# Required dependencies | ||
- pip | ||
- gmt | ||
- numpy>=1.21 | ||
- pandas | ||
- xarray | ||
- netCDF4 | ||
- packaging | ||
# Optional dependencies | ||
- contextily | ||
- geopandas | ||
- ipython | ||
- rioxarray | ||
# Development dependencies (general) | ||
- build | ||
- dvc | ||
- make | ||
# Dev dependencies (unit testing) | ||
- matplotlib | ||
- pytest-doctestplus | ||
- pytest-mpl | ||
- pytest>=6.0 | ||
- sphinx-gallery |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: pygmt | ||
channels: | ||
- conda-forge | ||
- nodefaults | ||
dependencies: | ||
# Required dependencies | ||
- pip | ||
- gmt=6.4.0 | ||
- numpy>=1.21 | ||
- pandas | ||
- xarray | ||
- netCDF4 | ||
- packaging | ||
# Development dependencies (general) | ||
- build | ||
- dvc | ||
- make | ||
# Dev dependencies (unit testing) | ||
- matplotlib | ||
- pytest-cov | ||
- pytest-doctestplus | ||
- pytest-mpl | ||
- pytest>=6.0 | ||
# optional dependencies | ||
- contextily | ||
- geopandas | ||
- ipython | ||
- rioxarray | ||
- sphinx-gallery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default
channel-priority
isstrict
(https://github.com/mamba-org/provision-with-micromamba#channel-priority), so no need to specifychannel-priority
here.