Skip to content

Commit 5e72cc5

Browse files
committed
ci: use conda-incubator/setup-miniconda action
The conda CI jobs are failing. And Windows has been busted for a while. Let's just use the official action for setting up Conda to hopefully pave over problems.
1 parent 043c30c commit 5e72cc5

1 file changed

Lines changed: 22 additions & 18 deletions

File tree

.github/workflows/anaconda.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,22 @@ jobs:
3737
with:
3838
persist-credentials: false
3939

40-
- name: Create Anaconda Environment
41-
run: |
42-
$CONDA/bin/conda create --yes --quiet --name env python=${{ matrix.py }}
40+
- name: Setup Miniconda and Create Environment
41+
uses: conda-incubator/setup-miniconda@v3
42+
with:
43+
activate-environment: env
44+
python-version: "${{ matrix.py }}"
45+
channels: conda-forge,defaults
4346

4447
- name: Install Dependencies
4548
run: |
46-
source $CONDA/bin/activate env
47-
$CONDA/bin/conda install --yes --quiet --name env conda-build pip
49+
conda install --yes --quiet --name base conda-build
50+
conda install --yes --quiet --name env pip
4851
pip install --require-hashes -r ci/requirements.txt
4952
5053
- name: Build and Test
5154
run: |
52-
source $CONDA/bin/activate env
53-
$CONDA/bin/conda build ci/conda
55+
conda build ci/conda
5456
python ci/copy-conda-package.py
5557
5658
- name: Upload Package
@@ -86,21 +88,23 @@ jobs:
8688
with:
8789
persist-credentials: false
8890

89-
- name: Create Anaconda Environment
90-
run: |
91-
C:\Miniconda\condabin\conda.bat create --yes --quiet --name env python=${{ matrix.py }}
91+
- name: Setup Miniconda and Create Environment
92+
uses: conda-incubator/setup-miniconda@v3
93+
with:
94+
activate-environment: env
95+
python-version: "${{ matrix.py }}"
96+
channels: conda-forge,defaults
9297

9398
- name: Install Dependencies
9499
run: |
95-
C:\Miniconda\condabin\conda.bat install --yes --quiet --name env conda-build pip
96-
C:\Miniconda\envs\env\python.exe -m pip install --user --require-hashes -r ci/requirements.txt
100+
conda install --yes --quiet --name base conda-build
101+
conda install --yes --quiet --name env pip
102+
python -m pip install --user --require-hashes -r ci/requirements.txt
97103
98-
# Disabled because we appear to be hitting https://github.com/conda/conda-build/issues/4835
99-
# and we're not sure how to work around.
100-
#- name: Build and Test
101-
# run: |
102-
# C:\Miniconda\envs\env\Scripts\conda-build.exe ci/conda
103-
# C:\Miniconda\envs\env\python.exe ci/copy-conda-package.py
104+
- name: Build and Test
105+
run: |
106+
conda build ci/conda
107+
python ci/copy-conda-package.py
104108
105109
- name: Upload Package
106110
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

0 commit comments

Comments
 (0)