Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 27b9575

Browse files
CI: Use anaconda-client v1.10.0 for upload
As anaconda-client is no longer supported with pip then all modern installations must be done with conda or mamba. To make this process simple, use the mamba-org/provision-with-micromamba GitHub Action and have it only install anaconda-client=1.10.0. The GitHub Action will additionally print out the environment information which is useful for reproducibility and debugging information. - c.f. https://github.com/Anaconda-Platform/anaconda-client/ Issue 618 - c.f. https://github.com/mamba-org/provision-with-micromamba The option `channels: main` is required to be used as anaconda-client is currently only maintained on the "main" channel. - c.f. https://anaconda.org/main/anaconda-client The default shell is also set to `bash -l {0}` throughout the workflow to ensure that micromamba can be loaded properly once it is setup. - c.f. https://github.com/mamba-org/provision-with-micromamba/blob/34071ca7df4983ccd272ed0d3625818b27b70dcc/README.md#important
1 parent de50ba9 commit 27b9575

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/nightlies.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ jobs:
1111
upload_nightly_wheels:
1212
name: Upload nightly wheels to Anaconda Cloud
1313
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
shell: bash -l {0}
1417
if: github.repository_owner == 'matplotlib'
1518

1619
steps:
17-
- name: Install Python
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: '3.x'
21-
2220
# c.f. https://github.com/actions/download-artifact/issues/3#issuecomment-1017141067
2321
- name: Download wheel artifacts from last build on 'main'
24-
shell: bash
2522
env:
2623
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2724
run: |
@@ -50,12 +47,14 @@ jobs:
5047
mv *.whl dist/
5148
ls -l dist/
5249
50+
# N.B. anaconda-client is only maintained on the main channel
5351
- name: Install anaconda-client
54-
run: |
55-
python -m pip install --upgrade pip setuptools wheel
56-
# c.f. https://github.com/Anaconda-Platform/anaconda-client/issues/540
57-
python -m pip install git+https://github.com/Anaconda-Server/anaconda-client@be1e14936a8e947da94d026c990715f0596d7043
58-
python -m pip list
52+
uses: mamba-org/provision-with-micromamba@v12
53+
with:
54+
environment-file: false
55+
environment-name: nightlies
56+
extra-specs: anaconda-client=1.10.0
57+
channels: main
5958

6059
- name: Upload wheels to Anaconda Cloud as nightlies
6160
run: |
@@ -65,7 +64,6 @@ jobs:
6564
dist/matplotlib-*.whl
6665
6766
- name: Remove old uploads to save space
68-
shell: bash
6967
run: |
7068
N_LATEST_UPLOADS=5
7169

0 commit comments

Comments
 (0)