- fix workflow
This commit is contained in:
1 parent
6180cc082c
commit
4da6d133b3
2 files changed
+14
-9
No files matched your search
@@ -9,6 +9,10 @@ jobs:
|
|||||||
pypi_publish:
|
pypi_publish:
|
||||||
name: Publish (pypi.org)
|
name: Publish (pypi.org)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CARGO_HOME: ${{ github.workspace }}/.cargo
|
||||||
|
RUSTUP_HOME: ${{ github.workspace }}/.rustup
|
||||||
|
RUSTUP_TOOLCHAIN: stable
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
@@ -23,7 +27,7 @@ jobs:
|
|||||||
~/.cache/pip-wheel
|
~/.cache/pip-wheel
|
||||||
~/.cache/sccache
|
~/.cache/sccache
|
||||||
~/.cache/cargo-xwin
|
~/.cache/cargo-xwin
|
||||||
~/.cargo
|
${{ env.CARGO_HOME }}
|
||||||
~/.osxcross
|
~/.osxcross
|
||||||
key: cache-ubuntu-maturin-cross-compile
|
key: cache-ubuntu-maturin-cross-compile
|
||||||
|
|
||||||
@@ -45,20 +49,21 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
export PATH="$CARGO_HOME/bin:$PATH"
|
||||||
if ! command -v rustc >/dev/null 2>&1; then
|
if ! command -v rustc >/dev/null 2>&1; then
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
else
|
else
|
||||||
rustup update
|
rustup update
|
||||||
fi
|
fi
|
||||||
rustup default stable
|
rustup default stable
|
||||||
|
echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Install sccache and maturin
|
- name: Install sccache and maturin
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
export PATH="$CARGO_HOME/bin:$PATH"
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip maturin ziglang cargo-zigbuild
|
||||||
pip install maturin ziglang
|
rm -f "${CARGO_HOME:?}/bin/cargo-zigbuild" || true
|
||||||
if ! command -v sccache >/dev/null 2>&1; then
|
if ! command -v sccache >/dev/null 2>&1; then
|
||||||
cargo install sccache || pip install sccache
|
cargo install sccache || pip install sccache
|
||||||
fi
|
fi
|
||||||
@@ -66,7 +71,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install xwin
|
- name: Install xwin
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
export PATH="$CARGO_HOME/bin:$PATH"
|
||||||
if ! command -v cargo-xwin >/dev/null 2>&1; then
|
if ! command -v cargo-xwin >/dev/null 2>&1; then
|
||||||
cargo install cargo-xwin || pip install cargo-xwin
|
cargo install cargo-xwin || pip install cargo-xwin
|
||||||
cargo xwin cache xwin
|
cargo xwin cache xwin
|
||||||
@@ -84,7 +89,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOME/.cargo/bin:$HOME/.osxcross/bin:$PATH"
|
export PATH="$CARGO_HOME/bin:$HOME/.osxcross/bin:$PATH"
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
maturin sdist --out dist
|
maturin sdist --out dist
|
||||||
|
|
||||||
@@ -115,7 +120,7 @@ jobs:
|
|||||||
~/.cache/pip-wheel
|
~/.cache/pip-wheel
|
||||||
~/.cache/sccache
|
~/.cache/sccache
|
||||||
~/.cache/cargo-xwin
|
~/.cache/cargo-xwin
|
||||||
~/.cargo
|
${{ env.CARGO_HOME }}
|
||||||
~/.osxcross
|
~/.osxcross
|
||||||
key: cache-ubuntu-maturin-cross-compile
|
key: cache-ubuntu-maturin-cross-compile
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
test = ["pytest", "tifffile", "imagecodecs"]
|
test = ["pytest"]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
smoll_generate_stub = "smoll:smoll_generate_stub"
|
smoll_generate_stub = "smoll:smoll_generate_stub"
|
||||||
|
|||||||
Reference in new issue
Block a user