From f51dd9951c36174e616993f80b4a81f477d2ff75 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Fri, 27 Jan 2023 16:48:22 +0100 Subject: [PATCH 1/5] Update AppVeyor config to use micromamba Addresses #785 --- appveyor.yml | 61 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ef2390e11..66f6eff9d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,42 +15,53 @@ for: only: - image: macos install: - - curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > miniconda.sh - - bash miniconda.sh -b -p $HOME/miniconda + - curl -Ls https://micromamba.snakepit.net/api/micromamba/osx-64/latest | tar -xvj bin/micromamba + - mv bin/micromamba ./micromamba - matrix: only: - image: Ubuntu2004 install: - - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - - bash miniconda.sh -b -p $HOME/miniconda + - wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba --strip-components=1 build_script: - - export PATH="$HOME/miniconda/bin:$PATH" + # Diagnostics + - echo $PLATFORM + - echo $APPVEYOR_BUILD_WORKER_IMAGE + - uname -a + - pwd + - ls + + # Set up micromamba + - ./micromamba shell init -s bash -p ~/micromamba + - source ~/.bashrc + - source ~/.bash_profile - hash -r - - conda config --set always_yes yes --set changeps1 no - # - conda update -q conda # makes travis build fail - # Useful for debugging any issues with conda - - conda info -a - - conda init bash - - export CONDA_BASE=$(conda info --base) - - source $CONDA_BASE/etc/profile.d/conda.sh - - # Install mamba as a dramatically faster conda replacement. Specifying a - # fixed version makes the installation of mamba itself much faster, and - # avoids potential breakage due to changes in mamba behaviour. - - conda install -c conda-forge mamba=0.24.0 pip=22.1.2 - - # Environments created by mamba can't be referenced by name from conda - # (presumably a bug), so we use an explicit path instead. - - mamba env create --prefix $HOME/mamba-env --file environment.yml - - conda activate $HOME/mamba-env - - conda list - - env + - mkdir -p ~/micromamba/pkgs/ + - export MAMBA_ROOT_PREFIX=~/micromamba + - export MAMBA_EXE=$(pwd)/micromamba + - . $MAMBA_ROOT_PREFIX/etc/profile.d/micromamba.sh + + # Clone repo, create environment, and install xcube + - git clone https://github.com/dcs4cop/xcube $HOME/xcube + - micromamba create --name xc --file $HOME/xcube/environment.yml + - micromamba activate xc + - cd $HOME/xcube - python setup.py install + # Make sure pytest is installed + - micromamba install --yes --name xc --channel conda-forge pytest attrs + + # Print some diagnostics (useful for debugging) + - micromamba list + - xcube --version + - python -c "from xcube import __version__; print(f'xcube version {__version__}')" + + # Run the test suite + - pytest -v --cov=xcube + # Setting NUMBA_DISABLE_JIT=1 makes unit tests way too slow, so we accept less code coverage here # - export NUMBA_DISABLE_JIT=1 - - py.test -v --cov=xcube + # - py.test -v --cov=xcube From 29650f4bcf0ba732c9e066be0e1abbd53917a4e0 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 13 Jul 2023 11:24:32 +0200 Subject: [PATCH 2/5] Update changelog --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index c32623cef..f7264ce65 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,7 @@ ## Changes in 1.1.3 (in development) +* Updated AppVeyor configuration to use micromamba rather than mamba (#785) + ## Changes in 1.1.2 ### Fixes From 672f01ef37594d4de247cb5535853fe2e8243473 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 13 Jul 2023 11:56:25 +0200 Subject: [PATCH 3/5] Replace mamba with micromamba in GitHub workflow --- .github/workflows/xcube_workflow.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/xcube_workflow.yaml b/.github/workflows/xcube_workflow.yaml index d5dc042ac..d0d89bf51 100644 --- a/.github/workflows/xcube_workflow.yaml +++ b/.github/workflows/xcube_workflow.yaml @@ -18,13 +18,14 @@ jobs: steps: - uses: actions/checkout@v2 # Setup miniconda build env - - uses: conda-incubator/setup-miniconda@v2.0.0 + - uses: mamba-org/setup-micromamba@v1 with: - miniconda-version: py39_22.11.1-1 - mamba-version: "*" - channels: conda-forge - activate-environment: xcube + micromamba-version: '1.4.8-0' environment-file: environment.yml + init-shell: >- + bash + cache-environment: true + post-cleanup: 'all' # Setup xcube - name: setup-xcube shell: bash -l {0} From acddefb47ce8ad8c824b4e34226902fcda022906 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 13 Jul 2023 12:08:46 +0200 Subject: [PATCH 4/5] Add "GitHub CI passes" to PR template checklist --- .github/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2273205c3..96ebc70f5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,5 +6,6 @@ Checklist: * [ ] Add docstrings and API docs for any new/modified user-facing classes and functions * [ ] New/modified features documented in `docs/source/*` * [ ] Changes documented in `CHANGES.md` +* [ ] GitHub CI passes * [ ] AppVeyor CI passes * [ ] Test coverage remains or increases (target 100%) From 1a31a0bc4d70697ae9f9964800decaf77f020bb8 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 13 Jul 2023 16:21:00 +0200 Subject: [PATCH 5/5] Update changelog --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index f7264ce65..ed77c6904 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ ## Changes in 1.1.3 (in development) -* Updated AppVeyor configuration to use micromamba rather than mamba (#785) +* Updated AppVeyor and GitHub workflow configurations to use micromamba rather + than mamba (#785) ## Changes in 1.1.2