Skip to content
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

use micromamba instead of mamba #6674

Merged
merged 21 commits into from
Jun 10, 2022
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
75 changes: 47 additions & 28 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,29 @@ jobs:
run:
shell: bash -l {0}

env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.10"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: xarray-tests
auto-update-conda: false
python-version: "3.9"

- name: Install conda dependencies
- name: set environment variables
run: |
mamba env update -f ci/requirements/environment.yml
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
python=${{env.PYTHON_VERSION}}
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"

- name: Install xarray
run: |
python -m pip install --no-deps -e .
Expand All @@ -76,23 +83,27 @@ jobs:
defaults:
run:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.10"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: xarray-tests
auto-update-conda: false
python-version: "3.9"

- name: Install conda dependencies
- name: set environment variables
run: |
mamba env update -f ci/requirements/environment.yml
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
python=${{env.PYTHON_VERSION}}
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
Expand All @@ -118,20 +129,28 @@ jobs:
run:
shell: bash -l {0}

strategy:
matrix:
environment-file: ["bare-minimum", "min-all-deps"]
fail-fast: false

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- uses: conda-incubator/setup-miniconda@v2

- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
with:
environment-name: xarray-tests
environment-file: false
extra-specs: |
python=3.10
pyyaml
conda
python-dateutil
channels: conda-forge
channel-priority: strict
mamba-version: "*"
auto-update-conda: false
python-version: "3.9"

- name: minimum versions policy
run: |
mamba install -y pyyaml conda python-dateutil
python ci/min_deps_check.py ci/requirements/bare-minimum.yml
python ci/min_deps_check.py ci/requirements/min-all-deps.yml
python ci/min_deps_check.py ci/requirements/${{ matrix.environment-file }}.yml
26 changes: 8 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ jobs:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set environment variables
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

if [[ ${{ matrix.os }} == windows* ]] ;
then
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
Expand All @@ -83,25 +85,13 @@ jobs:

echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV

- name: Cache conda
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ hashFiles('ci/requirements/**.yml') }}-${{ matrix.env }}

- uses: conda-incubator/setup-miniconda@v2
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
with:
channels: conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: xarray-tests
auto-update-conda: false
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Install conda dependencies
run: |
mamba env update -f $CONDA_ENV_FILE
environment-file: ${{ env.CONDA_ENV_FILE }}
environment-name: xarray-tests
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"

# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,15 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: xarray-tests
auto-update-conda: false
python-version: ${{ matrix.python-version }}
- name: Set up conda environment
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
with:
environment-file: ci/requirements/environment.yml
environment-name: xarray-tests
extra-specs: |
python=${{ matrix.python-version }}
- name: Install upstream versions
run: |
mamba env update -f ci/requirements/environment.yml
bash ci/install-upstream-wheels.sh
- name: Install xarray
run: |
Expand Down
4 changes: 2 additions & 2 deletions ci/requirements/bare-minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dependencies:
- pytest-cov
- pytest-env
- pytest-xdist
- numpy=1.18
- numpy=1.19
- packaging=20.0
- pandas=1.1
- pandas=1.2