Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

Implements automated wheel building and PyPI deployment following the cibuildwheel deployment pattern.

Changes

  • .github/workflows/build-pynec-wheels.yml: GitHub Actions workflow for PyNEC package with three jobs:

    • build_wheels: Builds wheels for PyNEC on Linux x86_64, macOS Intel, and macOS ARM for Python 3.9-3.12
    • build_sdist: Builds source distribution for PyNEC
    • upload_pypi: Deploys to PyPI on release publications using trusted publishing (OIDC)
  • .github/workflows/build-necpp-wheels.yml: GitHub Actions workflow for necpp package with three jobs:

    • build_wheels: Builds wheels for necpp on Linux x86_64, macOS Intel, and macOS ARM for Python 3.9-3.12
    • build_sdist: Builds source distribution for necpp
    • upload_pypi: Deploys to PyPI on release publications using trusted publishing (OIDC)
  • necpp/pyproject.toml: Adds modern build system configuration (PyNEC already had one)

Build Pipeline

Each workflow independently handles the complex build requirements:

  1. Initializes necpp_src submodule
  2. Runs autotools (make -f Makefile.git && ./configure --without-lapack)
  3. Generates SWIG wrappers for the respective package
  4. Creates symlinks for necpp_src in package directory
  5. Invokes cibuildwheel with appropriate platform settings

Benefits of Separate Workflows

  • Independent CI runs for each package
  • Easier to manage and debug individual package builds
  • Can be triggered independently via workflow_dispatch
  • Clearer artifact naming for each package

Prerequisites for Deployment

Configure the pypi environment in repository settings and set up PyPI trusted publishing before the first release. Each workflow can be manually triggered independently via Actions tab for testing.

Scope Limitations

  • Python 3.8 excluded (reached EOL October 2024)
  • Windows builds not included (autotools compatibility; can be added separately if needed)
  • musllinux builds skipped (autotools configure limitations)
Original prompt

Add CI to build wheels and deploy using https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 5, 2026 21:51
Co-authored-by: tmolteno <85630+tmolteno@users.noreply.github.com>
Co-authored-by: tmolteno <85630+tmolteno@users.noreply.github.com>
Co-authored-by: tmolteno <85630+tmolteno@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CI for building wheels and deployment Add CI to build wheels and deploy using cibuildwheel Jan 5, 2026
Copilot AI requested a review from tmolteno January 5, 2026 21:57
Copy link
Owner

@tmolteno tmolteno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be split into two yaml files. One for necpp. The other for PyNEC.

Co-authored-by: tmolteno <85630+tmolteno@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 5, 2026

This should be split into two yaml files. One for necpp. The other for PyNEC.

Split into two separate workflow files in commit e52dd4f:

  • .github/workflows/build-pynec-wheels.yml for PyNEC
  • .github/workflows/build-necpp-wheels.yml for necpp

Each workflow now independently manages its package's build, test, and deployment pipeline.

Copilot AI requested a review from tmolteno January 5, 2026 22:18
@tmolteno tmolteno marked this pull request as ready for review January 5, 2026 22:21
@tmolteno tmolteno merged commit db9eb7f into master Jan 5, 2026
@tmolteno tmolteno deleted the copilot/add-ci-for-wheels-deployment branch January 5, 2026 22:21
@tmolteno
Copy link
Owner

tmolteno commented Jan 5, 2026

Closes #33

@tmolteno
Copy link
Owner

tmolteno commented Jan 5, 2026

Closes #32 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants