Skip to content

ci: add nightlies for scientific-python #5675

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

Merged
merged 1 commit into from
May 20, 2025
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
59 changes: 59 additions & 0 deletions .github/workflows/nightlies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Upload nightly wheels to Anaconda Cloud

on:
# Run daily at 2:34 UTC to upload nightly wheels to Anaconda Cloud
schedule:
- cron: "34 2 * * *"
# Run on demand with workflow dispatch
workflow_dispatch:

permissions:
actions: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_wheel:
name: Build and upload wheel
if: github.repository_owner == 'pybind'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Build SDist and wheels
run: |
uv tool install nox
nox -s build
nox -s build_global

- uses: actions/upload-artifact@v4
with:
name: Packages
path: dist/*

upload_nightly_wheels:
name: Upload nightly wheels to Anaconda Cloud
if: github.repository_owner == 'pybind'
needs: [build_wheel]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: List wheel to be deployed
run: ls -lha dist/*.whl

- name: Upload wheel to Anaconda Cloud as nightly
uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf # 0.6.2
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ jobs:
uses: astral-sh/setup-uv@v6

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

- name: Python Packaging tests
run: pytest tests/extra_python_package/

- name: Build SDist and wheels
run: |
uv build
PYBIND11_GLOBAL_SDIST=1 uv build
nox -s build
nox -s build_global

- name: Check metadata
run: twine check dist/*
Expand All @@ -81,7 +81,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: global
path: dist/pybind11_global-*
path: dist/*global-*



Expand Down
Loading