Skip to content

Commit 66fbd95

Browse files
committed
Enable sccache, publish using trusted publishing, and use the full ABI.
1 parent f60f9c6 commit 66fbd95

File tree

4 files changed

+40
-20
lines changed

4 files changed

+40
-20
lines changed

.github/workflows/CI.yml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ on:
1010
release:
1111
types: [published]
1212
schedule:
13-
# Daily at 5:33
14-
- cron: "33 5 * * *"
13+
# Daily at 6:33
14+
- cron: "33 6 * * *"
1515
workflow_dispatch:
1616

17-
permissions:
18-
contents: write
19-
2017
jobs:
2118
pre-commit:
2219
runs-on: ubuntu-latest
@@ -89,6 +86,7 @@ jobs:
8986
with:
9087
target: ${{ matrix.target }}
9188
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10'
89+
sccache: "true"
9290
manylinux: auto
9391
- name: Upload wheels
9492
uses: actions/upload-artifact@v3
@@ -116,6 +114,7 @@ jobs:
116114
target: ${{ matrix.target }}
117115
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10'
118116
manylinux: musllinux_1_2
117+
sccache: "true"
119118
- name: Upload wheels
120119
uses: actions/upload-artifact@v3
121120
with:
@@ -132,13 +131,19 @@ jobs:
132131
- uses: actions/checkout@v4
133132
- uses: actions/setup-python@v4
134133
with:
135-
python-version: "3.x"
134+
python-version: |
135+
3.8
136+
3.9
137+
3.10
138+
3.11
139+
3.12
136140
architecture: ${{ matrix.target }}
137141
- name: Build wheels
138142
uses: PyO3/maturin-action@v1
139143
with:
140144
target: ${{ matrix.target }}
141-
args: --release --out dist --find-interpreter --sdist
145+
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12'
146+
sccache: "true"
142147
- name: Upload wheels
143148
uses: actions/upload-artifact@v3
144149
with:
@@ -161,25 +166,46 @@ jobs:
161166
with:
162167
target: ${{ matrix.target }}
163168
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10'
169+
sccache: "true"
164170
- name: Upload wheels
165171
uses: actions/upload-artifact@v3
166172
with:
167173
name: wheels
168174
path: dist
169175

176+
sdist:
177+
needs: test
178+
runs-on: ubuntu-latest
179+
steps:
180+
- uses: actions/checkout@v4
181+
- name: Build an sdist
182+
uses: PyO3/maturin-action@v1
183+
with:
184+
command: sdist
185+
args: --out dist
186+
- name: Upload sdist
187+
uses: actions/upload-artifact@v3
188+
with:
189+
name: wheels
190+
path: dist
191+
170192
release:
171-
name: Release
193+
needs: [manylinux, musllinux, windows, macos]
172194
runs-on: ubuntu-latest
173195
if: "startsWith(github.ref, 'refs/tags/')"
174-
needs: [manylinux, musllinux, windows, macos]
196+
environment:
197+
name: PyPI
198+
url: https://pypi.org/p/regress
199+
permissions:
200+
contents: write
201+
id-token: write
202+
175203
steps:
176204
- uses: actions/download-artifact@v3
177205
with:
178206
name: wheels
179207
- name: Publish to PyPI
180208
uses: PyO3/maturin-action@v1
181-
env:
182-
MATURIN_PYPI_TOKEN: ${{ secrets.pypi_password }}
183209
with:
184210
command: upload
185211
args: --skip-existing *

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "regress-py"
3-
version = "0.4.1"
3+
version = "0.4.2"
44
edition = "2021"
55

66
[lib]
@@ -12,4 +12,4 @@ regress = "0.7.0"
1212

1313
[dependencies.pyo3]
1414
version = "0.19.2"
15-
features = ["abi3-py38"]
15+
features = ["extension-module"]

noxfile.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ def tests(session):
4949
session.run("pytest", *session.posargs, TESTS)
5050

5151

52-
@session()
53-
def audit(session):
54-
session.install("pip-audit", ROOT)
55-
session.run("python", "-m", "pip_audit")
56-
57-
5852
@session(tags=["build"])
5953
def build(session):
6054
session.install("build", "twine")

0 commit comments

Comments
 (0)