Centralize Maturin workflows

Aperta
#575 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, python, rust

Direzione di ricerca

Start by comparing .github/workflows/release-pyapi.yml and .github/workflows/release-ekors.yml, especially their Rust installation and Maturin build steps. Then review #568 for the reusable workflow constraint and #383 for the expected growth in Rust packages. Done means reducing duplicated workflow logic while preserving each package's names, Cargo manifest paths, and PyPI publishing behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

benchmarks rust

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

Lingua principale
Python
Stelle
13
Fork
9
Merge medio
6g 16h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NNPDF/eko

Tutte le issue di NNPDF/eko

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.