Skip to content
/ sage Public
  • Sponsor
  • Notifications You must be signed in to change notification settings
  • Fork 574

Commit de60b5a

Browse files
authoredSep 28, 2024··
Improve conda setup
1 parent d1f99d1 commit de60b5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3129
-5527
lines changed
 

‎.devcontainer/onCreate-conda.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
set -e
33

44
# Create conda environment
5-
conda install mamba -n base -c conda-forge -y
6-
mamba env create --file src/environment-dev-3.11-linux.yml || mamba env update --file src/environment-dev-3.11-linux.yml
5+
conda config --env --add channels conda-forge
6+
conda config --env --set channel_priority strict
7+
conda update -y --all --override-channels -c conda-forge
8+
conda install mamba=1 -n base -y
9+
mamba env create -y --file environment-dev-3.11-linux.yml || mamba env update -y --file environment-dev-3.11-linux.yml
710
conda init bash
811

912
# Build sage

‎.github/workflows/ci-conda.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
path: ~/conda_pkgs_dir
6161
key:
62-
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }}
62+
${{ runner.os }}-conda-${{ hashFiles('environment-3.11.yml') }}
6363

6464
- name: Setup Conda environment
6565
uses: conda-incubator/setup-miniconda@v3
@@ -70,7 +70,7 @@ jobs:
7070
channels: conda-forge
7171
channel-priority: true
7272
activate-environment: sage
73-
environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
73+
environment-file: ${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
7474

7575
- name: Print Conda environment
7676
shell: bash -l {0}

0 commit comments

Comments
 (0)
Please sign in to comment.