Skip to content

Commit 9c9d4c2

Browse files
authored
Update build dependencies (#168)
* Update build dependencies * Update pyproject.toml * Update tests.yml * Update pyproject.toml
1 parent b2c44da commit 9c9d4c2

File tree

2 files changed

+41
-47
lines changed

2 files changed

+41
-47
lines changed

.github/workflows/tests.yml

Lines changed: 37 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
name: Tests
22
on:
33
push:
4-
branches: [main]
4+
branches:
5+
- main
6+
tags:
7+
- "*"
58
pull_request:
6-
branches: [main]
7-
release:
8-
types:
9-
- published
9+
branches:
10+
- main
11+
workflow_dispatch:
12+
inputs:
13+
prerelease:
14+
description: "Run a pre-release, testing the build"
15+
required: false
16+
type: boolean
17+
default: false
18+
1019
jobs:
1120
tests:
1221
name: "py${{ matrix.python-version }} / ${{ matrix.os }}"
1322
runs-on: ${{ matrix.os }}
1423
strategy:
1524
fail-fast: false
1625
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11"]
26+
python-version: ["3.9", "3.10", "3.11"]
1827
os: [ubuntu-latest]
1928
include:
2029
- python-version: "3.10"
@@ -38,49 +47,27 @@ jobs:
3847
- name: Run tests
3948
run: python -m pytest -v tests
4049

41-
coverage:
42-
name: "Run tests with coverage"
43-
runs-on: ubuntu-latest
44-
steps:
45-
- name: Clone the repo
46-
uses: actions/checkout@v4
47-
with:
48-
fetch-depth: 0
49-
submodules: recursive
50-
- name: Set up Python
51-
uses: actions/setup-python@v5
52-
with:
53-
python-version: 3.9
54-
- name: Install dependencies
55-
run: |
56-
python -m pip install -U pip pytest-cov
57-
python -m pip install -e .
58-
- name: Run tests
59-
run: python -m pytest --cov george -v tests
60-
- name: Coveralls
61-
uses: AndreMiras/coveralls-python-action@v20201129
62-
6350
build_wheels:
64-
name: Build wheels on ${{ matrix.os }}
6551
runs-on: ${{ matrix.os }}
6652
strategy:
6753
matrix:
68-
os: [ubuntu-latest, windows-latest, macos-latest]
54+
os:
55+
- "ubuntu-22.04"
56+
- "macos-12"
57+
- "macos-14"
58+
- "windows-latest"
6959
steps:
7060
- uses: actions/checkout@v4
7161
with:
7262
submodules: true
7363
fetch-depth: 0
7464
- uses: pypa/cibuildwheel@v2.19.1
75-
env:
76-
CIBW_SKIP: "*-win32 *_i686"
77-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
7865
- uses: actions/upload-artifact@v4
7966
with:
67+
name: binary-${{ matrix.os }}
8068
path: ./wheelhouse/*.whl
8169

8270
build_sdist:
83-
name: Build source distribution
8471
runs-on: ubuntu-latest
8572
steps:
8673
- uses: actions/checkout@v4
@@ -90,28 +77,32 @@ jobs:
9077
- uses: actions/setup-python@v5
9178
name: Install Python
9279
with:
93-
python-version: "3.9"
94-
- name: Build sdist
80+
python-version: "3.10"
81+
- name: Install dependencies
9582
run: |
9683
python -m pip install -U pip
97-
python -m pip install -U build
98-
python -m build --sdist .
84+
python -m pip install -U build twine
85+
- name: Build sdist
86+
run: python -m build --sdist .
87+
- name: Check the sdist
88+
run: python -m twine check dist/*.tar.gz
9989
- uses: actions/upload-artifact@v4
10090
with:
91+
name: sdist
10192
path: dist/*.tar.gz
10293

10394
upload_pypi:
104-
needs: [tests, build_wheels, build_sdist]
95+
environment:
96+
name: pypi
97+
url: https://pypi.org/p/george
98+
permissions:
99+
id-token: write
100+
needs: [build_wheels, build_sdist]
105101
runs-on: ubuntu-latest
106-
if: github.event_name == 'release' && github.event.action == 'published'
102+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
107103
steps:
108104
- uses: actions/download-artifact@v4
109105
with:
110-
name: artifact
111106
path: dist
112-
107+
merge-multiple: true
113108
- uses: pypa/gh-action-pypi-publish@v1.9.0
114-
with:
115-
user: __token__
116-
password: ${{ secrets.pypi_password }}
117-
# To test: repository_url: https://test.pypi.org/legacy/

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "george"
33
description = "Blazingly fast Gaussian Processes for regression."
44
readme = "README.rst"
55
authors = [{ name = "Daniel Foreman-Mackey", email = "foreman.mackey@gmail.com" }]
6-
requires-python = ">=3.8"
6+
requires-python = ">=3.9"
77
license = { file = "LICENSE" }
88
urls = { Homepage = "https://github.com/dfm/george" }
99
dependencies = ["numpy", "scipy"]
@@ -22,3 +22,6 @@ build-dir = "build/{wheel_tag}"
2222

2323
[tool.setuptools_scm]
2424
write_to = "src/george/george_version.py"
25+
26+
[tool.cibuildwheel]
27+
skip = "pp* *-win32 *-musllinux_* *-manylinux_i686"

0 commit comments

Comments
 (0)