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
27 changes: 12 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,33 @@ on:
branches: [main]

jobs:
tests:
docs:
name: "Build docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Python
id: setup_python
uses: conda-incubator/setup-miniconda@v3
uses: actions/setup-python@v5
with:
activate-environment: vplanet
environment-file: environment.yml
python-version: 3.9
python-version: '3.11'
cache: 'pip'
cache-dependency-path: setup.py

- name: Install
id: install
if: steps.setup_python.outcome == 'success'
shell: bash -l {0}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen
sudo apt-get install -y doxygen-doc
sudo apt-get install -y doxygen doxygen-doc

- name: Install Python dependencies
run: |
python -m pip install -U pip
python -m pip install -e .
python -m pip install sphinx sphinx-rtd-theme breathe sphinxcontrib-bibtex

- name: Build
id: build
if: steps.install.outcome == 'success'
shell: bash -l {0}
run: |
cd docs
make html
Expand All @@ -42,7 +40,6 @@ jobs:

- name: Publish
uses: JamesIves/github-pages-deploy-action@v4
# NOTE: Triggered only when the PR is *merged* (event_name == 'push')
if: steps.build.outcome == 'success' && github.event_name == 'push'
with:
branch: gh-pages
Expand Down
35 changes: 14 additions & 21 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,38 @@ on:
types: [published]

jobs:
tests:
name: '${{ matrix.python-version }}'
examples:
name: 'Examples on py${{ matrix.python-version }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Install Latex
id: install_latex
shell: bash -l {0}
- name: Install LaTeX
run: |
sudo apt-get update
sudo apt-get install cm-super
sudo apt-get install texlive-fonts-recommended texlive-fonts-extra
sudo apt-get install dvipng
sudo apt-get install -y cm-super texlive-fonts-recommended texlive-fonts-extra dvipng

- name: Set up Python
id: setup_python
uses: conda-incubator/setup-miniconda@v3
uses: actions/setup-python@v5
with:
activate-environment: vplanet
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: setup.py

- name: Install
id: install
if: steps.setup_python.outcome == 'success'
shell: bash -l {0}
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -e .

- name: Run Examples
if: steps.install.outcome == 'success'
shell: bash -l {0}
- name: Build vplanet
run: make opt

- name: Run examples
run: python docs/run_examples.py
19 changes: 11 additions & 8 deletions .github/workflows/floatingpoint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Python
id: setup_python
uses: conda-incubator/setup-miniconda@v3
uses: actions/setup-python@v5
with:
activate-environment: vplanet
environment-file: environment.yml
python-version: 3.9
python-version: '3.11'
cache: 'pip'
cache-dependency-path: setup.py

- name: Run
shell: bash -l {0}
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -e .

- name: Run floating point check
run: |
cd tests/
python floatingpoint.py
22 changes: 9 additions & 13 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,25 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Python
id: setup_python
uses: conda-incubator/setup-miniconda@v3
uses: actions/setup-python@v5
with:
activate-environment: vplanet
environment-file: environment.yml
python-version: 3.8
python-version: '3.11'
cache: 'pip'
cache-dependency-path: setup.py

- name: Install valgrind
id: install
if: steps.setup_python.outcome == 'success'
shell: bash -l {0}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install valgrind
sudo apt-get install -y valgrind
python -m pip install -U pip
python -m pip install -e .

- name: Run valgrind test
if: steps.install.outcome == 'success'
shell: bash -l {0}
run: |
cd tests/
python valgrind.py
180 changes: 38 additions & 142 deletions .github/workflows/pip-install.yml
Original file line number Diff line number Diff line change
@@ -1,171 +1,67 @@
name: pip-install

on:
release:
types: [published]
types:
- published

jobs:
build_wheels:
name: Building wheel for ${{ matrix.os }}:Python-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, macos-14]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
exclude:
- os: ubuntu-22.04
python-version: '3.6'
- os: macos-14
python-version: '3.6'
- os: macos-14
python-version: '3.7'
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Set up Python
id: setup_python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install packages
run: |
python -m pip install -U pip
python -m pip install setuptools
python -m pip install cibuildwheel

- name: Build wheel on Linux
if: runner.os == 'Linux'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: 'cp3?-*'
CIBW_SKIP: '*-manylinux_i686'
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014

- name: Build wheel on macOS
if: runner.os == 'macOS'
run: |
python -m cibuildwheel --output-dir wheelhouse

- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}-${{ matrix.python-version }}
path: ./wheelhouse/

build_sdist:
name: Building source for ${{ matrix.os }}:Python-${{ matrix.python-version }}
build:
name: 'py${{ matrix.python }} on ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, macos-14]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
exclude:
- os: ubuntu-22.04
python-version: '3.6'
- os: macos-14
python-version: '3.6'
- os: macos-14
python-version: '3.7'
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-15-intel, macos-26]
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0

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

- name: Install packages
- name: Build
run: |
python -m pip install -U pip
python -m pip install setuptools
python -m pip install -U pip build twine setuptools setuptools_scm wheel
python -m build

- name: Build sdist
run: python setup.py sdist
- name: Test the sdist
run: |
python -m venv venv-sdist
venv-sdist/bin/python -m pip install dist/vplanet*.tar.gz
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
venv-wheel/bin/python -c "import vplanet; print(vplanet.__version__)"

- name: Upload sdist artifact
uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v4
with:
name: sdist-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/
name: dist-${{ matrix.os }}-${{ matrix.python }}
path: dist/*

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-22.04
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published' && github.repository == 'VirtualPlanetaryLaboratory/vplanet'
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
name: wheel-ubuntu-20.04-3.6.whl
path: wheelhouse

- uses: actions/download-artifact@v4
with:
name: wheel-ubuntu-22.04-*
path: wheelhouse

- uses: actions/download-artifact@v4
with:
name: wheel-macos-12-*
path: wheelhouse

- uses: actions/download-artifact@v4
with:
name: wheel-macos-13-*
path: wheelhouse

- uses: actions/download-artifact@v4
with:
name: wheel-macos-14-*
path: wheelhouse

- uses: actions/download-artifact@v4
with:
name: sdist-ubuntu-20.04-*
path: dist

- uses: actions/download-artifact@v4
with:
name: sdist-ubuntu-22.04-*
path: dist

- uses: actions/download-artifact@v4
with:
name: sdist-macos-12-*
path: dist

- uses: actions/download-artifact@v4
with:
name: sdist-macos-13-*
path: dist

- uses: actions/download-artifact@v4
with:
name: sdist-macos-14-*
- uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install twine

- name: Upload to PyPI
if: github.repository == 'VirtualPlanetaryLaboratory/vplanet'
run: python -m twine upload dist/* wheelhouse/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}

# Only push to PyPI if we're on the public repo!
# - uses: pypa/gh-action-pypi-publish@release/v1
# if: (!github.event.release.prerelease) && github.event_name == 'release' && github.event.action == 'published' && github.repository == 'VirtualPlanetaryLaboratory/vplanet'
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}
- uses: pypa/gh-action-pypi-publish@release/v1
Loading
Loading