Skip to content

Commit

Permalink
remove binding tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
  • Loading branch information
BusyJay committed Nov 24, 2020
1 parent 166a842 commit aaf972b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
RUST_BACKTRACE: 1
RUSTFLAGS: "--deny=warnings"
GRPC_VERSION: 1.26.0
TEST_BIND: 1

jobs:
Linux-Format-PKG-Test:
Expand All @@ -37,7 +38,8 @@ jobs:
- uses: actions/checkout@v2
- run: which go && go version && which cargo && cargo version && clang --version && openssl version
- run: scripts/reset-submodule.cmd
- run: scripts/generate-bindings.sh && git diff --exit-code HEAD
- run: env TEST_BIND=0 scripts/generate-bindings.sh && git diff --exit-code HEAD
- run: scripts/generate-bindings.sh
- run: cargo build --no-default-features
- run: cargo build --no-default-features --features protobuf-codec
- run: cargo build --no-default-features --features prost-codec
Expand Down Expand Up @@ -103,4 +105,4 @@ jobs:
- run: go version ; cargo version ; cmake --version
- run: scripts/reset-submodule.cmd
- run: cargo build
- run: cargo test --all
- run: cargo test --all
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
global:
- RUST_BACKTRACE=1
- RUSTFLAGS="--deny=warnings"
- TEST_BIND=1

install:
- if ! which go 2>/dev/null; then
Expand Down Expand Up @@ -72,12 +73,13 @@ jobs:
- which go && go version
- if [[ $TRAVIS_OS_NAME == "linux" ]] && [[ $TRAVIS_RUST_VERSION == "stable" ]]; then
rustup component add rustfmt && cargo fmt --all -- --check;
scripts/generate-bindings.sh && git diff --exit-code HEAD;
env TEST_BIND=0 scripts/generate-bindings.sh && git diff --exit-code HEAD;
fi
- ./scripts/generate-bindings.sh
- cargo build --no-default-features
- cargo build --no-default-features --features protobuf-codec
- cargo build --no-default-features --features prost-codec
- cargo build
- cargo test --all
- cargo test --features "openssl" --all
- cargo test --features "openssl-vendored" --all
- cargo test --features "openssl-vendored" --all
4 changes: 4 additions & 0 deletions grpc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ fn bindgen_grpc(mut config: bindgen::Builder, file_path: &PathBuf) {
config = config.header(path);
}

println!("cargo:rerun-if-env-changed=TEST_BIND");
let gen_tests = env::var("TEST_BIND").map_or(false, |s| s == "1");

let cfg = config
.header("grpc_wrap.cc")
.clang_arg("-xc++")
Expand All @@ -323,6 +326,7 @@ fn bindgen_grpc(mut config: bindgen::Builder, file_path: &PathBuf) {
.blacklist_type(r"gpr_cv")
.blacklist_type(r"gpr_once")
.constified_enum_module(r"grpc_status_code")
.layout_tests(gen_tests)
.default_enum_style(bindgen::EnumVariation::Rust {
non_exhaustive: false,
});
Expand Down

0 comments on commit aaf972b

Please sign in to comment.