Add rust-version, so that our MSRV is enforced by cargo: #538
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
env: | |
rust_version: 1.61.0 | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d | |
with: | |
toolchain: ${{ env.rust_version }} | |
components: rustfmt, clippy | |
- run: cargo fmt -- --check | |
- run: cargo clippy -- -Dwarnings | |
- run: cargo test --doc | |
check: | |
strategy: | |
matrix: | |
include: | |
- os: macos-11.0 | |
- os: windows-2019 | |
features: cmake-build,libz-static,curl-static | |
rdkafka-sys-features: cmake-build,libz-static,curl-static | |
- os: ubuntu-20.04 | |
features: tracing | |
- os: ubuntu-20.04 | |
features: cmake-build,ssl-vendored,gssapi-vendored,libz-static,curl-static,zstd | |
rdkafka-sys-features: cmake-build,ssl-vendored,gssapi-vendored,libz-static,curl-static,zstd | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d | |
with: | |
toolchain: ${{ env.rust_version }} | |
- run: cargo build --all-targets --verbose --features "${{ matrix.features }}" | |
- run: cd rdkafka-sys && cargo test --features "${{ matrix.rdkafka-sys-features }}" | |
# Use the `minimal-versions` resolver to ensure we're not claiming to support | |
# an older version of a dependency than we actually do. | |
check-minimal-versions: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d | |
with: | |
# The version of this toolchain doesn't matter much. It's only used to | |
# generate the minimal-versions lockfile, not to actually run `cargo | |
# check`. | |
toolchain: nightly | |
components: rustfmt, clippy | |
- uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d | |
with: | |
toolchain: ${{ env.rust_version }} | |
- run: rustup default ${{ env.rust_version }} | |
- run: cargo +nightly -Z minimal-versions generate-lockfile | |
- run: cargo check | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- confluent-version: 7.5.1 | |
kafka-version: 3.5 | |
- confluent-version: 5.3.1 | |
kafka-version: 2.3 | |
- confluent-version: 5.0.3 | |
kafka-version: 2.0 | |
- confluent-version: 4.1.3 | |
kafka-version: 1.1 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d | |
with: | |
toolchain: ${{ env.rust_version }} | |
- run: sudo apt-get update | |
- run: sudo apt-get install -qy valgrind | |
- run: ./test_suite.sh | |
env: | |
CONFLUENT_VERSION: ${{ matrix.confluent-version }} | |
KAFKA_VERSION: ${{ matrix.kafka-version }} | |
TERM: xterm-256color |