File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 12
12
RUST_BACKTRACE : 1
13
13
RUSTFLAGS : " --deny=warnings"
14
14
GRPC_VERSION : 1.26.0
15
+ TEST_BIND : 1
15
16
16
17
jobs :
17
18
Linux-Format-PKG-Test :
37
38
- uses : actions/checkout@v2
38
39
- run : which go && go version && which cargo && cargo version && clang --version && openssl version
39
40
- run : scripts/reset-submodule.cmd
40
- - run : scripts/generate-bindings.sh && git diff --exit-code HEAD
41
+ - run : env TEST_BIND=0 scripts/generate-bindings.sh && git diff --exit-code HEAD
42
+ - run : scripts/generate-bindings.sh
41
43
- run : cargo build --no-default-features
42
44
- run : cargo build --no-default-features --features protobuf-codec
43
45
- run : cargo build --no-default-features --features prost-codec
@@ -103,4 +105,4 @@ jobs:
103
105
- run : go version ; cargo version ; cmake --version
104
106
- run : scripts/reset-submodule.cmd
105
107
- run : cargo build
106
- - run : cargo test --all
108
+ - run : cargo test --all
Original file line number Diff line number Diff line change 12
12
global :
13
13
- RUST_BACKTRACE=1
14
14
- RUSTFLAGS="--deny=warnings"
15
+ - TEST_BIND=1
15
16
16
17
install :
17
18
- if ! which go 2>/dev/null; then
@@ -72,12 +73,13 @@ jobs:
72
73
- which go && go version
73
74
- if [[ $TRAVIS_OS_NAME == "linux" ]] && [[ $TRAVIS_RUST_VERSION == "stable" ]]; then
74
75
rustup component add rustfmt && cargo fmt --all -- --check;
75
- scripts/generate-bindings.sh && git diff --exit-code HEAD;
76
+ env TEST_BIND=0 scripts/generate-bindings.sh && git diff --exit-code HEAD;
76
77
fi
78
+ - ./scripts/generate-bindings.sh
77
79
- cargo build --no-default-features
78
80
- cargo build --no-default-features --features protobuf-codec
79
81
- cargo build --no-default-features --features prost-codec
80
82
- cargo build
81
83
- cargo test --all
82
84
- cargo test --features "openssl" --all
83
- - cargo test --features "openssl-vendored" --all
85
+ - cargo test --features "openssl-vendored" --all
Original file line number Diff line number Diff line change @@ -299,6 +299,9 @@ fn bindgen_grpc(mut config: bindgen::Builder, file_path: &PathBuf) {
299
299
config = config. header ( path) ;
300
300
}
301
301
302
+ println ! ( "cargo:rerun-if-env-changed=TEST_BIND" ) ;
303
+ let gen_tests = env:: var ( "TEST_BIND" ) . map_or ( false , |s| s == "1" ) ;
304
+
302
305
let cfg = config
303
306
. header ( "grpc_wrap.cc" )
304
307
. clang_arg ( "-xc++" )
@@ -323,6 +326,7 @@ fn bindgen_grpc(mut config: bindgen::Builder, file_path: &PathBuf) {
323
326
. blacklist_type ( r"gpr_cv" )
324
327
. blacklist_type ( r"gpr_once" )
325
328
. constified_enum_module ( r"grpc_status_code" )
329
+ . layout_tests ( gen_tests)
326
330
. default_enum_style ( bindgen:: EnumVariation :: Rust {
327
331
non_exhaustive : false ,
328
332
} ) ;
You can’t perform that action at this time.
0 commit comments