File tree Expand file tree Collapse file tree 10 files changed +1133
-0
lines changed Expand file tree Collapse file tree 10 files changed +1133
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+ branches : [ "**" ]
9+
10+ env :
11+ RUST_LOG : debug
12+ CARGO_TERM_COLOR : always
13+ RUST_BACKTRACE : " 1"
14+ RUSTFLAGS : " -D warnings"
15+ LLVM_CONFIG_PATH : llvm-config-18
16+
17+ jobs :
18+ ci :
19+ name : CI
20+ runs-on : ubuntu-24.04
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v2
24+
25+ - name : Install libclang for Linux
26+ run : sudo apt-get update && sudo apt-get install -y llvm-18-dev libclang-18-dev
27+
28+ - name : Install Rust Nightly
29+ uses : actions-rs/toolchain@v1
30+ with :
31+ toolchain : nightly
32+ components : rustfmt
33+
34+ - name : Setup cargo cache
35+ uses : actions/cache@v3
36+ with :
37+ path : |
38+ ~/.cargo/bin/
39+ ~/.cargo/registry/index/
40+ ~/.cargo/registry/cache/
41+ ~/.cargo/git/db/
42+ target/
43+ key : ci-${{ hashFiles('**/Cargo.lock') }}
44+
45+ - name : Cargo fmt
46+ uses : actions-rs/cargo@v1
47+ with :
48+ toolchain : nightly
49+ command : fmt
50+ args : --all -- --check
51+
52+ - name : Cargo clippy
53+ uses : actions-rs/cargo@v1
54+ with :
55+ command : clippy
56+ args : --release
57+
58+ - name : Cargo build
59+ uses : actions-rs/cargo@v1
60+ with :
61+ command : build
62+ args : --release
63+
64+ - name : PHP Test
65+ run : php -d "extension=target/release/libjieba.so" -r "print_r((new Jieba())->cut('我们中出了一个叛徒'));"
Original file line number Diff line number Diff line change 1+ /target
Original file line number Diff line number Diff line change 1+ fn_params_layout = " Compressed"
2+ format_code_in_doc_comments = true
3+ format_macro_bodies = true
4+ format_macro_matchers = true
5+ format_strings = true
6+ imports_granularity = " Crate"
7+ merge_derives = true
8+ newline_style = " Unix"
9+ normalize_comments = true
10+ reorder_impl_items = true
11+ use_field_init_shorthand = true
12+ wrap_comments = true
You can’t perform that action at this time.
0 commit comments