mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-16 00:00:12 +02:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Stress Test
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
RUSTFLAGS: -Dwarnings
|
|
RUST_BACKTRACE: 1
|
|
# Change to specific Rust release to pin
|
|
rust_stable: stable
|
|
|
|
jobs:
|
|
stress-test:
|
|
name: Stress Test
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
stress-test:
|
|
- simple_echo_tcp
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Rust ${{ env.rust_stable }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ env.rust_stable }}
|
|
override: true
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Install Valgrind
|
|
uses: taiki-e/install-action@valgrind
|
|
|
|
# Compiles each of the stress test examples.
|
|
- name: Compile stress test examples
|
|
run: cargo build -p stress-test --release --example ${{ matrix.stress-test }}
|
|
|
|
# Runs each of the examples using Valgrind. Detects leaks and displays them.
|
|
- name: Run valgrind
|
|
run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/release/examples/${{ matrix.stress-test }}
|