Skip to content

Commit 3867c5f

Browse files
authored
ci: add nightlies for scientific-python (#5675)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 9e6fe46 commit 3867c5f

File tree

2 files changed

+63
-4
lines changed

2 files changed

+63
-4
lines changed

.github/workflows/nightlies.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Upload nightly wheels to Anaconda Cloud
2+
3+
on:
4+
# Run daily at 2:34 UTC to upload nightly wheels to Anaconda Cloud
5+
schedule:
6+
- cron: "34 2 * * *"
7+
# Run on demand with workflow dispatch
8+
workflow_dispatch:
9+
10+
permissions:
11+
actions: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build_wheel:
19+
name: Build and upload wheel
20+
if: github.repository_owner == 'pybind'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v6
29+
30+
- name: Build SDist and wheels
31+
run: |
32+
uv tool install nox
33+
nox -s build
34+
nox -s build_global
35+
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
name: Packages
39+
path: dist/*
40+
41+
upload_nightly_wheels:
42+
name: Upload nightly wheels to Anaconda Cloud
43+
if: github.repository_owner == 'pybind'
44+
needs: [build_wheel]
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/download-artifact@v4
48+
with:
49+
name: Packages
50+
path: dist
51+
52+
- name: List wheel to be deployed
53+
run: ls -lha dist/*.whl
54+
55+
- name: Upload wheel to Anaconda Cloud as nightly
56+
uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf # 0.6.2
57+
with:
58+
artifacts_path: dist
59+
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}

.github/workflows/pip.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ jobs:
5858
uses: astral-sh/setup-uv@v6
5959

6060
- name: Prepare env
61-
run: uv pip install --system -r tests/requirements.txt twine
61+
run: uv pip install --system -r tests/requirements.txt twine nox
6262

6363
- name: Python Packaging tests
6464
run: pytest tests/extra_python_package/
6565

6666
- name: Build SDist and wheels
6767
run: |
68-
uv build
69-
PYBIND11_GLOBAL_SDIST=1 uv build
68+
nox -s build
69+
nox -s build_global
7070
7171
- name: Check metadata
7272
run: twine check dist/*
@@ -81,7 +81,7 @@ jobs:
8181
uses: actions/upload-artifact@v4
8282
with:
8383
name: global
84-
path: dist/pybind11_global-*
84+
path: dist/*global-*
8585

8686

8787

0 commit comments

Comments
 (0)