From e1ed761eb24d0f4bc261cac8f364a00ff8ae864a Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 16 Oct 2023 02:09:47 +0000 Subject: [PATCH 1/5] Fix mamba install in conda ci workflow --- .github/workflows/ci-conda.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index e520fa17104..25984a5e77a 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -61,7 +61,22 @@ jobs: key: ${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }} + # Mamba currently has problems with dependencies installed from other channels + # https://github.com/libarchive/libarchive/issues/1857 + # https://github.com/conda-incubator/setup-miniconda/issues/292 + # As temporary workaround we move all preinstalled packages over to conda-forge before installing mamba - name: Setup Conda + uses: conda-incubator/setup-miniconda@v2 + with: + python-version: ${{ matrix.python }} + channels: conda-forge + channel-priority: true + + - name: Fix mamba + run: | + conda upgrade --strict-channel-priority -c conda-forge --all + + - name: Setup Conda environment uses: conda-incubator/setup-miniconda@v2 with: python-version: ${{ matrix.python }} From ac443118cceda074b6ac3e31caf045e5bd869e40 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 16 Oct 2023 02:20:39 +0000 Subject: [PATCH 2/5] install mamba manually --- .github/workflows/ci-conda.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index 25984a5e77a..432a76e1277 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -75,12 +75,13 @@ jobs: - name: Fix mamba run: | conda upgrade --strict-channel-priority -c conda-forge --all + conda install -c conda-forge mamba - name: Setup Conda environment uses: conda-incubator/setup-miniconda@v2 with: python-version: ${{ matrix.python }} - mamba-version: "*" + #mamba-version: "*" channels: conda-forge,defaults channel-priority: true activate-environment: sage From 048ed902b97b80221cce06284adc5716d3b93975 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 16 Oct 2023 02:21:31 +0000 Subject: [PATCH 3/5] restrict channel to conda-forge --- .github/workflows/ci-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index 432a76e1277..e9e9ef2ab50 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -82,7 +82,7 @@ jobs: with: python-version: ${{ matrix.python }} #mamba-version: "*" - channels: conda-forge,defaults + channels: conda-forge channel-priority: true activate-environment: sage environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}.yml From 338b668c819e8560669399e2bfe55f81ae7053c1 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 16 Oct 2023 02:22:37 +0000 Subject: [PATCH 4/5] use mamba switch --- .github/workflows/ci-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index e9e9ef2ab50..1265e7611a6 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -82,6 +82,7 @@ jobs: with: python-version: ${{ matrix.python }} #mamba-version: "*" + use-mamba: true channels: conda-forge channel-priority: true activate-environment: sage From edbb8a7a27769088f38f2e0cb6af2f499ea05608 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 16 Oct 2023 05:37:06 +0000 Subject: [PATCH 5/5] try with miniforge --- .github/workflows/ci-conda.yml | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index 1265e7611a6..aaee77e5be3 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -39,18 +39,6 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Check for Miniconda - id: check_conda - run: echo ::set-output name=installed::$CONDA - - # Miniconda is installed by default in the ubuntu-latest, however not in the act-image to run it locally - - name: Install Miniconda - if: steps.check_conda.outputs.installed == '' - run: | - wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh -O ~/miniconda.sh - bash ~/miniconda.sh -b -p $HOME/miniconda - echo "CONDA=$HOME/miniconda" >> $GITHUB_ENV - - name: Create conda environment files run: ./bootstrap-conda @@ -61,27 +49,11 @@ jobs: key: ${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }} - # Mamba currently has problems with dependencies installed from other channels - # https://github.com/libarchive/libarchive/issues/1857 - # https://github.com/conda-incubator/setup-miniconda/issues/292 - # As temporary workaround we move all preinstalled packages over to conda-forge before installing mamba - - name: Setup Conda - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: ${{ matrix.python }} - channels: conda-forge - channel-priority: true - - - name: Fix mamba - run: | - conda upgrade --strict-channel-priority -c conda-forge --all - conda install -c conda-forge mamba - - name: Setup Conda environment uses: conda-incubator/setup-miniconda@v2 with: python-version: ${{ matrix.python }} - #mamba-version: "*" + miniforge-version: latest use-mamba: true channels: conda-forge channel-priority: true