Skip to content

Ship a reusable GitHub Actions workflow for downstream wrapped-library builds #37

Description

@timholy

A consumer repo (someone who has written a Julia library they want to expose as a Python package via JuliaLibWrapping) should be able to add one line to a workflow and get wheels + a header tarball produced as release assets on tag.

Proposed shape

Ship `.github/workflows/build-wrappers.yml` with `on: workflow_call` (or a composite action under `.github/actions/build-wrappers/`) that takes:

  • `entry` — path to the entry `.jl` file (e.g. `src/mylib.jl`)
  • `libname` — library basename
  • `python-package` — Python package name
  • `targets` — which targets to emit (`c`, `python`, `both`)
  • `bundle` — whether to pass `bundle = true` (default true for Python target)

and runs the `build_library` → `pip wheel` pipeline. The consumer's own workflow looks like:

on:
  release:
    types: [published]   # fires when TagBot creates the release
jobs:
  wrap:
    uses: JuliaInterop/JuliaLibWrapping.jl/.github/workflows/build-wrappers.yml@v1
    with:
      entry: src/mylib.jl
      libname: mylib
      python-package: mylib_py

Open design questions

  • Where do artifacts go? GitHub release assets (always), PyPI (opt-in via Trusted Publishing), both?
  • Matrix scope. Linux x86_64 only for v1, or full `{linux × {x86_64, aarch64}, macOS × {x86_64, arm64}, Windows}`? Each bundle is ~300+ MB and `juliac` is slow, so a full matrix is real cost.
  • Caching. `julia-actions/cache` for the entry project's manifest; almost certainly need a custom cache for `juliac` build artifacts to keep runs under 10 min.
  • Triggering convention. TagBot creates the GitHub release as `JuliaTagBot`. `on: release: types: [published]` should fire correctly; document it.

Scope notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions