Skip to content

Centralize Maturin workflows #575

Open
Open

Description

@felixhekhorn

https://github.com/NNPDF/eko/blob/195aec0cc1700ce035bfdfd24f9e7d007c5e1363/.github/workflows/release-pyapi.yml and https://github.com/NNPDF/eko/blob/195aec0cc1700ce035bfdfd24f9e7d007c5e1363/.github/workflows/release-ekors.yml are very similar

diff release-ekors.yml release-pyapi.yml
1c1
< name: Deploy Maturin wheels (eko-rs)
---
> name: Deploy Maturin wheels (ekore-rs)
53c53
<           STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/eko-rs/${VERSION}/json")
---
>           STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/ekore-rs/${VERSION}/json")
55c55
<             echo "::error::eko-rs version '$VERSION' is already published on PyPI."
---
>             echo "::error::ekore-rs version '$VERSION' is already published on PyPI."
107a108,109
>       - name: Install Rust
>         uses: dtolnay/rust-toolchain@stable
112c114
<           args: --release --out dist --find-interpreter -m crates/eko/Cargo.toml
---
>           args: --release --out dist --find-interpreter -m crates/ekore_py/Cargo.toml
143a146,147
>       - name: Install Rust
>         uses: dtolnay/rust-toolchain@stable
148c152
<           args: --release --out dist --find-interpreter -m crates/eko/Cargo.toml
---
>           args: --release --out dist --find-interpreter -m crates/ekore_py/Cargo.toml
177a182,183
>       - name: Install Rust
>         uses: dtolnay/rust-toolchain@stable
182c188
<           args: --release --out dist --find-interpreter -m crates/eko/Cargo.toml
---
>           args: --release --out dist --find-interpreter -m crates/ekore_py/Cargo.toml
206c212
<           args: --out dist -m crates/eko/Cargo.toml
---
>           args: --out dist -m crates/ekore_py/Cargo.toml

First, this is not good per se; second the "Install Rust" part in only one of the scripts appearing is even weird; third, mid- and/or long-term I can see more Rust packages being published to PyPI - see #383 . Thus can we avoid the repetition? from #568 we know we can not use simple reusable workflows, but I can still see two possible ways out:

  1. use some workflow matrix instructions, which to me are just some sort of loop. So can we just use some sort of matrix: [ "eko-rs|eko", "ekore_py|ekore-rs" ] ? we'll need the two names
  2. while we can not use reusable workflows directly, I very much suspect that this only applies to the pypa/gh-action-pypi-publish@release/v1 part - so can we split every else (which PyPI never sees) into a reusable workflow?

Opinions are welcome! e.g. by @AkshatRai07 or @scarlehoff

Activity

  1. added
    benchmarksBenchmark (or infrastructure) related
    rustRust extension related
    on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmarksBenchmark (or infrastructure) relatedrustRust extension related

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions