Skip to content

Commit

Permalink
Update CI to set minimum python version properly (#137)
Browse files Browse the repository at this point in the history
* update CI to set minimum python version properly
  • Loading branch information
IAlibay authored Mar 17, 2024
1 parent f733658 commit 89ae291
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 36 deletions.
45 changes: 28 additions & 17 deletions .github/workflows/gh-ci-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,44 @@ jobs:
outputs:
matrix: ${{ steps.get-mdakits.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: get-python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"

- id: get-mdakits
run: |
mdakit=$(python utils/get_dir_matrix.py)
echo "matrix=${mdakit}" >> $GITHUB_OUTPUT
env_config:
runs-on: ubuntu-latest
outputs:
python-stable: ${{ steps.get-compatible-python.outputs.stable-python }}
python-min: ${{ steps.get-compatible-python.outputs.oldest-pythons }}

steps:
- uses: actions/setup-python@v4
with:
python-version: "3.12"

- id: get-compatible-python
uses: MDAnalysis/mdanalysis-compatible-python@main
with:
release: "develop"

mdakit-ci:
needs: gen_matrix
needs: [gen_matrix, env_config]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
mdakit: ${{fromJSON(needs.gen_matrix.outputs.matrix)}}
jobstep: ['latest', 'develop']
steps:
- uses: actions/checkout@v3

- id: prev-python-ver
name: prev-python-ver
uses: MDAnalysis/get-latest-python-version@main
with:
last-n-minor-release: 1
- uses: actions/checkout@v4

- id: get-base-python-deps
name: get-base-python-deps
Expand All @@ -60,10 +70,11 @@ jobs:
- id: check-set-python-bounds
name: check-set-python-bounds
continue-on-error: true
continue-on-error: false
run: |
basepy=${{steps.prev-python-ver.outputs.python-version}}
pyver=$(python utils/check_python_ver.py --mdakit "${{matrix.mdakit}}" --maxpyver ${basepy})
maxpy=${{needs.env_config.outputs.python-stable}}
minpy=${{needs.env_config.outputs.python-min}}
pyver=$(python utils/check_python_ver.py --mdakit "${{matrix.mdakit}}" --maxpyver ${maxpy} --minpyver ${minpy})
echo "PYVER=${pyver}" >> $GITHUB_ENV
- id: install-conda-env
Expand Down Expand Up @@ -159,9 +170,9 @@ jobs:
packages: none
issues: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: json-statuses/

Expand Down Expand Up @@ -191,7 +202,7 @@ jobs:
needs: process_results
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup_micromamba
uses: mamba-org/setup-micromamba@v1
with:
Expand Down
34 changes: 22 additions & 12 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
outputs:
matrix: ${{ steps.get-changed-mdakits.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: get-python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.9

Expand All @@ -40,22 +40,31 @@ jobs:
echo ${mdakit}
echo "matrix=${mdakit}" >> $GITHUB_OUTPUT
env_config:
runs-on: ubuntu-latest
outputs:
python-stable: ${{ steps.get-compatible-python.outputs.stable-python }}
python-min: ${{ steps.get-compatible-python.outputs.oldest-pythons }}
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.12"

- id: get-compatible-python
uses: MDAnalysis/mdanalysis-compatible-python@main
with:
release: "develop"

mdakit-ci:
needs: gen_matrix
needs: [gen_matrix, env_config]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
mdakit: ${{fromJSON(needs.gen_matrix.outputs.matrix)}}
jobstep: ['latest', 'develop']
steps:
- uses: actions/checkout@v3

- id: prev-python-ver
name: prev-python-ver
uses: MDAnalysis/get-latest-python-version@main
with:
last-n-minor-release: 1
- uses: actions/checkout@v4

- id: get-base-python-deps
name: get-base-python-deps
Expand All @@ -66,8 +75,9 @@ jobs:
name: check-set-python-bounds
continue-on-error: false
run: |
basepy=${{steps.prev-python-ver.outputs.python-version}}
pyver=$(python utils/check_python_ver.py --mdakit "${{matrix.mdakit}}" --maxpyver ${basepy})
maxpy=${{needs.env_config.outputs.python-stable}}
minpy=${{needs.env_config.outputs.python-min}}
pyver=$(python utils/check_python_ver.py --mdakit "${{matrix.mdakit}}" --maxpyver ${maxpy} --minpyver ${minpy})
echo "PYVER=${pyver}" >> $GITHUB_ENV
- id: install-conda-env
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Required entries
project_name: hole2-mdakit
project_name: mdahole2
authors:
- https://github.com/MDAnalysis/hole2-mdakit/blob/main/AUTHORS.md
- https://github.com/MDAnalysis/mdahole2/blob/main/AUTHORS.md
maintainers:
- lilyminium
description:
Expand All @@ -12,18 +12,18 @@ keywords:
- transporters
- HOLE
license: GPL-3.0
project_home: https://github.com/MDAnalysis/hole2-mdakit
documentation_home: https://www.mdanalysis.org/hole2-mdakit/
project_home: https://github.com/MDAnalysis/mdahole2
documentation_home: https://www.mdanalysis.org/mdahole2/
documentation_type: API

## Optional entries
install:
- mamba install hole2 -c conda-forge
- pip install git+https://github.com/MDAnalysis/hole2-mdakit@main
- pip install git+https://github.com/MDAnalysis/mdahole2@main
src_install:
- git clone https://github.com/MDAnalysis/hole2-mdakit.git
- git clone https://github.com/MDAnalysis/mdahole2.git
- mamba install hole2 -c conda-forge
- cd hole2-mdakit && pip install . && cd ..
- cd mdahole2 && pip install . && cd ..
python_requires: ">=3.9"
mdanalysis_requires: ">=2.0.0"
test_dependencies:
Expand Down
File renamed without changes.

0 comments on commit 89ae291

Please sign in to comment.