-
Notifications
You must be signed in to change notification settings - Fork 234
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 all 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 |
|---|---|---|
|
|
@@ -33,23 +33,21 @@ 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 | ||
| environment-file: false | ||
|
Member
Author
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. Must set |
||
| channels: conda-forge,nodefaults | ||
| channel-priority: strict | ||
|
Member
Author
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. The default |
||
| 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 |
|---|---|---|
|
|
@@ -31,12 +31,11 @@ on: | |
|
|
||
| jobs: | ||
| docs: | ||
| name: ${{ matrix.os }} - Python ${{ matrix.python-version }} | ||
| name: ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ['3.11'] | ||
|
Member
Author
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. I don't think we will build docs on multiple Python versions, so no need to define |
||
| os: [ubuntu-latest, macOS-latest, windows-latest] | ||
| # Is it a draft Pull Request (true or false)? | ||
| isDraft: | ||
|
|
@@ -66,30 +65,35 @@ 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 }} | ||
| environment-name: pygmt | ||
| environment-file: false | ||
| 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 | ||
|
|
||
| # Show installed pkg information for postmortem diagnostic | ||
| - name: List installed packages | ||
| run: mamba list | ||
| cache-downloads: true | ||
| cache-env: true | ||
| extra-specs: | | ||
| python=3.11 | ||
| gmt=6.4.0 | ||
| numpy | ||
| pandas | ||
| xarray | ||
| netCDF4 | ||
| packaging | ||
| contextily | ||
| geopandas | ||
| ipython | ||
| rioxarray | ||
| build | ||
| make | ||
| pip | ||
| myst-parser | ||
| sphinx | ||
| sphinx-copybutton | ||
| sphinx-design | ||
| sphinx-gallery | ||
| sphinx_rtd_theme | ||
|
|
||
| # Download cached remote files (artifacts) from GitHub | ||
| - name: Download remote data from GitHub | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,32 +40,31 @@ 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: '3.11' | ||
| environment-name: pygmt | ||
| environment-file: false | ||
| 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 make 'pytest>=6.0' \ | ||
| pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery \ | ||
| contextily geopandas ipython rioxarray | ||
|
|
||
| # Show installed pkg information for postmortem diagnostic | ||
| - name: List installed packages | ||
| run: mamba list | ||
|
Comment on lines
-66
to
-68
Member
Author
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. |
||
| extra-specs: | | ||
| python=3.11 | ||
| gmt=6.4.0 | ||
| numpy | ||
| pandas | ||
| xarray | ||
| netCDF4 | ||
| packaging | ||
| contextily | ||
| geopandas | ||
| ipython | ||
| rioxarray | ||
| build | ||
| make | ||
| pip | ||
| pytest | ||
| pytest-doctestplus | ||
| pytest-mpl | ||
| sphinx-gallery | ||
|
|
||
| # Download cached remote files (artifacts) from GitHub | ||
| - name: Download remote data from GitHub | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,7 +67,12 @@ jobs: | |
| optional-packages: '' | ||
| - python-version: '3.11' | ||
| numpy-version: '1.24' | ||
| optional-packages: 'contextily geopandas ipython rioxarray' | ||
| optional-packages: | | ||
| contextily | ||
| geopandas | ||
| ipython | ||
| rioxarray | ||
|
|
||
| timeout-minutes: 30 | ||
| defaults: | ||
| run: | ||
|
|
@@ -93,32 +98,32 @@ 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 }} | ||
| environment-name: pygmt | ||
| environment-file: false | ||
| 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 | ||
|
|
||
| # Show installed pkg information for postmortem diagnostic | ||
| - name: List installed packages | ||
| run: mamba list | ||
| cache-downloads: true | ||
| cache-env: true | ||
|
Comment on lines
+107
to
+108
Member
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 }} | ||
| gmt=6.4.0 | ||
| numpy=${{ matrix.numpy-version }} | ||
| pandas | ||
| xarray | ||
| netCDF4 | ||
| packaging | ||
| ${{ matrix.optional-packages }} | ||
seisman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| build | ||
| dvc | ||
| make | ||
| pip | ||
| pytest | ||
| pytest-cov | ||
| pytest-doctestplus | ||
| pytest-mpl | ||
| sphinx-gallery | ||
|
|
||
| # Download cached remote files (artifacts) from GitHub | ||
| - name: Download remote data from GitHub | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,6 @@ jobs: | |
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ['3.11'] | ||
| os: [ubuntu-22.04, macOS-12, windows-2022] | ||
| gmt_git_ref: [master] | ||
| timeout-minutes: 30 | ||
|
|
@@ -90,32 +89,45 @@ 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 }} | ||
| environment-name: pygmt | ||
| environment-file: false | ||
| 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=3.11 | ||
| 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 | ||
| python -m 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' | ||
|
|
@@ -139,7 +151,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 | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.