diff options
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r-- | .github/workflows/ci.yml | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b542c6..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,19 +22,28 @@ 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: 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: 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: sudo apt install -y protobuf-compiler - - run: which go && go version && which cargo && cargo version && clang --version && openssl version + - 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; @@ -43,18 +53,27 @@ jobs: - 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: which cargo && cargo version && clang --version && openssl version - run: cargo xtask submodule - - run: cargo test --features "openssl-vendored" --all + - 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 @@ -62,7 +81,7 @@ jobs: steps: - uses: actions/checkout@v2 - run: rustup default nightly - - run: which go && go version && which cargo && cargo version && clang --version && openssl version + - 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 @@ -76,7 +95,7 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v2 - - run: which go && go version && which cargo && cargo version && clang --version && openssl version + - 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" @@ -90,7 +109,7 @@ 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: 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 @@ -100,6 +119,7 @@ jobs: runs-on: windows-latest env: LIBCLANG_PATH: 'C:\Program Files\LLVM\bin' + RUSTFLAGS: "" steps: - uses: actions/checkout@v2 - run: choco install -y llvm |