Skip to content

Merge pull request #284 from Frauschi/dma_fixes #809

Merge pull request #284 from Frauschi/dma_fixes

Merge pull request #284 from Frauschi/dma_fixes #809

name: Build and Test Client-Only
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
jobs:
build:
strategy:
matrix:
transport: [ 'tcp', 'tls' ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# List host CPU info
- name: Host CPU info
run: cat /proc/cpuinfo
# List compiler version
- name: List compiler version
run: gcc --version
# pull and build wolfssl
- name: Checkout wolfssl
uses: actions/checkout@v4
with:
repository: wolfssl/wolfssl
path: wolfssl
# Build example server
- name: Build POSIX server
run: |
cd examples/posix/wh_posix_server
if [ "${{ matrix.transport }}" = "tcp" ]; then
make -j SHE=1 WOLFSSL_DIR=../../../wolfssl
else
make -j TLS=1 SHE=1 WOLFSSL_DIR=../../../wolfssl
fi
# Start the server in the background
- name: Run POSIX server
run: |
cd examples/posix/wh_posix_server
./Build/wh_posix_server.elf --type ${{ matrix.transport }} &
SERVER_PID=$!
echo "SERVER_PID=$SERVER_PID" >> $GITHUB_ENV
# Build and test client-only build with everything enabled and ASAN
- name: Build client-only unit tests with ASAN
run: |
cd test
make clean
if [ "${{ matrix.transport }}" = "tcp" ]; then
make -j CLIENT_ONLY=1 SHE=1 ASAN=1 WOLFSSL_DIR=../wolfssl && make run
else
make -j CLIENT_ONLY=1 TLS=1 SHE=1 ASAN=1 WOLFSSL_DIR=../wolfssl && make run
fi
# Restart server with fresh state for second test run
- name: Restart POSIX server
run: |
kill $SERVER_PID || true
cd examples/posix/wh_posix_server
rm -f *.bin || true
./Build/wh_posix_server.elf --type ${{ matrix.transport }} &
SERVER_PID=$!
echo "SERVER_PID=$SERVER_PID" >> $GITHUB_ENV
sleep 2
# Build and test client-only with DEBUG_VERBOSE=1 (includes DEBUG)
- name: Build client-only unit tests with DEBUG_VERBOSE
run: |
cd test
make clean
if [ "${{ matrix.transport }}" = "tcp" ]; then
make -j CLIENT_ONLY=1 SHE=1 DEBUG_VERBOSE=1 WOLFSSL_DIR=../wolfssl && make run
else
make -j CLIENT_ONLY=1 TLS=1 SHE=1 DEBUG_VERBOSE=1 WOLFSSL_DIR=../wolfssl && make run
fi
# Optional: Kill the server process if it doesn't exit on its own
- name: Cleanup POSIX server
if: always()
run: kill $SERVER_PID || true