|
|
|
@@ -81,10 +81,9 @@ jobs: |
|
|
|
with: |
|
|
|
python-version: "3.10" |
|
|
|
|
|
|
|
- name: Set up UV and poetry |
|
|
|
- name: Set up UV |
|
|
|
if: runner.os == 'Linux' || github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) |
|
|
|
run: | |
|
|
|
curl -sSL https://install.python-poetry.org | python3 - |
|
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh |
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH |
|
|
|
uv pip install ruff pytest |
|
|
|
@@ -100,7 +99,6 @@ jobs: |
|
|
|
## Run Linting and testing only on Mac for release workflows. |
|
|
|
if: runner.os == 'Linux' || github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) |
|
|
|
run: | |
|
|
|
alias pip="uv pip" |
|
|
|
chmod +x ../../.github/workflows/node_hub_test.sh |
|
|
|
../../.github/workflows/node_hub_test.sh |
|
|
|
|
|
|
|
@@ -141,9 +139,9 @@ jobs: |
|
|
|
with: |
|
|
|
python-version: "3.10" |
|
|
|
|
|
|
|
- name: Set up Poetry |
|
|
|
- name: Set up UV |
|
|
|
run: | |
|
|
|
curl -sSL https://install.python-poetry.org | python3 - |
|
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh |
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH |
|
|
|
|
|
|
|
- name: Set up Rust |
|
|
|
@@ -154,7 +152,7 @@ jobs: |
|
|
|
- name: Publish Projects |
|
|
|
env: |
|
|
|
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_PASS }} |
|
|
|
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PASS }} |
|
|
|
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASS }} |
|
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
|
|
|
run: | |
|
|
|
dir=$(pwd) |
|
|
|
@@ -167,7 +165,7 @@ jobs: |
|
|
|
if [[ -f "Cargo.toml" && -f "pyproject.toml" ]]; then |
|
|
|
echo "Publishing $dir using maturin..." |
|
|
|
if [[ "${{ runner.os }}" == "Linux" ]]; then |
|
|
|
pip3 install "maturin[zig]" |
|
|
|
uv pip install "maturin[zig]" |
|
|
|
|
|
|
|
## The CI/CD is sequential to limit the number of workers used. |
|
|
|
|
|
|
|
@@ -183,13 +181,14 @@ jobs: |
|
|
|
maturin publish --target armv7-unknown-linux-musleabihf --zig --skip-existing |
|
|
|
|
|
|
|
else |
|
|
|
pip3 install maturin |
|
|
|
uv pip install maturin |
|
|
|
maturin publish --skip-existing |
|
|
|
fi |
|
|
|
else |
|
|
|
if [ -f "pyproject.toml" ]; then |
|
|
|
echo "Publishing $dir using Poetry..." |
|
|
|
poetry publish --build --skip-existing |
|
|
|
echo "Publishing $dir using UV..." |
|
|
|
uv build |
|
|
|
uv publish |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -f "Cargo.toml" ]; then |
|
|
|
|