Skip to content

Make inter-packet delay configurable via --delay-ms (#8) #17

Make inter-packet delay configurable via --delay-ms (#8)

Make inter-packet delay configurable via --delay-ms (#8) #17

Workflow file for this run

name: Tests
on:
push:
branches: [master, develop, tests]
pull_request:
branches: [master, develop, tests]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up MSYS2 (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: mingw-w64-x86_64-gcc make mingw-w64-x86_64-gtest
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgtest-dev
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install googletest
- name: Build program
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
make program LDLIBS_WIN="-lws2_32"
else
make program
fi
- name: Build tests
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
GTEST_PREFIX=$(brew --prefix googletest)
make gtests GTEST_CFLAGS="-I${GTEST_PREFIX}/include" GTEST_LDFLAGS="-L${GTEST_PREFIX}/lib"
else
make gtests
fi
- name: Run tests
run: ./GTests --gtest_filter=*
- name: Run E2E loopback tests
# Skip on Windows: SO_REUSEADDR semantics on Winsock cause one socket
# to silently capture all loopback traffic, which breaks two-process
# localhost tests. The protocol works fine across separate hosts.
if: runner.os != 'Windows'
run: make e2e