Skip to content

Key usage policies #540

Key usage policies

Key usage policies #540

name: Build and Run Examples
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
jobs:
build:
strategy:
matrix:
transport: [ 'tcp', 'shm', 'dma' ]
asan: [ 'ASAN=1', 'ASAN=0' ]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@master
# pull and build wolfssl
- name: Checkout wolfssl
uses: actions/checkout@master
with:
repository: wolfssl/wolfssl
path: wolfssl
# Build examples
- name: Build POSIX server
run: |
if [ "${{ matrix.transport }}" = "dma" ]; then
cd examples/posix/wh_posix_server && ${{ matrix.asan }} DMA=1 make -j WOLFSSL_DIR=../../../wolfssl
else
cd examples/posix/wh_posix_server && ${{ matrix.asan }} make -j WOLFSSL_DIR=../../../wolfssl
fi
- name: Build POSIX client
run: |
if [ "${{ matrix.transport }}" = "dma" ]; then
cd examples/posix/wh_posix_client && ${{ matrix.asan }} DMA=1 make -j WOLFSSL_DIR=../../../wolfssl
else
cd examples/posix/wh_posix_client && ${{ matrix.asan }} make -j 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 }} &
POSIX_SERVER_PID=$!
echo "POSIX_SERVER_PID=$POSIX_SERVER_PID" >> $GITHUB_ENV
# Run the client that connects to the server
- name: Run POSIX client
run: |
cd examples/posix/wh_posix_client
./Build/wh_posix_client.elf --type ${{ matrix.transport }}
- name: Run POSIX demo test
if: matrix.transport == 'tcp'
run: |
cd examples/posix/wh_posix_client
./Build/wh_posix_client.elf --type ${{ matrix.transport }} --test
# Optional: Kill the server process if it doesn't exit on its own
- name: Cleanup POSIX server
if: always()
run: kill $POSIX_SERVER_PID || true