mirror of
https://github.com/coturn/coturn.git
synced 2025-11-01 23:41:09 +01:00
Merge pull request #926 from ggarber/test_build
Add github workflow to test the build is correct
This commit is contained in:
commit
a3310725d5
33
.github/workflows/tests.yml
vendored
Normal file
33
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: C/C++ CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ $default-branch ]
|
||||||
|
pull_request:
|
||||||
|
types: [ opened, reopened, synchronize ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y \
|
||||||
|
libevent-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libpq-dev libmariadb-dev libsqlite3-dev \
|
||||||
|
libhiredis-dev \
|
||||||
|
libmongoc-dev \
|
||||||
|
libmicrohttpd-dev
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: configure
|
||||||
|
run: ./configure
|
||||||
|
- name: make
|
||||||
|
run: make
|
||||||
|
- name: make check
|
||||||
|
run: make check
|
||||||
|
- name: apps tests
|
||||||
|
run: cd examples && ./run_tests.sh
|
||||||
26
examples/run_tests.sh
Executable file
26
examples/run_tests.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo 'Running turnserver'
|
||||||
|
../bin/turnserver --use-auth-secret --static-auth-secret=secret --realm=north.gov --allow-loopback-peers --no-cli > /dev/null &
|
||||||
|
echo 'Running peer client'
|
||||||
|
../bin/turnutils_peer -L 127.0.0.1 -L ::1 -L 0.0.0.0 > /dev/null &
|
||||||
|
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
echo 'Running turn client TCP'
|
||||||
|
../bin/turnutils_uclient -t -e 127.0.0.1 -X -g -u user -W secret -t 127.0.0.1 | grep "start_mclient: tot_send_bytes ~ 1000, tot_recv_bytes ~ 1000" > /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo OK
|
||||||
|
else
|
||||||
|
echo FAIL
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'Running turn client UDP'
|
||||||
|
../bin/turnutils_uclient -e 127.0.0.1 -X -g -u user -W secret -t 127.0.0.1 | grep "start_mclient: tot_send_bytes ~ 1000, tot_recv_bytes ~ 1000" > /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo OK
|
||||||
|
else
|
||||||
|
echo FAIL
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
Loading…
x
Reference in New Issue
Block a user