- update workflows
This commit is contained in:
1 parent
02cfa39677
commit
5f70c4152b
3 files changed
+52
-37
No files matched your search
@@ -1,6 +1,6 @@
|
||||
name: Publish
|
||||
name: Publish_rs
|
||||
|
||||
on: [workflow_dispatch]
|
||||
on: [ workflow_dispatch ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -10,23 +10,25 @@ jobs:
|
||||
name: Publish (crates.io)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
env:
|
||||
CARGO_HOME: ${{ github.workspace }}/.cargo
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Restore cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
path: ${{ env.CARGO_HOME }}
|
||||
key: cache-ubuntu-cargo-publish
|
||||
|
||||
- name: Install Rust
|
||||
run: |-
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
if ! command -v rustc >/dev/null 2>&1; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
else
|
||||
rustup update
|
||||
fi
|
||||
echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
|
||||
cargo install cargo-release
|
||||
shell: bash
|
||||
|
||||
@@ -46,9 +48,9 @@ jobs:
|
||||
# which is reasonable, since this job only runs after the Linux, Windows, and WASM builds
|
||||
# have passed.
|
||||
- name: "cargo release publish"
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}
|
||||
run: |-
|
||||
export PATH="$HOME/.osxcross/bin:$PATH"
|
||||
cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
|
||||
cargo release \
|
||||
publish \
|
||||
--workspace \
|
||||
@@ -61,6 +63,5 @@ jobs:
|
||||
- name: Store cache
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
path: ${{ env.CARGO_HOME }}
|
||||
key: cache-ubuntu-cargo-publish
|
||||
@@ -1,6 +1,6 @@
|
||||
name: CI
|
||||
name: Publish_py
|
||||
|
||||
on: [workflow_dispatch]
|
||||
on: [ workflow_dispatch ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -9,6 +9,10 @@ jobs:
|
||||
pypi_publish:
|
||||
name: Publish (pypi.org)
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CARGO_HOME: ${{ github.workspace }}/.cargo
|
||||
RUSTUP_HOME: ${{ github.workspace }}/.rustup
|
||||
RUSTUP_TOOLCHAIN: stable
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-python@v5
|
||||
@@ -23,7 +27,7 @@ jobs:
|
||||
~/.cache/pip-wheel
|
||||
~/.cache/sccache
|
||||
~/.cache/cargo-xwin
|
||||
~/.cargo
|
||||
${{ env.CARGO_HOME }}
|
||||
~/.osxcross
|
||||
key: cache-ubuntu-maturin-cross-compile
|
||||
|
||||
@@ -37,19 +41,20 @@ jobs:
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
if ! command -v rustc >/dev/null 2>&1; then
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
if ! command -v rustup >/dev/null 2>&1; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
else
|
||||
rustup update
|
||||
fi
|
||||
rustup toolchain install stable --profile minimal
|
||||
rustup default stable
|
||||
echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
|
||||
cargo --version
|
||||
shell: bash
|
||||
|
||||
- name: Install sccache and maturin
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
python -m pip install --upgrade pip
|
||||
pip install maturin ziglang
|
||||
python -m pip install --upgrade maturin ziglang
|
||||
if ! command -v sccache >/dev/null 2>&1; then
|
||||
cargo install sccache || pip install sccache
|
||||
fi
|
||||
@@ -57,7 +62,6 @@ jobs:
|
||||
|
||||
- name: Install xwin
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
if ! command -v cargo-xwin >/dev/null 2>&1; then
|
||||
cargo install cargo-xwin || pip install cargo-xwin
|
||||
cargo xwin cache xwin
|
||||
@@ -67,32 +71,42 @@ jobs:
|
||||
- name: Install osxcross
|
||||
run: |
|
||||
export PATH="$HOME/.osxcross/bin:$PATH"
|
||||
if ! command -v osxcross >/dev/null 2>&1; then
|
||||
if [ ! -d "$HOME/.osxcross/bin" ]; then
|
||||
wget ${{ secrets.OSXCROSS_LINK }} -O osxcross.tar.gz
|
||||
tar -xzf osxcross.tar.gz -C ~/
|
||||
mv ~/osxcross ~/.osxcross
|
||||
fi
|
||||
|
||||
- name: Build wheels
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$HOME/.osxcross/bin:$PATH"
|
||||
maturin sdist --out dist
|
||||
rustup default nightly
|
||||
export PATH="$HOME/.osxcross/bin:$PATH"
|
||||
echo "HOME=$HOME CARGO_HOME=$CARGO_HOME RUSTUP_HOME=$RUSTUP_HOME"
|
||||
command -v rustup
|
||||
command -v cargo
|
||||
rustup show
|
||||
cargo --version
|
||||
rm -rf dist
|
||||
maturin sdist --out dist -m ndbioimage/Cargo.toml
|
||||
|
||||
rustup target add x86_64-unknown-linux-gnu --toolchain nightly
|
||||
maturin build --release --out dist --target x86_64-unknown-linux-gnu
|
||||
rustup target add aarch64-unknown-linux-gnu --toolchain nightly
|
||||
maturin build --release --out dist --target aarch64-unknown-linux-gnu --zig
|
||||
rustup target add x86_64-apple-darwin
|
||||
maturin build --release --out dist --target x86_64-apple-darwin --zig --auditwheel repair -m ndbioimage/Cargo.toml
|
||||
rustup target add aarch64-apple-darwin
|
||||
maturin build --release --out dist --target aarch64-apple-darwin --zig --auditwheel repair -m ndbioimage/Cargo.toml
|
||||
|
||||
rustup target add x86_64-pc-windows-msvc --toolchain nightly
|
||||
maturin build --release --out dist --target x86_64-pc-windows-msvc
|
||||
rustup target add aarch64-pc-windows-msvc --toolchain nightly
|
||||
maturin build --release --out dist --target aarch64-pc-windows-msvc
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
maturin build --release --out dist --target x86_64-unknown-linux-gnu --zig --auditwheel repair -m ndbioimage/Cargo.toml
|
||||
rustup target add aarch64-unknown-linux-gnu
|
||||
maturin build --release --out dist --target aarch64-unknown-linux-gnu --zig --auditwheel repair -m ndbioimage/Cargo.toml
|
||||
rustup target add x86_64-unknown-linux-musl
|
||||
maturin build --release --out dist --target x86_64-unknown-linux-musl --zig --auditwheel repair -m ndbioimage/Cargo.toml
|
||||
rustup target add aarch64-unknown-linux-musl
|
||||
maturin build --release --out dist --target aarch64-unknown-linux-musl --zig --auditwheel repair -m ndbioimage/Cargo.toml
|
||||
|
||||
rustup target add x86_64-apple-darwin --toolchain nightly
|
||||
maturin build --release --out dist --target x86_64-apple-darwin --zig
|
||||
rustup target add aarch64-apple-darwin --toolchain nightly
|
||||
maturin build --release --out dist --target aarch64-apple-darwin --zig
|
||||
rustup target add x86_64-pc-windows-msvc
|
||||
maturin build --release --out dist --target x86_64-pc-windows-msvc --auditwheel repair -m ndbioimage/Cargo.toml
|
||||
rustup target add aarch64-pc-windows-msvc
|
||||
maturin build --release --out dist --target aarch64-pc-windows-msvc --auditwheel repair -m ndbioimage/Cargo.toml
|
||||
|
||||
- name: Store cache
|
||||
uses: actions/cache/save@v4
|
||||
@@ -102,7 +116,7 @@ jobs:
|
||||
~/.cache/pip-wheel
|
||||
~/.cache/sccache
|
||||
~/.cache/cargo-xwin
|
||||
~/.cargo
|
||||
${{ env.CARGO_HOME }}
|
||||
~/.osxcross
|
||||
key: cache-ubuntu-maturin-cross-compile
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
||||
|
||||
[project]
|
||||
name = "ndbioimage"
|
||||
version = "2027.0.6"
|
||||
version = "2027.0.7"
|
||||
requires-python = ">=3.10"
|
||||
classifiers = [
|
||||
"License :: OSI Approved :: MIT License",
|
||||
|
||||
Reference in new issue
Block a user