Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ defaults:
shell: bash -l {0}

env:
MDANALYSIS_DEVELOP_VERSION: "2.11.0-dev0"
MDANALYSIS_LATEST_RELEASE: "2.10.0"
MDANALYSIS_PREVIOUS_RELEASE: "2.9.0"
MDANALYSIS_DEVELOP_VERSION: "2.12.0-dev0"
MDANALYSIS_LATEST_RELEASE: "2.11.0"
MDANALYSIS_PREVIOUS_RELEASE: "2.10.0"

jobs:
gen-python-matrix:
Expand All @@ -39,7 +39,7 @@ jobs:
oldest-python: ${{ steps.get-compatible-python.outputs.oldest-python }}
stable-python: ${{ steps.get-compatible-python.outputs.stable-python }}
steps:
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7
with:
python-version: "3.13"

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
mdanalysis-version: "latest"

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- id: environment-setup
run: |
Expand Down Expand Up @@ -113,15 +113,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
add-pip-as-python-dependency: true
architecture: x64
mamba-version: "*"
channels: conda-forge, defaults
auto-update-conda: true
show-channel-urls: true
miniforge-version: "26.7.2-1"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug in miniforge's latest release: conda-forge/miniforge#913

channels: conda-forge
auto-update-conda: false

- name: Setup Python ${{ matrix.python-version }}
if: ${{ matrix.installer == 'pip' }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -160,7 +158,7 @@ jobs:
needs: gen-python-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Install mamba Python ${{ needs.gen-python-matrix.outputs.stable-python }}
uses: mamba-org/setup-micromamba@v3
Expand Down Expand Up @@ -190,10 +188,10 @@ jobs:
needs: gen-python-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Setup Python ${{ needs.gen-python-matrix.outputs.stable-python }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ needs.gen-python-matrix.outputs.stable-python }}

Expand Down
14 changes: 14 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ runs:
python -m pip uninstall -y MDAnalysis MDAnalysisTests
done

# conda can leave behind partial dist-info directories when a pip
# install was overwritten by a conda install (e.g. pip-only files such
# as sboms/ in wheels from 2.11.0 on). These have no METADATA/RECORD,
# so pip can't uninstall them and fails on the next install.
python - <<'EOF'
import pathlib, shutil, sysconfig
for sp in {sysconfig.get_paths()[k] for k in ("purelib", "platlib")}:
for d in pathlib.Path(sp).glob("*.dist-info"):
name = d.name.split("-")[0].lower()
if name in ("mdanalysis", "mdanalysistests") and not (d / "METADATA").exists():
print(f"Removing orphaned {d}")
shutil.rmtree(d)
EOF

- name: Setup install lines
id: setup-install-line
shell: ${{ inputs.shell }}
Expand Down
Loading