Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5c66fe9

Browse filesBrowse files
CI: Remove old scipy-wheels-nightly uploads to ensure space
Remove all but the last "${N_LATEST_UPLOADS}" package version uploads to the matplotlib scipy-wheels-nightly index to ensure space. To do this, rely on the output form of `anaconda show` to be able to filter on the item delimiter character sequence for each version currently uploaded. As an explicit example: ``` $ anaconda show scipy-wheels-nightly/matplotlib Using Anaconda API: https://api.anaconda.org Name: matplotlib Summary: Access: public Package Types: pypi Versions: + 3.6.0.dev2553+g3245d395d9 + 3.6.0.dev2569+g3522217386 + 3.6.0.dev2573+g3eadeacc06 To install this package with pypi run: pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple matplotlib ``` shows that by filtering on '+' and then stripping ' + ' one can obtain a newline separated list of all package uploads, where they _most recent_ uploads are listed last. After stripping off the "${N_LATEST_UPLOADS}" lines that correspond to the package versions to keep for testing, the remaining (older) package uploads can be removed with `anaconda remove`. Resolves the space problem in https://github.com/matplotlib/matplotlib Issue 22757
1 parent d2f87e8 commit 5c66fe9
Copy full SHA for 5c66fe9

File tree

Expand file treeCollapse file tree

1 file changed

+20
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+20
-0
lines changed

‎.github/workflows/nightlies.yml

Copy file name to clipboardExpand all lines: .github/workflows/nightlies.yml
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,23 @@ jobs:
6363
--user scipy-wheels-nightly \
6464
--skip-existing \
6565
dist/matplotlib-*.whl
66+
67+
- name: Remove old uploads to save space
68+
shell: bash
69+
run: |
70+
N_LATEST_UPLOADS=5
71+
72+
# Remove all _but_ the last "${N_LATEST_UPLOADS}" package versions
73+
# N.B.: `anaconda show` places the newest packages at the bottom of the output
74+
# of the 'Versions' section and package versions are preceded with a ' + '.
75+
anaconda show scipy-wheels-nightly/matplotlib &> >(grep '+') | \
76+
sed 's/.* + //' | \
77+
head --lines "-${N_LATEST_UPLOADS}" > remove-package-versions.txt
78+
79+
if [ -s remove-package-versions.txt ]; then
80+
while LANG=C IFS= read -r package_version ; do
81+
anaconda --token ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }} remove \
82+
--force \
83+
"scipy-wheels-nightly/matplotlib/${package_version}"
84+
done <remove-package-versions.txt
85+
fi

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.