Skip to content

Commit 7fc8070

Browse files
authored
fix release publish workflow failures (#1491)
(cherry picked from commit 5f51ea4) Signed-off-by: xunzhuo <xunzhuo@vllm-semantic-router.ai>
1 parent 5b75ee3 commit 7fc8070

File tree

5 files changed

+254
-403
lines changed

5 files changed

+254
-403
lines changed

.github/workflows/publish-crate.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
publish:
1515
if: github.repository == 'vllm-project/semantic-router'
1616
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
1719

1820
steps:
1921
- name: Check out the repo
@@ -42,7 +44,7 @@ jobs:
4244
- name: Set up Rust
4345
uses: dtolnay/rust-toolchain@stable
4446
with:
45-
toolchain: 1.85
47+
toolchain: 1.90
4648

4749
- name: Install system dependencies
4850
run: |
@@ -76,9 +78,13 @@ jobs:
7678
exit 1
7779
fi
7880
79-
- name: Run tests (CPU-only, no CUDA)
81+
- name: Run API smoke tests (CPU-only, no CUDA)
8082
working-directory: candle-binding
81-
run: cargo test --no-default-features --verbose
83+
run: |
84+
cargo test --no-default-features \
85+
--test qwen3_classification_api_test \
86+
--test classification_output_demo \
87+
--verbose
8288
8389
- name: Check crate (CPU-only, no CUDA)
8490
working-directory: candle-binding
@@ -90,11 +96,11 @@ jobs:
9096

9197
- name: Dry run publish
9298
working-directory: candle-binding
93-
run: cargo publish --dry-run --verbose
99+
run: cargo publish --dry-run --no-default-features --verbose
94100

95101
- name: Publish to crates.io
96102
working-directory: candle-binding
97-
run: cargo publish --verbose
103+
run: cargo publish --no-default-features --verbose
98104
env:
99105
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
100106

.github/workflows/pypi-publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
if: github.repository == 'vllm-project/semantic-router'
2323
runs-on: ubuntu-latest
2424
permissions:
25-
contents: read
25+
contents: write
2626
id-token: write # Required for trusted publishing to PyPI
2727

2828
steps:
@@ -174,7 +174,7 @@ jobs:
174174
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
175175
run: |
176176
echo "Publishing to PyPI..."
177-
twine upload dist/* --verbose
177+
twine upload dist/* --skip-existing --verbose
178178
179179
- name: Create GitHub Release
180180
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
@@ -235,4 +235,3 @@ jobs:
235235
if [ "${{ steps.extract_version.outputs.is_dev }}" = "false" ]; then
236236
echo "- [GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.extract_version.outputs.tag }})" >> $GITHUB_STEP_SUMMARY
237237
fi
238-

candle-binding/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ accelerate = ["candle-core/accelerate", "candle-nn/accelerate", "candle-transfor
2828

2929
[dependencies]
3030
anyhow = { version = "1", features = ["backtrace"] }
31-
candle-core = { git = "https://github.com/huggingface/candle", tag = "0.9.2-alpha.1" }
32-
candle-nn = { git = "https://github.com/huggingface/candle", tag = "0.9.2-alpha.1" }
33-
candle-transformers = { git = "https://github.com/huggingface/candle", tag = "0.9.2-alpha.1" }
31+
candle-core = { version = "0.9.2-alpha.1", git = "https://github.com/huggingface/candle", tag = "0.9.2-alpha.1" }
32+
candle-nn = { version = "0.9.2-alpha.1", git = "https://github.com/huggingface/candle", tag = "0.9.2-alpha.1" }
33+
candle-transformers = { version = "0.9.2-alpha.1", git = "https://github.com/huggingface/candle", tag = "0.9.2-alpha.1" }
3434
# Flash Attention 2 (optional, requires CUDA)
3535
# Reference: https://github.com/huggingface/candle/tree/main/candle-flash-attn
3636
# Using git dependency to automatically fetch CUTLASS submodule
37-
candle-flash-attn = { git = "https://github.com/huggingface/candle", tag = "0.9.2-alpha.1", optional = true }
37+
candle-flash-attn = { version = "0.9.2-alpha.1", git = "https://github.com/huggingface/candle", tag = "0.9.2-alpha.1", optional = true }
3838
tokenizers = { version = "0.21.0", default-features = false, features = ["http", "onig"] }
3939
hf-hub = { version = "0.4.1", default-features = false, features = ["rustls-tls"] }
4040
safetensors = "0.4.1"

0 commit comments

Comments
 (0)