Skip to content

switch to librdkafka 2.2.0 #82

switch to librdkafka 2.2.0

switch to librdkafka 2.2.0 #82

name: Build and test
on:
pull_request:
push:
branches:
- 'main'
jobs:
build_and_test_with_code_coverage:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
# actions/checkout v1.* is needed for correct codecov upload, see https://github.com/actions/checkout/issues/237 for details
- uses: actions/checkout@v1
# ensure that gradle wrapper files in repository are valid by checking checksums
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Cache konan
uses: actions/cache@v2
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-konan
restore-keys: |
${{ runner.os }}-gradle-konan
- name: Install librdkafka on Linux
if: ${{ runner.os == 'Linux' }}
run: |
wget -qO - https://packages.confluent.io/deb/7.5/archive.key | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/7.5 stable main"
sudo add-apt-repository "deb https://packages.confluent.io/clients/deb $(lsb_release -cs) main"
sudo apt-get update
sudo apt install librdkafka-dev
- name: Install librdkafka on macOS
if: ${{ runner.os == 'macOS' }}
run: |
brew install librdkafka
- name: Gradle build with remote cache
uses: burrunan/gradle-cache-action@v1
with:
arguments: |
build
-x detekt
properties: |
org.gradle.caching=true
gradle-version: wrapper
- name: Upload gradle reports
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: gradle-reports-${{ matrix.os }}
path: '**/build/reports/'
- name: Code coverage report
#if: ${{ runner.os == 'Linux' }}
if: ${{ false }}
uses: codecov/codecov-action@v1
with:
flags: unittests
fail_ci_if_error: true # optional (default = false)