From 5f0c836a66f403ae5a0a26f1bc8a572a284a6c4d Mon Sep 17 00:00:00 2001 From: googlefan256 Date: Sun, 23 Feb 2025 11:55:59 +0900 Subject: [PATCH 01/35] Update CI.yml --- .github/workflows/CI.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f64f42d..88b236f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,27 +1,21 @@ -# This file is autogenerated by maturin v1.7.1 -# To update, run -# -# maturin generate-ci github -# name: CI on: push: branches: - main - - master tags: - '*' pull_request: workflow_dispatch: permissions: - contents: read + contents: write id-token: write packages: write jobs: - linux: + python-linux: runs-on: ${{ matrix.platform.runner }} strategy: matrix: @@ -40,6 +34,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter + before-script-linux: apt-get update && apt-get install -y libssl-dev openssl sccache: 'true' manylinux: auto working-directory: ./crates/sbv2_bindings @@ -49,7 +44,7 @@ jobs: name: wheels-linux-${{ matrix.platform.target }} path: ./crates/sbv2_bindings/dist - windows: + python-windows: runs-on: ${{ matrix.platform.runner }} strategy: matrix: @@ -75,7 +70,7 @@ jobs: name: wheels-windows-${{ matrix.platform.target }} path: ./crates/sbv2_bindings/dist - macos: + python-macos: runs-on: ${{ matrix.platform.runner }} strategy: matrix: @@ -100,7 +95,7 @@ jobs: name: wheels-macos-${{ matrix.platform.target }} path: ./crates/sbv2_bindings/dist - sdist: + python-sdist: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -115,12 +110,20 @@ jobs: with: name: wheels-sdist path: ./crates/sbv2_bindings/dist - - release: + python-wheel: + name: Wheel Upload + runs-on: ubuntu-latest + needs: [python-linux, python-windows, python-macos, python-sdist] + steps: + - uses: actions/download-artifact@v4 + - name: release + run: | + gh release create commit-${GITHUB_SHA:0:8} --prerelease wheels-*/* + python-release: name: Release runs-on: ubuntu-latest if: "startsWith(github.ref, 'refs/tags/')" - needs: [linux, windows, macos, sdist] + needs: [python-linux, python-windows, python-macos, python-sdist] environment: release steps: - uses: actions/download-artifact@v4 @@ -130,7 +133,7 @@ jobs: command: upload args: --non-interactive --skip-existing wheels-*/* - build: + docker: runs-on: ${{ matrix.machine.runner }} strategy: fail-fast: false @@ -177,10 +180,10 @@ jobs: tags: | ghcr.io/${{ github.repository }}:latest-${{ matrix.tag }}-${{ matrix.machine.platform }} - merge: + docker-merge: runs-on: ubuntu-latest needs: - - build + - docker steps: - name: Download digests uses: actions/download-artifact@v4 From 208ac216b5560c106beb2123e5c4d6d545b6e2f0 Mon Sep 17 00:00:00 2001 From: googlefan256 Date: Sun, 23 Feb 2025 12:10:06 +0900 Subject: [PATCH 02/35] Update and rename CI.yml to build.yml --- .github/workflows/{CI.yml => build.yml} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename .github/workflows/{CI.yml => build.yml} (97%) diff --git a/.github/workflows/CI.yml b/.github/workflows/build.yml similarity index 97% rename from .github/workflows/CI.yml rename to .github/workflows/build.yml index 88b236f..9a078a2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/build.yml @@ -34,10 +34,11 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - before-script-linux: apt-get update && apt-get install -y libssl-dev openssl + before-script-linux: yum -y install openssl openssl-devel sccache: 'true' manylinux: auto working-directory: ./crates/sbv2_bindings + container: quay.io/pypa/manylinux2014_x86_64:latest - name: Upload wheels uses: actions/upload-artifact@v4 with: From 70b5852d1bd3ab5497e1c05d8ee0f989a47a3bc0 Mon Sep 17 00:00:00 2001 From: googlefan256 Date: Sun, 23 Feb 2025 12:12:48 +0900 Subject: [PATCH 03/35] Update build.yml --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a078a2..b295451 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,6 @@ jobs: sccache: 'true' manylinux: auto working-directory: ./crates/sbv2_bindings - container: quay.io/pypa/manylinux2014_x86_64:latest - name: Upload wheels uses: actions/upload-artifact@v4 with: From 6afa667f2e11d79bdf2780129bd99a0131bc80fc Mon Sep 17 00:00:00 2001 From: googlefan256 Date: Sun, 23 Feb 2025 12:17:53 +0900 Subject: [PATCH 04/35] Update and rename build.yml to CI.yml --- .github/workflows/{build.yml => CI.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{build.yml => CI.yml} (91%) diff --git a/.github/workflows/build.yml b/.github/workflows/CI.yml similarity index 91% rename from .github/workflows/build.yml rename to .github/workflows/CI.yml index b295451..c6e2ae0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/CI.yml @@ -34,7 +34,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - before-script-linux: yum -y install openssl openssl-devel + before-script-linux: command -v yum >/dev/null 2>&1 && { sudo yum -y install openssl openssl-devel; } || { command -v apt-get >/dev/null 2>&1 && { sudo apt-get update && sudo apt-get install -y openssl libssl-dev; } || { command -v apk >/dev/null 2>&1 && { sudo apk add --no-cache openssl openssl-dev; } || { command -v pacman >/dev/null 2>&1 && { sudo pacman -Sy --noconfirm openssl; } || { command -v zypper >/dev/null 2>&1 && { sudo zypper --non-interactive install openssl openssl-devel; } || { echo "No supported package manager found"; exit 1; } } } } } sccache: 'true' manylinux: auto working-directory: ./crates/sbv2_bindings From fd7ba84eefa42298e9315c9aa6542a9f5c7900d4 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 03:19:36 +0000 Subject: [PATCH 05/35] fix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c6e2ae0..545603c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,7 +34,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - before-script-linux: command -v yum >/dev/null 2>&1 && { sudo yum -y install openssl openssl-devel; } || { command -v apt-get >/dev/null 2>&1 && { sudo apt-get update && sudo apt-get install -y openssl libssl-dev; } || { command -v apk >/dev/null 2>&1 && { sudo apk add --no-cache openssl openssl-dev; } || { command -v pacman >/dev/null 2>&1 && { sudo pacman -Sy --noconfirm openssl; } || { command -v zypper >/dev/null 2>&1 && { sudo zypper --non-interactive install openssl openssl-devel; } || { echo "No supported package manager found"; exit 1; } } } } } + before-script-linux: command -v yum >/dev/null 2>&1 && { yum -y install openssl openssl-devel; } || { command -v apt-get >/dev/null 2>&1 && { apt-get update && apt-get install -y openssl libssl-dev; } || { command -v apk >/dev/null 2>&1 && { apk add --no-cache openssl openssl-dev; } || { command -v pacman >/dev/null 2>&1 && { pacman -Sy --noconfirm openssl; } || { command -v zypper >/dev/null 2>&1 && { zypper --non-interactive install openssl openssl-devel; } || { echo "No supported package manager found"; exit 1; } } } } } sccache: 'true' manylinux: auto working-directory: ./crates/sbv2_bindings From c86a79cce5d68be80542aca6d3e2727075030764 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 03:22:13 +0000 Subject: [PATCH 06/35] fix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 545603c..ef1cf31 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,7 +34,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - before-script-linux: command -v yum >/dev/null 2>&1 && { yum -y install openssl openssl-devel; } || { command -v apt-get >/dev/null 2>&1 && { apt-get update && apt-get install -y openssl libssl-dev; } || { command -v apk >/dev/null 2>&1 && { apk add --no-cache openssl openssl-dev; } || { command -v pacman >/dev/null 2>&1 && { pacman -Sy --noconfirm openssl; } || { command -v zypper >/dev/null 2>&1 && { zypper --non-interactive install openssl openssl-devel; } || { echo "No supported package manager found"; exit 1; } } } } } + before-script-linux: command -v yum >/dev/null 2>&1 && { yum -y install openssl openssl-devel pkgconfig; } || { command -v apt-get >/dev/null 2>&1 && { apt-get update && apt-get install -y openssl libssl-dev pkg-config; } || { command -v apk >/dev/null 2>&1 && { apk add --no-cache openssl openssl-dev pkgconfig; } || { command -v pacman >/dev/null 2>&1 && { pacman -Sy --noconfirm openssl pkg-config; } || { command -v zypper >/dev/null 2>&1 && { zypper --non-interactive install openssl openssl-devel pkg-config; } || { echo "No supported package manager found"; exit 1; } } } } } sccache: 'true' manylinux: auto working-directory: ./crates/sbv2_bindings From eefd5b723cb3b1971ae7cb669eab9bbbe2c9381e Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 03:46:48 +0000 Subject: [PATCH 07/35] fix --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ef1cf31..bee73a6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,9 +34,9 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - before-script-linux: command -v yum >/dev/null 2>&1 && { yum -y install openssl openssl-devel pkgconfig; } || { command -v apt-get >/dev/null 2>&1 && { apt-get update && apt-get install -y openssl libssl-dev pkg-config; } || { command -v apk >/dev/null 2>&1 && { apk add --no-cache openssl openssl-dev pkgconfig; } || { command -v pacman >/dev/null 2>&1 && { pacman -Sy --noconfirm openssl pkg-config; } || { command -v zypper >/dev/null 2>&1 && { zypper --non-interactive install openssl openssl-devel pkg-config; } || { echo "No supported package manager found"; exit 1; } } } } } sccache: 'true' manylinux: auto + container: ghcr.io/pyo3/maturin working-directory: ./crates/sbv2_bindings - name: Upload wheels uses: actions/upload-artifact@v4 @@ -119,6 +119,7 @@ jobs: - name: release run: | gh release create commit-${GITHUB_SHA:0:8} --prerelease wheels-*/* + python-release: name: Release runs-on: ubuntu-latest From 0f11b9a192b27071d48dfe47b848674384fc22ac Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 03:49:53 +0000 Subject: [PATCH 08/35] fix --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bee73a6..a8b8fea 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,6 +38,7 @@ jobs: manylinux: auto container: ghcr.io/pyo3/maturin working-directory: ./crates/sbv2_bindings + before-script-linux: command -v yum >/dev/null 2>&1 && { yum -y install openssl openssl-devel pkgconfig; } || { command -v apt-get >/dev/null 2>&1 && { apt-get update && apt-get install -y openssl libssl-dev pkg-config; } || { command -v apk >/dev/null 2>&1 && { apk add --no-cache openssl openssl-dev pkgconfig; } || { command -v pacman >/dev/null 2>&1 && { pacman -Sy --noconfirm openssl pkg-config; } || { command -v zypper >/dev/null 2>&1 && { zypper --non-interactive install openssl openssl-devel pkg-config; } || { echo "No supported package manager found"; exit 1; } } } } } - name: Upload wheels uses: actions/upload-artifact@v4 with: From 96eb51cf04127900ef19aa79bcbcac473a34ef16 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 03:53:46 +0000 Subject: [PATCH 09/35] fix --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a8b8fea..a071c0f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -36,9 +36,9 @@ jobs: args: --release --out dist --find-interpreter sccache: 'true' manylinux: auto - container: ghcr.io/pyo3/maturin + container: ubuntu working-directory: ./crates/sbv2_bindings - before-script-linux: command -v yum >/dev/null 2>&1 && { yum -y install openssl openssl-devel pkgconfig; } || { command -v apt-get >/dev/null 2>&1 && { apt-get update && apt-get install -y openssl libssl-dev pkg-config; } || { command -v apk >/dev/null 2>&1 && { apk add --no-cache openssl openssl-dev pkgconfig; } || { command -v pacman >/dev/null 2>&1 && { pacman -Sy --noconfirm openssl pkg-config; } || { command -v zypper >/dev/null 2>&1 && { zypper --non-interactive install openssl openssl-devel pkg-config; } || { echo "No supported package manager found"; exit 1; } } } } } + before-script-linux: apt-get update && apt-get install -y openssl libssl-dev pkg-config - name: Upload wheels uses: actions/upload-artifact@v4 with: From f33791cf679b5c14a514969e3acbd1e7d0b646e1 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 03:56:22 +0000 Subject: [PATCH 10/35] fix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a071c0f..ec43779 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,7 +38,7 @@ jobs: manylinux: auto container: ubuntu working-directory: ./crates/sbv2_bindings - before-script-linux: apt-get update && apt-get install -y openssl libssl-dev pkg-config + before-script-linux: apt-get update && apt-get install -y openssl libssl-dev pkg-config curl - name: Upload wheels uses: actions/upload-artifact@v4 with: From 6a8b64208c2ad9133630072595d2d1b54a9f41e9 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:00:08 +0000 Subject: [PATCH 11/35] fix --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ec43779..35d89bf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,6 +29,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x + - run: apt-get update && apt-get install -y openssl libssl-dev pkg-config curl - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -36,9 +37,8 @@ jobs: args: --release --out dist --find-interpreter sccache: 'true' manylinux: auto - container: ubuntu + container: off working-directory: ./crates/sbv2_bindings - before-script-linux: apt-get update && apt-get install -y openssl libssl-dev pkg-config curl - name: Upload wheels uses: actions/upload-artifact@v4 with: From 3d2f36a0bfd0140df72966936cdb4aa9731885ea Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:01:47 +0000 Subject: [PATCH 12/35] fix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 35d89bf..4266488 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x - - run: apt-get update && apt-get install -y openssl libssl-dev pkg-config curl + - run: sudo apt-get update && sudo apt-get install -y openssl libssl-dev pkg-config curl - name: Build wheels uses: PyO3/maturin-action@v1 with: From db954ff710ae24dd30eb46b870b2aa3cfc1aebc9 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:13:51 +0000 Subject: [PATCH 13/35] fix --- .github/workflows/CI.Dockerfile | 2 ++ .github/workflows/CI.yml | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/CI.Dockerfile diff --git a/.github/workflows/CI.Dockerfile b/.github/workflows/CI.Dockerfile new file mode 100644 index 0000000..e5a4381 --- /dev/null +++ b/.github/workflows/CI.Dockerfile @@ -0,0 +1,2 @@ +FROM ubuntu:latest +RUN apt update && apt install openssl libssl-dev curl pkg-config -y \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4266488..0d21375 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,7 +29,8 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x - - run: sudo apt-get update && sudo apt-get install -y openssl libssl-dev pkg-config curl + - uses: docker/setup-qemu-action@v3 + - run: docker build -f .github/workflows/CI.Dockerfile --tag ci - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -37,7 +38,7 @@ jobs: args: --release --out dist --find-interpreter sccache: 'true' manylinux: auto - container: off + container: ci working-directory: ./crates/sbv2_bindings - name: Upload wheels uses: actions/upload-artifact@v4 From 17c1a3467ab92109ec083b2c76f9d202259f334c Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:14:49 +0000 Subject: [PATCH 14/35] fix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0d21375..106cd7c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,7 +30,7 @@ jobs: with: python-version: 3.x - uses: docker/setup-qemu-action@v3 - - run: docker build -f .github/workflows/CI.Dockerfile --tag ci + - run: docker build . -f .github/workflows/CI.Dockerfile --tag ci - name: Build wheels uses: PyO3/maturin-action@v1 with: From 3e0c24e0eccfef67e500201dabe701a9eda5d2c7 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:16:23 +0000 Subject: [PATCH 15/35] fix --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 106cd7c..27f953e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,6 +30,8 @@ jobs: with: python-version: 3.x - uses: docker/setup-qemu-action@v3 + with: + platforms: linux/arm64,linux/amd64 - run: docker build . -f .github/workflows/CI.Dockerfile --tag ci - name: Build wheels uses: PyO3/maturin-action@v1 From f036417046b2952b4e67c594c33459d3e94e87bf Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:27:14 +0000 Subject: [PATCH 16/35] fix --- .github/workflows/CI.Dockerfile | 2 +- .github/workflows/CI.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.Dockerfile b/.github/workflows/CI.Dockerfile index e5a4381..0362e35 100644 --- a/.github/workflows/CI.Dockerfile +++ b/.github/workflows/CI.Dockerfile @@ -1,2 +1,2 @@ FROM ubuntu:latest -RUN apt update && apt install openssl libssl-dev curl pkg-config -y \ No newline at end of file +RUN apt update && apt install openssl libssl-dev curl pkg-config software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 -y \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 27f953e..7f32a3e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,13 +31,14 @@ jobs: python-version: 3.x - uses: docker/setup-qemu-action@v3 with: - platforms: linux/arm64,linux/amd64 - - run: docker build . -f .github/workflows/CI.Dockerfile --tag ci + platforms: linux/${{ matrix.platform.target }} + - run: docker build . -f .github/workflows/CI.Dockerfile --tag ci --platform linux/${{ matrix.platform.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter + docker-options: --platform linux/${{ matrix.platform.target }} sccache: 'true' manylinux: auto container: ci From e5a4774e1aa2ac06b2f799369000a1e6e19105c3 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:29:15 +0000 Subject: [PATCH 17/35] fix --- .github/workflows/CI.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.Dockerfile b/.github/workflows/CI.Dockerfile index 0362e35..87555bb 100644 --- a/.github/workflows/CI.Dockerfile +++ b/.github/workflows/CI.Dockerfile @@ -1,2 +1,2 @@ FROM ubuntu:latest -RUN apt update && apt install openssl libssl-dev curl pkg-config software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 -y \ No newline at end of file +RUN apt update && apt install openssl libssl-dev curl pkg-config software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3-pip python3 -y \ No newline at end of file From 0a911105a3a65c6e5c8c951e9d5835deaadffb02 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:32:22 +0000 Subject: [PATCH 18/35] fix --- .github/workflows/CI.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.Dockerfile b/.github/workflows/CI.Dockerfile index 87555bb..b5058b5 100644 --- a/.github/workflows/CI.Dockerfile +++ b/.github/workflows/CI.Dockerfile @@ -1,2 +1,2 @@ FROM ubuntu:latest -RUN apt update && apt install openssl libssl-dev curl pkg-config software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3-pip python3 -y \ No newline at end of file +RUN apt update && apt install openssl libssl-dev curl pkg-config software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3-pip python3 pipx -y \ No newline at end of file From 554b82a5045c955268f7ac84887b2bdffde04bbc Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:34:48 +0000 Subject: [PATCH 19/35] fix --- .github/workflows/CI.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.Dockerfile b/.github/workflows/CI.Dockerfile index b5058b5..2acbac3 100644 --- a/.github/workflows/CI.Dockerfile +++ b/.github/workflows/CI.Dockerfile @@ -1,2 +1,3 @@ FROM ubuntu:latest -RUN apt update && apt install openssl libssl-dev curl pkg-config software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3-pip python3 pipx -y \ No newline at end of file +RUN apt update && apt install openssl libssl-dev curl pkg-config software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3-pip python3 -y +ENV PIP_BREAK_SYSTEM_PACKAGES=1 \ No newline at end of file From e262694702bca9dac51b6a66b66e574f7a13f789 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:45:58 +0000 Subject: [PATCH 20/35] fix --- Cargo.lock | 61 +++++++++++++++++++++++++++---------- crates/sbv2_core/Cargo.toml | 1 + crates/sbv2_core/build.rs | 11 ++++--- 3 files changed, 53 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6135203..1d01897 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,7 +155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", @@ -255,6 +255,12 @@ dependencies = [ "shlex", ] +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -311,7 +317,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -561,7 +567,7 @@ version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -644,7 +650,7 @@ version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "libredox", "windows-sys 0.59.0", @@ -745,7 +751,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -758,7 +764,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.13.3+wasi-0.2.2", "windows-targets", @@ -801,7 +807,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crunchy", ] @@ -823,6 +829,16 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "home-dir" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "572c4f9690c3ac7058775be826d1b508ca20fd6633261435c27ac30ad0598212" +dependencies = [ + "nix", + "thiserror 1.0.69", +] + [[package]] name = "hound" version = "3.5.1" @@ -1315,7 +1331,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-targets", ] @@ -1540,6 +1556,18 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "nix" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +dependencies = [ + "bitflags 1.3.2", + "cc", + "cfg-if 0.1.10", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -1658,7 +1686,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags 2.8.0", - "cfg-if", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -1735,7 +1763,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", @@ -1921,7 +1949,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" dependencies = [ "anyhow", - "cfg-if", + "cfg-if 1.0.0", "indoc", "libc", "memoffset", @@ -2143,7 +2171,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34b5020fcdea098ef7d95e9f89ec15952123a4a039badd09fabebe9e963e839" dependencies = [ "cc", - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.15", "libc", "untrusted", @@ -2256,6 +2284,7 @@ dependencies = [ "base64 0.22.1", "dotenvy", "env_logger", + "home-dir", "hound", "jpreprocess", "ndarray", @@ -2396,7 +2425,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest", ] @@ -2585,7 +2614,7 @@ version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand", "getrandom 0.3.1", "once_cell", @@ -3032,7 +3061,7 @@ version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", "rustversion", "wasm-bindgen-macro", @@ -3058,7 +3087,7 @@ version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "once_cell", "wasm-bindgen", diff --git a/crates/sbv2_core/Cargo.toml b/crates/sbv2_core/Cargo.toml index 791085b..c2dda4d 100644 --- a/crates/sbv2_core/Cargo.toml +++ b/crates/sbv2_core/Cargo.toml @@ -43,4 +43,5 @@ aivmx = ["npyz", "base64"] base64 = ["dep:base64"] [build-dependencies] +home-dir = "0.1.0" ureq = "3.0.6" diff --git a/crates/sbv2_core/build.rs b/crates/sbv2_core/build.rs index 22a387d..e6988be 100644 --- a/crates/sbv2_core/build.rs +++ b/crates/sbv2_core/build.rs @@ -1,12 +1,15 @@ -use std::env; use std::fs; use std::io::copy; -use std::path::Path; + +use home_dir::HomeDirExt; fn main() -> Result<(), Box> { - let out_dir = env::var("OUT_DIR")?; - let out_path = Path::new(&out_dir).join("all.bin"); + let out_dir = "~/.cache/sbv2-api-assets".expand_home().unwrap(); + let out_path = out_dir.join("all.bin"); if !out_path.exists() { + if !out_dir.exists() { + fs::create_dir_all(out_dir).unwrap(); + } println!("cargo:warning=Downloading dictionary file..."); let mut response = ureq::get("https://huggingface.co/neody/sbv2-api-assets/resolve/main/dic/all.bin") From 6c5ea9adce4f19b40cb51f2cacc4b916a59d3d33 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:48:52 +0000 Subject: [PATCH 21/35] fix: reduce download --- crates/sbv2_core/Cargo.toml | 2 +- crates/sbv2_core/build.rs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/sbv2_core/Cargo.toml b/crates/sbv2_core/Cargo.toml index c2dda4d..8f6c1d6 100644 --- a/crates/sbv2_core/Cargo.toml +++ b/crates/sbv2_core/Cargo.toml @@ -43,5 +43,5 @@ aivmx = ["npyz", "base64"] base64 = ["dep:base64"] [build-dependencies] -home-dir = "0.1.0" ureq = "3.0.6" +home-dir = "0.1.0" \ No newline at end of file diff --git a/crates/sbv2_core/build.rs b/crates/sbv2_core/build.rs index e6988be..baea560 100644 --- a/crates/sbv2_core/build.rs +++ b/crates/sbv2_core/build.rs @@ -1,5 +1,7 @@ -use std::fs; +use std::env; +use std::fs::{self, hard_link}; use std::io::copy; +use std::path::PathBuf; use home_dir::HomeDirExt; @@ -18,6 +20,11 @@ fn main() -> Result<(), Box> { let mut file = fs::File::create(&out_path)?; copy(&mut response, &mut file)?; } + hard_link( + out_path, + PathBuf::from(&env::var("OUT_DIR").unwrap()).join("out.bin"), + ) + .unwrap(); println!("cargo:rerun-if-changed=build.rs"); Ok(()) } From 6fc97b1f33620833cc422fdf420023b205628242 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:52:02 +0000 Subject: [PATCH 22/35] revert --- Cargo.lock | 61 ++++++++++--------------------------- crates/sbv2_core/Cargo.toml | 3 +- crates/sbv2_core/build.rs | 14 ++------- 3 files changed, 19 insertions(+), 59 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1d01897..6135203 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,7 +155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -255,12 +255,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -317,7 +311,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -567,7 +561,7 @@ version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -650,7 +644,7 @@ version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "libredox", "windows-sys 0.59.0", @@ -751,7 +745,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -764,7 +758,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.13.3+wasi-0.2.2", "windows-targets", @@ -807,7 +801,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crunchy", ] @@ -829,16 +823,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "home-dir" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572c4f9690c3ac7058775be826d1b508ca20fd6633261435c27ac30ad0598212" -dependencies = [ - "nix", - "thiserror 1.0.69", -] - [[package]] name = "hound" version = "3.5.1" @@ -1331,7 +1315,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-targets", ] @@ -1556,18 +1540,6 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "nix" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 0.1.10", - "libc", -] - [[package]] name = "nom" version = "7.1.3" @@ -1686,7 +1658,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags 2.8.0", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -1763,7 +1735,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "smallvec", @@ -1949,7 +1921,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" dependencies = [ "anyhow", - "cfg-if 1.0.0", + "cfg-if", "indoc", "libc", "memoffset", @@ -2171,7 +2143,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34b5020fcdea098ef7d95e9f89ec15952123a4a039badd09fabebe9e963e839" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", "getrandom 0.2.15", "libc", "untrusted", @@ -2284,7 +2256,6 @@ dependencies = [ "base64 0.22.1", "dotenvy", "env_logger", - "home-dir", "hound", "jpreprocess", "ndarray", @@ -2425,7 +2396,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -2614,7 +2585,7 @@ version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "getrandom 0.3.1", "once_cell", @@ -3061,7 +3032,7 @@ version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", @@ -3087,7 +3058,7 @@ version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "once_cell", "wasm-bindgen", diff --git a/crates/sbv2_core/Cargo.toml b/crates/sbv2_core/Cargo.toml index 8f6c1d6..852cf32 100644 --- a/crates/sbv2_core/Cargo.toml +++ b/crates/sbv2_core/Cargo.toml @@ -43,5 +43,4 @@ aivmx = ["npyz", "base64"] base64 = ["dep:base64"] [build-dependencies] -ureq = "3.0.6" -home-dir = "0.1.0" \ No newline at end of file +ureq = "3.0.6" \ No newline at end of file diff --git a/crates/sbv2_core/build.rs b/crates/sbv2_core/build.rs index baea560..62e0a65 100644 --- a/crates/sbv2_core/build.rs +++ b/crates/sbv2_core/build.rs @@ -1,17 +1,12 @@ use std::env; -use std::fs::{self, hard_link}; +use std::fs; use std::io::copy; use std::path::PathBuf; -use home_dir::HomeDirExt; - fn main() -> Result<(), Box> { - let out_dir = "~/.cache/sbv2-api-assets".expand_home().unwrap(); + let out_dir = PathBuf::from(&env::var("OUT_DIR").unwrap()); let out_path = out_dir.join("all.bin"); if !out_path.exists() { - if !out_dir.exists() { - fs::create_dir_all(out_dir).unwrap(); - } println!("cargo:warning=Downloading dictionary file..."); let mut response = ureq::get("https://huggingface.co/neody/sbv2-api-assets/resolve/main/dic/all.bin") @@ -20,11 +15,6 @@ fn main() -> Result<(), Box> { let mut file = fs::File::create(&out_path)?; copy(&mut response, &mut file)?; } - hard_link( - out_path, - PathBuf::from(&env::var("OUT_DIR").unwrap()).join("out.bin"), - ) - .unwrap(); println!("cargo:rerun-if-changed=build.rs"); Ok(()) } From 14d604091bc76443064da44863c421908c125c41 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 04:58:12 +0000 Subject: [PATCH 23/35] fix: shortcut --- .github/workflows/CI.Dockerfile | 3 +- Cargo.lock | 61 ++++++++++++++++++++++++--------- crates/sbv2_core/Cargo.toml | 3 +- crates/sbv2_core/build.rs | 12 ++++--- 4 files changed, 57 insertions(+), 22 deletions(-) diff --git a/.github/workflows/CI.Dockerfile b/.github/workflows/CI.Dockerfile index 2acbac3..740c4b0 100644 --- a/.github/workflows/CI.Dockerfile +++ b/.github/workflows/CI.Dockerfile @@ -1,3 +1,4 @@ FROM ubuntu:latest RUN apt update && apt install openssl libssl-dev curl pkg-config software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3-pip python3 -y -ENV PIP_BREAK_SYSTEM_PACKAGES=1 \ No newline at end of file +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +RUN mkdir -p /root/.cache/sbv2 && curl https://huggingface.co/neody/sbv2-api-assets/resolve/main/dic/all.bin -o /root/.cache/sbv2/all.bin -L \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 6135203..1d01897 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,7 +155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", @@ -255,6 +255,12 @@ dependencies = [ "shlex", ] +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -311,7 +317,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -561,7 +567,7 @@ version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -644,7 +650,7 @@ version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "libredox", "windows-sys 0.59.0", @@ -745,7 +751,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -758,7 +764,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.13.3+wasi-0.2.2", "windows-targets", @@ -801,7 +807,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crunchy", ] @@ -823,6 +829,16 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "home-dir" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "572c4f9690c3ac7058775be826d1b508ca20fd6633261435c27ac30ad0598212" +dependencies = [ + "nix", + "thiserror 1.0.69", +] + [[package]] name = "hound" version = "3.5.1" @@ -1315,7 +1331,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-targets", ] @@ -1540,6 +1556,18 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "nix" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +dependencies = [ + "bitflags 1.3.2", + "cc", + "cfg-if 0.1.10", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -1658,7 +1686,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags 2.8.0", - "cfg-if", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -1735,7 +1763,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", @@ -1921,7 +1949,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" dependencies = [ "anyhow", - "cfg-if", + "cfg-if 1.0.0", "indoc", "libc", "memoffset", @@ -2143,7 +2171,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34b5020fcdea098ef7d95e9f89ec15952123a4a039badd09fabebe9e963e839" dependencies = [ "cc", - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.15", "libc", "untrusted", @@ -2256,6 +2284,7 @@ dependencies = [ "base64 0.22.1", "dotenvy", "env_logger", + "home-dir", "hound", "jpreprocess", "ndarray", @@ -2396,7 +2425,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest", ] @@ -2585,7 +2614,7 @@ version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand", "getrandom 0.3.1", "once_cell", @@ -3032,7 +3061,7 @@ version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", "rustversion", "wasm-bindgen-macro", @@ -3058,7 +3087,7 @@ version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "once_cell", "wasm-bindgen", diff --git a/crates/sbv2_core/Cargo.toml b/crates/sbv2_core/Cargo.toml index 852cf32..c2dda4d 100644 --- a/crates/sbv2_core/Cargo.toml +++ b/crates/sbv2_core/Cargo.toml @@ -43,4 +43,5 @@ aivmx = ["npyz", "base64"] base64 = ["dep:base64"] [build-dependencies] -ureq = "3.0.6" \ No newline at end of file +home-dir = "0.1.0" +ureq = "3.0.6" diff --git a/crates/sbv2_core/build.rs b/crates/sbv2_core/build.rs index 62e0a65..467a8bc 100644 --- a/crates/sbv2_core/build.rs +++ b/crates/sbv2_core/build.rs @@ -3,10 +3,15 @@ use std::fs; use std::io::copy; use std::path::PathBuf; +use home_dir::HomeDirExt; + fn main() -> Result<(), Box> { - let out_dir = PathBuf::from(&env::var("OUT_DIR").unwrap()); - let out_path = out_dir.join("all.bin"); - if !out_path.exists() { + let static_path = "~/.cache/sbv2/all.bin".expand_home().unwrap(); + let out_path = PathBuf::from(&env::var("OUT_DIR").unwrap()).join("all.bin"); + println!("cargo:rerun-if-changed=build.rs"); + if static_path.exists() { + fs::hard_link(static_path, out_path).unwrap(); + } else { println!("cargo:warning=Downloading dictionary file..."); let mut response = ureq::get("https://huggingface.co/neody/sbv2-api-assets/resolve/main/dic/all.bin") @@ -15,6 +20,5 @@ fn main() -> Result<(), Box> { let mut file = fs::File::create(&out_path)?; copy(&mut response, &mut file)?; } - println!("cargo:rerun-if-changed=build.rs"); Ok(()) } From 143d05c068a3c23f9373ccc72e10220581553fb3 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 05:02:36 +0000 Subject: [PATCH 24/35] fix --- crates/sbv2_core/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/sbv2_core/build.rs b/crates/sbv2_core/build.rs index 467a8bc..3ef67b0 100644 --- a/crates/sbv2_core/build.rs +++ b/crates/sbv2_core/build.rs @@ -10,7 +10,9 @@ fn main() -> Result<(), Box> { let out_path = PathBuf::from(&env::var("OUT_DIR").unwrap()).join("all.bin"); println!("cargo:rerun-if-changed=build.rs"); if static_path.exists() { - fs::hard_link(static_path, out_path).unwrap(); + if fs::hard_link(&static_path, &out_path).is_err() { + fs::copy(static_path, out_path).unwrap(); + }; } else { println!("cargo:warning=Downloading dictionary file..."); let mut response = From 80e5ddee5bdaac095b8fc8d097879d0171c6409f Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 05:05:40 +0000 Subject: [PATCH 25/35] fix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7f32a3e..706bf66 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,7 +22,7 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - - runner: ubuntu-latest + - runner: macos-latest target: aarch64 steps: - uses: actions/checkout@v4 From 6fc0a47a7800c32b9de5a73e931e9f5c312b6d7d Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 05:08:13 +0000 Subject: [PATCH 26/35] fix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 706bf66..7f32a3e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,7 +22,7 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - - runner: macos-latest + - runner: ubuntu-latest target: aarch64 steps: - uses: actions/checkout@v4 From 4d00fcd0bc1eb27abf491a6d6d2c0d627e2c9b74 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 05:14:56 +0000 Subject: [PATCH 27/35] fix --- Cargo.lock | 100 ++++++++++++++++++++---------------- crates/sbv2_core/Cargo.toml | 2 +- crates/sbv2_core/build.rs | 5 +- 3 files changed, 58 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1d01897..9d90a4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,7 +155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -255,12 +255,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -317,7 +311,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -468,6 +462,27 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.59.0", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -567,7 +582,7 @@ version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -650,7 +665,7 @@ version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "libredox", "windows-sys 0.59.0", @@ -751,7 +766,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -764,7 +779,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.13.3+wasi-0.2.2", "windows-targets", @@ -807,7 +822,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crunchy", ] @@ -829,16 +844,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "home-dir" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572c4f9690c3ac7058775be826d1b508ca20fd6633261435c27ac30ad0598212" -dependencies = [ - "nix", - "thiserror 1.0.69", -] - [[package]] name = "hound" version = "3.5.1" @@ -1331,7 +1336,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-targets", ] @@ -1556,18 +1561,6 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "nix" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 0.1.10", - "libc", -] - [[package]] name = "nom" version = "7.1.3" @@ -1686,7 +1679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags 2.8.0", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -1723,6 +1716,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "ort" version = "2.0.0-rc.9" @@ -1763,7 +1762,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "smallvec", @@ -1949,7 +1948,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" dependencies = [ "anyhow", - "cfg-if 1.0.0", + "cfg-if", "indoc", "libc", "memoffset", @@ -2091,6 +2090,17 @@ dependencies = [ "bitflags 2.8.0", ] +[[package]] +name = "redox_users" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror 2.0.11", +] + [[package]] name = "regex" version = "1.11.1" @@ -2171,7 +2181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34b5020fcdea098ef7d95e9f89ec15952123a4a039badd09fabebe9e963e839" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", "getrandom 0.2.15", "libc", "untrusted", @@ -2282,9 +2292,9 @@ version = "0.2.0-alpha6" dependencies = [ "anyhow", "base64 0.22.1", + "dirs", "dotenvy", "env_logger", - "home-dir", "hound", "jpreprocess", "ndarray", @@ -2425,7 +2435,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -2614,7 +2624,7 @@ version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "getrandom 0.3.1", "once_cell", @@ -3061,7 +3071,7 @@ version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", @@ -3087,7 +3097,7 @@ version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "once_cell", "wasm-bindgen", diff --git a/crates/sbv2_core/Cargo.toml b/crates/sbv2_core/Cargo.toml index c2dda4d..a8c60aa 100644 --- a/crates/sbv2_core/Cargo.toml +++ b/crates/sbv2_core/Cargo.toml @@ -43,5 +43,5 @@ aivmx = ["npyz", "base64"] base64 = ["dep:base64"] [build-dependencies] -home-dir = "0.1.0" +dirs = "6.0.0" ureq = "3.0.6" diff --git a/crates/sbv2_core/build.rs b/crates/sbv2_core/build.rs index 3ef67b0..f9c4823 100644 --- a/crates/sbv2_core/build.rs +++ b/crates/sbv2_core/build.rs @@ -1,12 +1,11 @@ +use dirs::home_dir; use std::env; use std::fs; use std::io::copy; use std::path::PathBuf; -use home_dir::HomeDirExt; - fn main() -> Result<(), Box> { - let static_path = "~/.cache/sbv2/all.bin".expand_home().unwrap(); + let static_path = home_dir().unwrap().join(".cache/sbv2/all.bin"); let out_path = PathBuf::from(&env::var("OUT_DIR").unwrap()).join("all.bin"); println!("cargo:rerun-if-changed=build.rs"); if static_path.exists() { From 2b5bc27db79e57528ee8a42608a537742d67aec4 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 05:45:23 +0000 Subject: [PATCH 28/35] tell me that I can use arm64 runner, f*** microsoft, update the doc NOW --- .github/workflows/CI.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7f32a3e..4fe5faa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,23 +22,19 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - - runner: ubuntu-latest + - runner: ubuntu-24.04-arm64 target: aarch64 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: 3.x - - uses: docker/setup-qemu-action@v3 - with: - platforms: linux/${{ matrix.platform.target }} - - run: docker build . -f .github/workflows/CI.Dockerfile --tag ci --platform linux/${{ matrix.platform.target }} + - run: docker build . -f .github/workflows/CI.Dockerfile --tag ci - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - docker-options: --platform linux/${{ matrix.platform.target }} sccache: 'true' manylinux: auto container: ci From 640ef16c4bf274593499ccdbb4d519af356892c6 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 05:49:06 +0000 Subject: [PATCH 29/35] miss --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4fe5faa..f12db89 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,7 +22,7 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - - runner: ubuntu-24.04-arm64 + - runner: ubuntu-24.04-arm target: aarch64 steps: - uses: actions/checkout@v4 From 97541d6a2802f6206182bd7b23f224fa84fc6b3d Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 06:08:26 +0000 Subject: [PATCH 30/35] fix --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f12db89..57f1efa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -116,7 +116,7 @@ jobs: runs-on: ubuntu-latest needs: [python-linux, python-windows, python-macos, python-sdist] steps: - - uses: actions/download-artifact@v4 + - run: gh run download ${{github.run_id}} -n wheels-*/* - name: release run: | gh release create commit-${GITHUB_SHA:0:8} --prerelease wheels-*/* @@ -128,7 +128,7 @@ jobs: needs: [python-linux, python-windows, python-macos, python-sdist] environment: release steps: - - uses: actions/download-artifact@v4 + - run: gh run download ${{github.run_id}} -n wheels-*/* - name: Publish to PyPI uses: PyO3/maturin-action@v1 with: From 45a221af235c24e8883a8c353e074c59965381eb Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 06:22:19 +0000 Subject: [PATCH 31/35] fix --- .github/workflows/CI.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 57f1efa..a3ad09c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -115,8 +115,10 @@ jobs: name: Wheel Upload runs-on: ubuntu-latest needs: [python-linux, python-windows, python-macos, python-sdist] + env: + GH_TOKEN: ${{ github.token }} steps: - - run: gh run download ${{github.run_id}} -n wheels-*/* + - run: gh run download ${{ github.run_id }} -n wheels-*/* - name: release run: | gh release create commit-${GITHUB_SHA:0:8} --prerelease wheels-*/* @@ -127,8 +129,10 @@ jobs: if: "startsWith(github.ref, 'refs/tags/')" needs: [python-linux, python-windows, python-macos, python-sdist] environment: release + env: + GH_TOKEN: ${{ github.token }} steps: - - run: gh run download ${{github.run_id}} -n wheels-*/* + - run: gh run download ${{ github.run_id }} -n wheels-*/* - name: Publish to PyPI uses: PyO3/maturin-action@v1 with: From 9b7de85c46fd71c10299f052b5d432f12645c18d Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 06:36:22 +0000 Subject: [PATCH 32/35] fix --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a3ad09c..0862520 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -118,6 +118,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} steps: + - uses: actions/checkout@v4 - run: gh run download ${{ github.run_id }} -n wheels-*/* - name: release run: | @@ -132,6 +133,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} steps: + - uses: actions/checkout@v4 - run: gh run download ${{ github.run_id }} -n wheels-*/* - name: Publish to PyPI uses: PyO3/maturin-action@v1 From f6e9a52b132f870db70365f3b0a66d87f3ef125e Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 06:49:49 +0000 Subject: [PATCH 33/35] fix --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0862520..f8cb076 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -119,7 +119,7 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - - run: gh run download ${{ github.run_id }} -n wheels-*/* + - run: gh run download ${{ github.run_id }} -n wheels-* - name: release run: | gh release create commit-${GITHUB_SHA:0:8} --prerelease wheels-*/* @@ -134,7 +134,7 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - - run: gh run download ${{ github.run_id }} -n wheels-*/* + - run: gh run download ${{ github.run_id }} -n wheels-* - name: Publish to PyPI uses: PyO3/maturin-action@v1 with: From 5127d48260d8ed3f5a6a97f4c42e479f73fb27b8 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 07:04:20 +0000 Subject: [PATCH 34/35] fix --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f8cb076..6f6ce40 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -119,7 +119,7 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - - run: gh run download ${{ github.run_id }} -n wheels-* + - run: gh run download ${{ github.run_id }} - name: release run: | gh release create commit-${GITHUB_SHA:0:8} --prerelease wheels-*/* @@ -134,7 +134,7 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - - run: gh run download ${{ github.run_id }} -n wheels-* + - run: gh run download ${{ github.run_id }} - name: Publish to PyPI uses: PyO3/maturin-action@v1 with: From 28e116e67d9c5e08093826eab862ff929ddb7268 Mon Sep 17 00:00:00 2001 From: googlefan256 Date: Sun, 23 Feb 2025 16:19:20 +0900 Subject: [PATCH 35/35] Update CI.yml --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6f6ce40..5ee7808 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -119,7 +119,7 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - - run: gh run download ${{ github.run_id }} + - run: gh run download ${{ github.run_id }} -p wheels-* - name: release run: | gh release create commit-${GITHUB_SHA:0:8} --prerelease wheels-*/* @@ -134,7 +134,7 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - - run: gh run download ${{ github.run_id }} + - run: gh run download ${{ github.run_id }} -p wheels-* - name: Publish to PyPI uses: PyO3/maturin-action@v1 with: