Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build dependencies #168

Merged
merged 5 commits into from
Jun 23, 2024
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
83 changes: 37 additions & 46 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
name: Tests
on:
push:
branches: [main]
branches:
- main
tags:
- "*"
pull_request:
branches: [main]
release:
types:
- published
branches:
- main
workflow_dispatch:
inputs:
prerelease:
description: "Run a pre-release, testing the build"
required: false
type: boolean
default: false

jobs:
tests:
name: "py${{ matrix.python-version }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest]
include:
- python-version: "3.10"
Expand All @@ -38,49 +47,27 @@ jobs:
- name: Run tests
run: python -m pytest -v tests

coverage:
name: "Run tests with coverage"
runs-on: ubuntu-latest
steps:
- name: Clone the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install -U pip pytest-cov
python -m pip install -e .
- name: Run tests
run: python -m pytest --cov george -v tests
- name: Coveralls
uses: AndreMiras/coveralls-python-action@v20201129

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os:
- "ubuntu-22.04"
- "macos-12"
- "macos-14"
- "windows-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: pypa/[email protected]
env:
CIBW_SKIP: "*-win32 *_i686"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
- uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -90,28 +77,32 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.9"
- name: Build sdist
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U build
python -m build --sdist .
python -m pip install -U build twine
- name: Build sdist
run: python -m build --sdist .
- name: Check the sdist
run: python -m twine check dist/*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz

upload_pypi:
needs: [tests, build_wheels, build_sdist]
environment:
name: pypi
url: https://pypi.org/p/george
permissions:
id-token: write
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

merge-multiple: true
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "george"
description = "Blazingly fast Gaussian Processes for regression."
readme = "README.rst"
authors = [{ name = "Daniel Foreman-Mackey", email = "[email protected]" }]
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { file = "LICENSE" }
urls = { Homepage = "https://github.com/dfm/george" }
dependencies = ["numpy", "scipy"]
Expand All @@ -22,3 +22,6 @@ build-dir = "build/{wheel_tag}"

[tool.setuptools_scm]
write_to = "src/george/george_version.py"

[tool.cibuildwheel]
skip = "pp* *-win32 *-musllinux_* *-manylinux_i686"