From fef68330206a1c2c44833a8dd3225a07caa77374 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Tue, 25 Jul 2023 15:03:56 +0100 Subject: [PATCH 1/5] try ad hoc updating of existing env --- .github/workflows/install-from-source.yml | 11 +++++++++++ .github/workflows/run-tests.yml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/install-from-source.yml b/.github/workflows/install-from-source.yml index a01af46437..42ccefc31c 100644 --- a/.github/workflows/install-from-source.yml +++ b/.github/workflows/install-from-source.yml @@ -19,6 +19,7 @@ on: push: branches: - main + - GA_update_condamamba_adhoc # run the test only if the PR is to main # turn it on if required #pull_request: @@ -52,6 +53,16 @@ jobs: miniforge-version: "latest" miniforge-variant: Mambaforge use-mamba: true + - name: Update conda and mamba + run: | + conda update -n base -c conda-forge conda + # setup-miniconda@v2 installs an old conda and mamba + # forcing a modern mamba updates both mamba and conda + conda install -c conda-forge "mamba>=1.4.8" + conda --version + mamba --version + - name: Update environment + run: mamba update -n esmvalcore -f environment.yml - run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }} - name: Record versions run: | diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index aa80283eb9..a1dee779bf 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -21,6 +21,7 @@ on: push: branches: - main + - GA_update_condamamba_adhoc # run the test only if the PR is to main # turn it on if required #pull_request: @@ -54,6 +55,16 @@ jobs: miniforge-version: "latest" miniforge-variant: Mambaforge use-mamba: true + - name: Update conda and mamba + run: | + conda update -n base -c conda-forge conda + # setup-miniconda@v2 installs an old conda and mamba + # forcing a modern mamba updates both mamba and conda + conda install -c conda-forge "mamba>=1.4.8" + conda --version + mamba --version + - name: Update environment + run: mamba update -n esmvalcore -f environment.yml - run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }} - run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt - run: python -V 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt From b7880b2c343d1f8f561e8bca60392cca64616d3e Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Tue, 25 Jul 2023 15:24:09 +0100 Subject: [PATCH 2/5] use default env var --- .github/workflows/install-from-source.yml | 2 +- .github/workflows/run-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-from-source.yml b/.github/workflows/install-from-source.yml index 42ccefc31c..ab1554d914 100644 --- a/.github/workflows/install-from-source.yml +++ b/.github/workflows/install-from-source.yml @@ -62,7 +62,7 @@ jobs: conda --version mamba --version - name: Update environment - run: mamba update -n esmvalcore -f environment.yml + run: mamba update -n ${CONDA_DEFAULT_ENV} -f environment.yml - run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }} - name: Record versions run: | diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a1dee779bf..519d36298a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -64,7 +64,7 @@ jobs: conda --version mamba --version - name: Update environment - run: mamba update -n esmvalcore -f environment.yml + run: mamba update -n ${CONDA_DEFAULT_ENV} -f environment.yml - run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }} - run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt - run: python -V 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt From 00561e59b2b39536a04caca5ffa51b134291e520 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Tue, 25 Jul 2023 15:30:58 +0100 Subject: [PATCH 3/5] let it decide which env to update --- .github/workflows/install-from-source.yml | 2 +- .github/workflows/run-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-from-source.yml b/.github/workflows/install-from-source.yml index ab1554d914..96172a907a 100644 --- a/.github/workflows/install-from-source.yml +++ b/.github/workflows/install-from-source.yml @@ -62,7 +62,7 @@ jobs: conda --version mamba --version - name: Update environment - run: mamba update -n ${CONDA_DEFAULT_ENV} -f environment.yml + run: mamba update -f environment.yml - run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }} - name: Record versions run: | diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 519d36298a..dc1b3e0682 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -64,7 +64,7 @@ jobs: conda --version mamba --version - name: Update environment - run: mamba update -n ${CONDA_DEFAULT_ENV} -f environment.yml + run: mamba update -f environment.yml - run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }} - run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt - run: python -V 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt From 820b8beafbe9f0840555d00918636b9a705114e9 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Tue, 25 Jul 2023 16:03:48 +0100 Subject: [PATCH 4/5] add channel --- .github/workflows/install-from-source.yml | 2 +- .github/workflows/run-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-from-source.yml b/.github/workflows/install-from-source.yml index 96172a907a..40d7b8daa4 100644 --- a/.github/workflows/install-from-source.yml +++ b/.github/workflows/install-from-source.yml @@ -62,7 +62,7 @@ jobs: conda --version mamba --version - name: Update environment - run: mamba update -f environment.yml + run: mamba update -c conda-forge -f environment.yml - run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }} - name: Record versions run: | diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index dc1b3e0682..30335c76c0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -64,7 +64,7 @@ jobs: conda --version mamba --version - name: Update environment - run: mamba update -f environment.yml + run: mamba update -c conda-forge -f environment.yml - run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }} - run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt - run: python -V 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt From 19be5e77baee8a61baa604b7d8c8748ff5c93163 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Tue, 25 Jul 2023 16:17:39 +0100 Subject: [PATCH 5/5] cleanup --- .github/workflows/install-from-source.yml | 16 ++++++++++++++-- .github/workflows/run-tests.yml | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/install-from-source.yml b/.github/workflows/install-from-source.yml index 40d7b8daa4..fa8fb17a40 100644 --- a/.github/workflows/install-from-source.yml +++ b/.github/workflows/install-from-source.yml @@ -55,13 +55,14 @@ jobs: use-mamba: true - name: Update conda and mamba run: | - conda update -n base -c conda-forge conda # setup-miniconda@v2 installs an old conda and mamba # forcing a modern mamba updates both mamba and conda + # this and next step should be removed when updated upstream + conda update -n base -c conda-forge conda conda install -c conda-forge "mamba>=1.4.8" conda --version mamba --version - - name: Update environment + - name: Update environment with new mamba run: mamba update -c conda-forge -f environment.yml - run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }} - name: Record versions @@ -100,6 +101,17 @@ jobs: miniforge-version: "latest" miniforge-variant: Mambaforge use-mamba: true + - name: Update conda and mamba + run: | + # setup-miniconda@v2 installs an old conda and mamba + # forcing a modern mamba updates both mamba and conda + # this and next step should be removed when updated upstream + conda update -n base -c conda-forge conda + conda install -c conda-forge "mamba>=1.4.8" + conda --version + mamba --version + - name: Update environment with new mamba + run: mamba update -c conda-forge -f environment.yml - run: mkdir -p source_install_osx_artifacts_python_${{ matrix.python-version }} - name: Record versions run: | diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 30335c76c0..7d5e388bc9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -57,13 +57,14 @@ jobs: use-mamba: true - name: Update conda and mamba run: | - conda update -n base -c conda-forge conda # setup-miniconda@v2 installs an old conda and mamba # forcing a modern mamba updates both mamba and conda + # this and next step should be removed when updated upstream + conda update -n base -c conda-forge conda conda install -c conda-forge "mamba>=1.4.8" conda --version mamba --version - - name: Update environment + - name: Update environment with new mamba run: mamba update -c conda-forge -f environment.yml - run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }} - run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt @@ -97,6 +98,17 @@ jobs: miniforge-version: "latest" miniforge-variant: Mambaforge use-mamba: true + - name: Update conda and mamba + run: | + # setup-miniconda@v2 installs an old conda and mamba + # forcing a modern mamba updates both mamba and conda + # this and next step should be removed when updated upstream + conda update -n base -c conda-forge conda + conda install -c conda-forge "mamba>=1.4.8" + conda --version + mamba --version + - name: Update environment with new mamba + run: mamba update -c conda-forge -f environment.yml - run: mkdir -p test_osx_artifacts_python_${{ matrix.python-version }} - run: conda --version 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt - run: python -V 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt