{"id":19741957,"url":"https://github.com/pyo3/maturin-action","last_synced_at":"2025-04-05T05:07:59.357Z","repository":{"id":37004339,"uuid":"363801746","full_name":"PyO3/maturin-action","owner":"PyO3","description":"GitHub Action to install and run a custom maturin command with built-in support for cross compilation","archived":false,"fork":false,"pushed_at":"2024-04-30T15:02:32.000Z","size":1154,"stargazers_count":117,"open_issues_count":8,"forks_count":28,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-02T00:55:26.767Z","etag":null,"topics":["cffi","github-actions","hacktoberfest","manylinux","maturin","pyo3","rust-cpython","uniffi"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyO3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"messense"}},"created_at":"2021-05-03T02:56:38.000Z","updated_at":"2024-06-26T05:17:20.479Z","dependencies_parsed_at":"2023-10-02T02:35:42.967Z","dependency_job_id":"ddcdecec-b3e7-4af1-9fbf-55d6635ea0fd","html_url":"https://github.com/PyO3/maturin-action","commit_stats":{"total_commits":344,"total_committers":6,"mean_commits":"57.333333333333336","dds":0.1482558139534884,"last_synced_commit":"a123404dc0be025cbece96674da369e7dab1c2d1"},"previous_names":[],"tags_count":105,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyO3%2Fmaturin-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyO3%2Fmaturin-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyO3%2Fmaturin-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyO3%2Fmaturin-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyO3","download_url":"https://codeload.github.com/PyO3/maturin-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289428,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cffi","github-actions","hacktoberfest","manylinux","maturin","pyo3","rust-cpython","uniffi"],"created_at":"2024-11-12T01:28:32.760Z","updated_at":"2025-04-05T05:07:59.321Z","avatar_url":"https://github.com/PyO3.png","language":"TypeScript","funding_links":["https://github.com/sponsors/messense"],"categories":[],"sub_categories":[],"readme":"# maturin-action\n\n[![GitHub Actions](https://github.com/PyO3/maturin-action/actions/workflows/test.yml/badge.svg)](https://github.com/PyO3/maturin-action/actions?query=workflow%3ATest)\n\nGitHub Action to install and run a custom [maturin](https://github.com/PyO3/maturin) command with built-in support for cross compilation.\n\n## Usage\n\n```yaml\n- uses: PyO3/maturin-action@v1\n  with:\n    command: build\n    args: --release\n```\n\n**To generate a GitHub Actions workflow for your project, try the `maturin generate-ci github` command.**\n\n```bash\nmkdir -p .github/workflows\nmaturin generate-ci github \u003e .github/workflows/CI.yml\n```\n\n### Examples\n\nIf you want to build and publish a Python extension module for common Python versions, operating systems, and CPU architectures, \ntake a look at the following examples:\n\n* [messense/crfs-rs](https://github.com/messense/crfs-rs/blob/main/.github/workflows/Python.yml): PyO3 abi3 wheel example\n* [messense/rjmespath-rs](https://github.com/messense/rjmespath-py/blob/main/.github/workflows/CI.yml): PyO3 abi3 wheel with Rust nightly toolchain example\n* [milesgranger/pyrus-cramjam](https://github.com/milesgranger/pyrus-cramjam/blob/master/.github/workflows/CI.yml): PyO3 non-abi3 wheel example\n* [messense/auditwheel-symbols](https://github.com/messense/auditwheel-symbols/blob/master/.github/workflows/CI.yml): `bin` binding example using MUSL libc\n* [adriangb/graphlib2](https://github.com/adriangb/graphlib2/blob/main/.github/workflows/python.yaml): PyO3 abi3 wheel\n* [pydantic/pydantic-core](https://github.com/pydantic/pydantic-core/blob/main/.github/workflows/ci.yml): PyO3 non-abi3 wheel with PyPy support example\n* [messense/py-dissimilar](https://github.com/messense/py-dissimilar/blob/main/.github/workflows/CI.yml): PyO3 non-abi3 wheel with PyPy support example\n\n## Inputs\n\n| Name                | Required | Description                                                                                                        | Type    | Default                                                                                                                            |\n| ------------------- | :------: | ------------------------------------------------------------------------------------------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| command             |    No    | `maturin` command to run                                                                                           | string  | `build`                                                                                                                            |\n| args                |    No    | Arguments to pass to `maturin` subcommand                                                                          | string  |                                                                                                                                    |\n| maturin-version     |    No    | The version of `maturin` to use. Must match a [tagged release]                                                     | string  | `latest`                                                                                                                           |\n| manylinux           |    No    | Control the manylinux platform tag on linux, ignored on other platforms, use `auto` to build for lowest compatible | string  | Defaults to `auto` for the `publish` command                                                                                       |\n| target              |    No    | The `--target` option for Cargo                                                                                    | string  |                                                                                                                                    |\n| container           |    No    | manylinux docker container image name                                                                              | string  | Default depends on `target` and `manylinux` options, Set to `off` to disable manylinux docker build and build on the host instead. |\n| docker-options      |    No    | Additional Docker run options, for passing environment variables and etc.                                          | string  |\n| rust-toolchain      |    No    | Rust toolchain name.                                                                                               | string  | Defaults to `stable` for Docker build. To use the latest available version for the host build, the user must specify this in the CI config or repo config. |\n| rustup-components   |    No    | Rustup components                                                                                                  | string  | Defaults to empty                                                                                                                  |\n| working-directory   |    No    | The working directory to run the command in                                                                        | string  | Defaults to the root of the repository                                                                                             |\n| sccache             |    No    | Enable sccache for faster builds                                                                                   | boolean | Defaults to `false`                                                                                                                |\n| before-script-linux |    No    | Script to run before the maturin command on Linux                                                                  | string  |                                                                                                                                    |\n\n\n## `manylinux` Docker container\n\nBy default, this action uses the following containers for supported architectures and manylinux versions.\n\n| Architecture | Manylinux version | Default container                               | Note       |\n| ------------ | ----------------- | ----------------------------------------------- | ---------- |\n| x86_64       | 2010/2_12         | quay.io/pypa/manylinux2010_x86_64:latest        |            |\n| x86_64       | 2014/2_17         | quay.io/pypa/manylinux2014_x86_64:latest        |            |\n| x86_64       | 2_24              | quay.io/pypa/manylinux_2_24_x86_64:latest       | Deprecated |\n| x86_64       | 2_28              | quay.io/pypa/manylinux_2_28_x86_64:latest       |            |\n| i686         | 2010/2_12         | quay.io/pypa/manylinux2010_i686:latest          |            |\n| i686         | 2014/2_17         | quay.io/pypa/manylinux2014_i686:latest          |            |\n| i686         | 2_24              | quay.io/pypa/manylinux_2_24_i686:latest         | Deprecated |\n| aarch64      | 2014/2_17         | ghcr.io/rust-cross/manylinux2014-cross:aarch64  |            |\n| aarch64      | 2_24              | messense/manylinux_2_24-cross:aarch64           | Deprecated |\n| aarch64      | 2_28              | ghcr.io/rust-cross/manylinux_2_28-cross:aarch64 |            |\n| armv7l       | 2014/2_17         | ghcr.io/rust-cross/manylinux2014-cross:armv7    |            |\n| armv7l       | 2_24              | messense/manylinux_2_24-cross:armv7             | Deprecated |\n| armv7l       | 2_28              | ghcr.io/rust-cross/manylinux_2_28-cross:armv7   |            |\n| ppc64le      | 2014/2_17         | ghcr.io/rust-cross/manylinux2014-cross:ppc64le  |            |\n| ppc64le      | 2_24              | messense/manylinux_2_24-cross:ppc64le           | Deprecated |\n| ppc64le      | 2_28              | ghcr.io/rust-cross/manylinux_2_28-cross:ppc64le |            |\n| ppc64        | 2014/2_17         | ghcr.io/rust-cross/manylinux2014-cross:ppc64    |            |\n| s390x        | 2014/2_17         | ghcr.io/rust-cross/manylinux2014-cross:s390x    |            |\n| s390x        | 2_24              | messense/manylinux_2_24-cross:s390x             | Deprecated |\n| s390x        | 2_28              | ghcr.io/rust-cross/manylinux_2_28-cross:s390x   |            |\n\nYou can override it by supplying the `container` input.\nNote that if use official manylinux docker images for platforms other than `x86_64` and `i686`,\nyou will need to setup QEMU before using this action, for example\n\n```yaml\n- name: Setup QEMU\n  uses: docker/setup-qemu-action@v1\n- uses: PyO3/maturin-action@v1\n  with:\n    command: build\n    args: --release\n```\n\nNote that the `actions/setup-python` action won't affect manylinux build since it's containerized,\nso if you want to build for certain Python version for Linux, use `-i pythonX.Y` in the `args` option in\n`PyO3/maturin-action` instead, for example\n\n```yaml\n- uses: PyO3/maturin-action@v1\n  with:\n    args: --release -i python3.10\n```\n\n## Contributing\n\nTo build after code changes:\n\n```bash\nnpm run all\n```\n\n## License\n\nThis work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file.\n\n[tagged release]: https://github.com/PyO3/maturin/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyo3%2Fmaturin-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyo3%2Fmaturin-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyo3%2Fmaturin-action/lists"}