Nuwa Build Action
A GitHub Action to automatically build Python wheels for Nuwa Build projects using cibuildwheel.
Overview
This action handles the complexity of installing the Nim compiler across different platforms (Linux Docker containers, macOS, and Windows) and orchestrates the wheel build process.
Features
- Zero Configuration - Automatically sets up Nim on the runner or inside build containers
- Multi-Platform Support - Linux manylinux x86_64/aarch64, macOS native Intel/ARM, Windows 64-bit (see support matrix)
- Cibuildwheel Integration - Leverages industry-standard
cibuildwheelfor reliable wheel generation - Customizable - Supports specific Nim versions and standard cibuildwheel environment variables
Quick Start
Basic Workflow
name: Build Wheels
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: martineastwood/nuwa-build-action@297c4d536f3e4154431dedac55593a96b6b84df2 # reviewed v1-compatible commit
with:
nim-version: "2.2.10"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
Inputs
| Input | Description | Default |
|---|---|---|
nim-version |
The version of the Nim compiler to install | 2.2.10 |
cibw-version |
The version of cibuildwheel to use |
4.2.0 |
package-dir |
Project directory passed to cibuildwheel | . |
Next Steps
- Advanced Configuration - Control Python versions, architectures, and more
- Platform Details - How Nim is installed on each platform
- Publishing to PyPI - Automated PyPI publishing
- FAQ - Common questions and issues