Repository navigation
Centralize Maturin workflows #575
Copy link
Copy link
Open
Labels
benchmarksBenchmark (or infrastructure) relatedBenchmark (or infrastructure) relatedrustRust extension relatedRust extension related
Description
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:
- use some workflow
matrixinstructions, which to me are just some sort of loop. So can we just use some sort ofmatrix: [ "eko-rs|eko", "ekore_py|ekore-rs" ]? we'll need the two names - while we can not use reusable workflows directly, I very much suspect that this only applies to the
pypa/gh-action-pypi-publish@release/v1part - so can we split every else (which PyPI never sees) into a reusable workflow?
Opinions are welcome! e.g. by @AkshatRai07 or @scarlehoff
Metadata
Metadata
Assignees
Labels
benchmarksBenchmark (or infrastructure) relatedBenchmark (or infrastructure) relatedrustRust extension relatedRust extension related
Activity