1name: CI 2 3on: 4 pull_request: 5 push: 6 branches: 7 - master 8 schedule: 9 - cron: '0 22 * * *' 10 11env: 12 RUST_BACKTRACE: 1 13 RUSTFLAGS: "--deny=warnings" 14 TEST_BIND: 1 15 16jobs: 17 Linux-Format: 18 name: Linux-Format 19 runs-on: ubuntu-latest 20 steps: 21 - uses: actions/checkout@v2 22 - run: sudo apt-get install -y clang-tidy-9 23 - run: sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-9 100 24 - run: which go && go version && which cargo && cargo version && clang --version && openssl version && which cmake && cmake --version 25 - run: scripts/reset-submodule.cmd 26 - run: cargo fmt --all -- --check 27 - run: cargo clippy --all -- -D clippy::all && cargo clippy --all --no-default-features --features prost-codec -- -D clippy::all 28 - run: scripts/lint-grpc-sys.sh && git diff-index --quiet HEAD 29 30 Linux-Stable: 31 name: Linux-Stable 32 runs-on: ubuntu-latest 33 steps: 34 - uses: actions/checkout@v2 35 - run: which go && go version && which cargo && cargo version && clang --version && openssl version 36 - run: scripts/reset-submodule.cmd 37 - run: env TEST_BIND=0 scripts/generate-bindings.sh && git diff --exit-code HEAD 38 - run: scripts/generate-bindings.sh 39 - run: cargo build --no-default-features 40 - run: cargo build --no-default-features --features protobuf-codec 41 - run: cargo build --no-default-features --features prost-codec 42 - run: cd proto && cargo build --no-default-features --features prost-codec 43 - run: cargo build 44 - run: cargo test --all 45 46 Linux-Stable-openssl: 47 name: Linux-Stable-openssl 48 runs-on: ubuntu-latest 49 steps: 50 - uses: actions/checkout@v2 51 - run: which go && go version && which cargo && cargo version && clang --version && openssl version 52 - run: scripts/reset-submodule.cmd 53 - run: cargo test --features "openssl-vendored" --all 54 - run: cargo clean 55 - run: cargo test --features "openssl" --all 56 57 Linux-Nightly: 58 name: Linux-Nightly 59 runs-on: ubuntu-latest 60 steps: 61 - uses: actions/checkout@v2 62 - run: rustup default nightly 63 - run: which go && go version && which cargo && cargo version && clang --version && openssl version 64 - run: scripts/reset-submodule.cmd 65 - run: cargo build --no-default-features 66 - run: cargo build --no-default-features --features protobuf-codec 67 - run: cargo build --no-default-features --features prost-codec 68 - run: cargo build 69 - run: cargo test --all 70 - run: RUSTFLAGS="-Z sanitizer=address" cargo test --all --target x86_64-unknown-linux-gnu 71 72 Mac: 73 name: Mac 74 runs-on: macos-latest 75 steps: 76 - uses: actions/checkout@v2 77 - run: which go && go version && which cargo && cargo version && clang --version && openssl version 78 - run: scripts/reset-submodule.cmd 79 - run: cargo build --no-default-features --features use-bindgen 80 - run: cargo build --no-default-features --features "protobuf-codec use-bindgen" 81 - run: cargo build --no-default-features --features "prost-codec use-bindgen" 82 - run: cargo build 83 - run: cargo test --all 84 85 Mac-openssl: 86 name: Mac-openssl 87 runs-on: macos-latest 88 steps: 89 - uses: actions/checkout@v2 90 - run: brew update && brew upgrade openssl@1.1 91 - run: which go && go version && which cargo && cargo version && clang --version && openssl version 92 - run: scripts/reset-submodule.cmd 93 - run: OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1/" cargo test --features "openssl" --all 94 - run: cargo test --features "openssl-vendored" --all 95 96 Win: 97 name: Windows 98 runs-on: windows-latest 99 env: 100 LIBCLANG_PATH: 'C:\Program Files\LLVM\bin' 101 steps: 102 - uses: actions/checkout@v2 103 - run: choco install -y llvm 104 - run: refreshenv 105 - run: go version ; cargo version ; cmake --version 106 - run: scripts/reset-submodule.cmd 107 - run: cargo build 108 - run: cargo test --all 109 110 Pre-Release: 111 name: Pre-Release 112 runs-on: ubuntu-latest 113 steps: 114 - uses: actions/checkout@v2 115 - run: scripts/reset-submodule.cmd 116 - run: cd grpc-sys && cargo publish --dry-run 117 - name: Check generated package size 118 run: | 119 ls -alh target/package/grpcio-sys-*.crate 120 test `cat target/package/grpcio-sys-*.crate | wc -c` -le 10485760 121