|
4 | 4 |
|
5 | 5 | ##@ Rust |
6 | 6 |
|
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 |
9 | 9 | @$(LOG_TARGET) |
10 | 10 | @export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \ |
11 | 11 | cd candle-binding && CGO_ENABLED=1 go test -v -race |
12 | 12 |
|
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 |
15 | 15 | @$(LOG_TARGET) |
16 | 16 | @export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \ |
17 | 17 | cd src/training/classifier_model_fine_tuning && CGO_ENABLED=1 go run test_linear_classifier.go |
18 | 18 |
|
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 |
21 | 21 | @$(LOG_TARGET) |
22 | 22 | @export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \ |
23 | 23 | cd src/training/pii_model_fine_tuning && CGO_ENABLED=1 go run pii_classifier_verifier.go |
24 | 24 |
|
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 |
27 | 27 | @$(LOG_TARGET) |
28 | 28 | @export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \ |
29 | 29 | cd src/training/prompt_guard_fine_tuning && CGO_ENABLED=1 go run jailbreak_classifier_verifier.go |
|
0 commit comments