Skip to content

Release 0 1 6

Release 0 1 6 #194

Workflow file for this run

name: Build
on: [pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- "1.85" # Current MSRV due to Cargo MSRV feature
- stable
flags:
- "--all-features"
- "--no-default-features"
- "--no-default-features --features=s3-no-defaults"
- "--no-default-features --features=aws-metadata-no-defaults"
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/rust-build
with:
toolchain: ${{ matrix.toolchain }}
flags: ${{ matrix.flags }}
build-for-testing:
name: Build for testing
runs-on: ubuntu-latest
env:
RUSTFLAGS: --cfg tokio_unstable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Build
shell: bash
run: cargo build --all-features --verbose --example simple
- name: Upload artifact for testing
uses: actions/upload-artifact@v4
with:
name: example-simple
path: ./target/debug/examples/simple
build-decoder:
name: Build Decoder
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: decoder
- name: Build
working-directory: decoder
shell: bash
run: cargo build --all-features --verbose
- name: Run tests
working-directory: decoder
shell: bash
run: cargo test --all-features --verbose
- name: Upload artifact for testing
uses: actions/upload-artifact@v4
with:
name: pollcatch-decoder
path: ./decoder/target/debug/pollcatch-decoder
build-async-profiler:
name: Build async-profiler
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install async-profiler Dependencies
run: sudo apt-get install -y sudo libicu-dev patchelf curl make g++ openjdk-11-jdk-headless gcovr
- name: Build async-profiler
working-directory: tests
shell: bash
run: ./build-async-profiler.sh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libasyncProfiler
path: ./tests/async-profiler/build/lib/libasyncProfiler.so
test:
name: Integration Test
runs-on: ubuntu-latest
needs: [build-for-testing, build-decoder, build-async-profiler]
steps:
- uses: actions/checkout@v4
- name: Download pollcatch-decoder
uses: actions/download-artifact@v4
with:
name: pollcatch-decoder
path: ./tests
- name: Download example-simple
uses: actions/download-artifact@v4
with:
name: example-simple
path: ./tests
- name: Download libasyncProfiler
uses: actions/download-artifact@v4
with:
name: libasyncProfiler
path: ./tests
- name: Run integration test
shell: bash
working-directory: tests
run: chmod +x simple pollcatch-decoder && LD_LIBRARY_PATH=$PWD ./integration.sh