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
61 changes: 36 additions & 25 deletions .github/workflows/pip-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,32 @@ on:
jobs:

build:
name: 'py${{ matrix.python }} on ${{ matrix.os }}'
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.11'

- name: Build sdist
run: |
python -m pip install -U pip build setuptools setuptools_scm wheel
python -m build --sdist

- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*

test:
name: 'Test py${{ matrix.python }} on ${{ matrix.os }}'
needs: [build]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -17,41 +42,28 @@ jobs:
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v4
with:
submodules: true
fetch-depth: 0
name: dist
path: dist

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python }}
allow-prereleases: true

- name: Build
- name: Install from sdist
run: |
python -m pip install -U pip build twine setuptools setuptools_scm wheel
python -m build
python -m venv venv-test
venv-test/bin/python -m pip install dist/vplanet*.tar.gz

- name: Test the sdist
- name: Verify import
run: |
python -m venv venv-sdist
venv-sdist/bin/python -m pip install dist/vplanet*.tar.gz
cd /tmp && "$GITHUB_WORKSPACE/venv-sdist/bin/python" -c "import vplanet; print(vplanet.__version__)"

- name: Test the wheel
run: |
python -m venv venv-wheel
venv-wheel/bin/python -m pip install dist/vplanet*.whl
cd /tmp && "$GITHUB_WORKSPACE/venv-wheel/bin/python" -c "import vplanet; print(vplanet.__version__)"

- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}-${{ matrix.python }}
path: dist/*
cd /tmp && "$GITHUB_WORKSPACE/venv-test/bin/python" -c "import vplanet; print(vplanet.__version__)"

upload_pypi:
needs: [build]
needs: [build, test]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published' && github.repository == 'VirtualPlanetaryLaboratory/vplanet'
permissions:
Expand All @@ -60,8 +72,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
name: dist
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.35
2.5.36
Loading