Skip to content

Commit 1fb7ca6

Browse files
committed
disable cuda build on ci
Signed-off-by: Huamin Chen <[email protected]>
1 parent 09ef22f commit 1fb7ca6

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ jobs:
9797

9898
- name: Run pre-commit check
9999
run: make precommit-check
100+
env:
101+
CI: true
100102

101103
- name: Show pre-commit results
102104
if: failure()

.github/workflows/test-and-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
- name: Run semantic router tests
8787
run: make test
8888
env:
89+
CI: true
8990
CGO_ENABLED: 1
9091
LD_LIBRARY_PATH: ${{ github.workspace }}/candle-binding/target/release
9192

tools/make/build-run-test.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
build: ## Build the Rust library and Golang binding
99
build: rust build-router
1010

11-
# Build router
11+
# Build router (conditionally use rust-ci in CI environments)
1212
build-router: ## Build the router binary
13-
build-router: rust
13+
build-router: $(if $(CI),rust-ci,rust)
1414
@$(LOG_TARGET)
1515
@mkdir -p bin
1616
@cd src/semantic-router && go build --tags=milvus -o ../../bin/router cmd/main.go

tools/make/rust.mk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44

55
##@ Rust
66

7-
# Test the Rust library
8-
test-binding: rust ## Run Go tests with the Rust static library
7+
# Test the Rust library (conditionally use rust-ci in CI environments)
8+
test-binding: $(if $(CI),rust-ci,rust) ## Run Go tests with the Rust static library
99
@$(LOG_TARGET)
1010
@export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \
1111
cd candle-binding && CGO_ENABLED=1 go test -v -race
1212

13-
# Test with the candle-binding library
14-
test-category-classifier: rust ## Test domain classifier with candle-binding
13+
# Test with the candle-binding library (conditionally use rust-ci in CI environments)
14+
test-category-classifier: $(if $(CI),rust-ci,rust) ## Test domain classifier with candle-binding
1515
@$(LOG_TARGET)
1616
@export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \
1717
cd src/training/classifier_model_fine_tuning && CGO_ENABLED=1 go run test_linear_classifier.go
1818

19-
# Test the PII classifier
20-
test-pii-classifier: rust ## Test PII classifier with candle-binding
19+
# Test the PII classifier (conditionally use rust-ci in CI environments)
20+
test-pii-classifier: $(if $(CI),rust-ci,rust) ## Test PII classifier with candle-binding
2121
@$(LOG_TARGET)
2222
@export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \
2323
cd src/training/pii_model_fine_tuning && CGO_ENABLED=1 go run pii_classifier_verifier.go
2424

25-
# Test the jailbreak classifier
26-
test-jailbreak-classifier: rust ## Test jailbreak classifier with candle-binding
25+
# Test the jailbreak classifier (conditionally use rust-ci in CI environments)
26+
test-jailbreak-classifier: $(if $(CI),rust-ci,rust) ## Test jailbreak classifier with candle-binding
2727
@$(LOG_TARGET)
2828
@export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \
2929
cd src/training/prompt_guard_fine_tuning && CGO_ENABLED=1 go run jailbreak_classifier_verifier.go

0 commit comments

Comments
 (0)