diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-25 12:32:08 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-25 12:32:08 +0000 |
commit | 937dd8a10f561455df7b1e0d75a29f5dede1c6e9 (patch) | |
tree | 772fcd2e6530512a1c685e462bdea6a7acfeb75f /.github/workflows/ci.yml | |
parent | a3079d40b9c0621961d2b6f0d41b2b96489365b8 (diff) | |
parent | b7a6f5938fe6c35af3cd9c0967485af224d3f873 (diff) | |
download | grpcio-android13-mainline-go-media-release.tar.gz |
Snap for 8358640 from b7a6f5938fe6c35af3cd9c0967485af224d3f873 to mainline-go-media-releaseaml_go_med_330913000android13-mainline-go-media-release
Change-Id: I8e3116e2aaa74837dad766dba7884f54d6ba384e
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r-- | .github/workflows/ci.yml | 72 |
1 files changed, 47 insertions, 25 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3731f9e..f25093f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,8 @@ on: env: RUST_BACKTRACE: 1 - RUSTFLAGS: "--deny=warnings" + # Some of the bindgen tests generate "deref-nullptr" warnings, see https://github.com/rust-lang/rust-bindgen/issues/1651 + RUSTFLAGS: "--deny=warnings --allow deref-nullptr" TEST_BIND: 1 jobs: @@ -21,38 +22,58 @@ jobs: - uses: actions/checkout@v2 - run: sudo apt-get install -y clang-tidy-9 - run: sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-9 100 - - run: which go && go version && which cargo && cargo version && clang --version && openssl version && which cmake && cmake --version - - run: scripts/reset-submodule.cmd + - run: which cargo && cargo version && clang --version && openssl version && which cmake && cmake --version + - run: cargo xtask submodule - run: cargo fmt --all -- --check - run: cargo clippy --all -- -D clippy::all && cargo clippy --all --no-default-features --features prost-codec -- -D clippy::all - - run: scripts/lint-grpc-sys.sh && git diff-index --quiet HEAD + - run: cargo xtask clang-lint && git diff-index --quiet HEAD Linux-Stable: - name: Linux-Stable - runs-on: ubuntu-latest + strategy: + matrix: + include: + - host: ubuntu-latest + profile: + suffix: + - host: ARM64 + profile: --release + suffix: -Arm64 + name: Linux-Stable${{ matrix.suffix }} + runs-on: ${{ matrix.host }} steps: - uses: actions/checkout@v2 - - run: which go && go version && which cargo && cargo version && clang --version && openssl version - - run: scripts/reset-submodule.cmd - - run: env TEST_BIND=0 scripts/generate-bindings.sh && git diff --exit-code HEAD - - run: scripts/generate-bindings.sh + - run: sudo apt install -y protobuf-compiler + - run: which cargo && cargo version && clang --version && openssl version + - run: cargo xtask submodule + - run: env TEST_BIND=0 cargo xtask bindgen && git diff --exit-code HEAD + - run: cargo xtask codegen && git diff --exit-code HEAD; + - run: cargo xtask bindgen - run: cargo build --no-default-features - run: cargo build --no-default-features --features protobuf-codec - run: cargo build --no-default-features --features prost-codec - run: cd proto && cargo build --no-default-features --features prost-codec - run: cargo build - - run: cargo test --all + - run: cargo test --all ${{ matrix.profile }} Linux-Stable-openssl: - name: Linux-Stable-openssl - runs-on: ubuntu-latest + strategy: + matrix: + include: + - host: ubuntu-latest + profile: + suffix: + - host: ARM64 + profile: --release + suffix: -Arm64 + name: Linux-Stable-openssl${{ matrix.suffix }} + runs-on: ${{ matrix.host }} steps: - uses: actions/checkout@v2 - - run: which go && go version && which cargo && cargo version && clang --version && openssl version - - run: scripts/reset-submodule.cmd - - run: cargo test --features "openssl-vendored" --all + - run: which cargo && cargo version && clang --version && openssl version + - run: cargo xtask submodule + - run: cargo test --features "openssl-vendored" --all ${{ matrix.profile }} - run: cargo clean - - run: cargo test --features "openssl" --all + - run: cargo test --features "openssl" --all ${{ matrix.profile }} Linux-Nightly: name: Linux-Nightly @@ -60,8 +81,8 @@ jobs: steps: - uses: actions/checkout@v2 - run: rustup default nightly - - run: which go && go version && which cargo && cargo version && clang --version && openssl version - - run: scripts/reset-submodule.cmd + - run: which cargo && cargo version && clang --version && openssl version + - run: cargo xtask submodule - run: cargo build --no-default-features - run: cargo build --no-default-features --features protobuf-codec - run: cargo build --no-default-features --features prost-codec @@ -74,8 +95,8 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v2 - - run: which go && go version && which cargo && cargo version && clang --version && openssl version - - run: scripts/reset-submodule.cmd + - run: which cargo && cargo version && clang --version && openssl version + - run: cargo xtask submodule - run: cargo build --no-default-features --features use-bindgen - run: cargo build --no-default-features --features "protobuf-codec use-bindgen" - run: cargo build --no-default-features --features "prost-codec use-bindgen" @@ -88,8 +109,8 @@ jobs: steps: - uses: actions/checkout@v2 - run: brew update && brew upgrade openssl@1.1 - - run: which go && go version && which cargo && cargo version && clang --version && openssl version - - run: scripts/reset-submodule.cmd + - run: which cargo && cargo version && clang --version && openssl version + - run: cargo xtask submodule - run: OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1/" cargo test --features "openssl" --all - run: cargo test --features "openssl-vendored" --all @@ -98,12 +119,13 @@ jobs: runs-on: windows-latest env: LIBCLANG_PATH: 'C:\Program Files\LLVM\bin' + RUSTFLAGS: "" steps: - uses: actions/checkout@v2 - run: choco install -y llvm - run: refreshenv - run: go version ; cargo version ; cmake --version - - run: scripts/reset-submodule.cmd + - run: cargo xtask submodule - run: cargo build - run: cargo test --all @@ -112,7 +134,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: scripts/reset-submodule.cmd + - run: cargo xtask submodule - run: cd grpc-sys && cargo publish --dry-run - name: Check generated package size run: | |