Skip to content

Commit

Permalink
sagemathgh-36468: Fix mamba install in conda ci workflow
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

Mamba currently has problems with dependencies installed from other
channels (libarchive/libarchive#1857,
conda-incubator/setup-miniconda#292,
conda-forge/libarchive-feedstock#69), see eg h
ttps://github.com/sagemath/sage/actions/runs/6525067702/job/17717363515.

As workaround we use miniforge now (which comes with a preinstalled
mamba from conda-forge)

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36468
Reported by: Tobias Diez
Reviewer(s): Isuru Fernando, Matthias Köppe
  • Loading branch information
Release Manager committed Oct 18, 2023
2 parents eb03f27 + edbb8a7 commit acb1953
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -61,12 +49,13 @@ jobs:
key:
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }}

- name: Setup Conda
- name: Setup Conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python }}
mamba-version: "*"
channels: conda-forge,defaults
miniforge-version: latest
use-mamba: true
channels: conda-forge
channel-priority: true
activate-environment: sage
environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}.yml
Expand Down

0 comments on commit acb1953

Please sign in to comment.