Skip to content

Commit

Permalink
GitHub actions (#18)
Browse files Browse the repository at this point in the history
* Added github actions workflow to build and test rmclib

* Removed obsolete test workflow

* Added jitter and packet loss test
Added sleep statements between rmc_test start to fix timing issue

---------

Co-authored-by: Magnus Feuer <magnus@qradtechnologies.com>
  • Loading branch information
magnusfeuer and Magnus Feuer committed Dec 29, 2023
1 parent 31152db commit 44b91cd
Showing 1 changed file with 159 additions and 0 deletions.
159 changes: 159 additions & 0 deletions .github/workflows/build-rmc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: Reliable Multicast Build
run-name: ${{github.actor}} building Reliable Multicast
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
DESTDIR: ./out
steps:
- run: echo "Build ${{github.event_name}} event."
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out code
uses: actions/checkout@v4
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "The workflow is now ready to test your code on the runner."
- run: echo "This job's status is ${{ job.status }}."
- name: make
run: make all install
- run: ls -R

- name: Cache build
id: cache-rmc-build
uses: actions/cache@v3
with:
path: ./out
key: ${{runner.os}}-rmclib

test:
runs-on: ubuntu-latest
needs: build
steps:
- run: echo "Client test trigger ${{github.event_name}} event."
- name: Restore build
id: restore-rmc-build
uses: actions/cache@v3
with:
path: ./out
key: ${{runner.os}}-rmclib

- name: Basic test of 1000 signals sent from single publisher to single subscriber
run: |
./out/bin/rmc_test -S &
sleep 0.2
./out/bin/rmc_test -c 1000 &
wait
wait
echo "Basic test done"
- name: Test of five publishers sending 1,000,000 signals each to a single subscriber
run: |
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 &
sleep 0.2
./out/bin/rmc_test -i1 -c 1000000 &
sleep 0.2
./out/bin/rmc_test -i2 -c 1000000 &
sleep 0.2
./out/bin/rmc_test -i3 -c 1000000 &
sleep 0.2
./out/bin/rmc_test -i4 -c 1000000 &
sleep 0.2
./out/bin/rmc_test -i5 -c 1000000 &
wait
wait
wait
wait
wait
wait
echo "Five pub test done"
- name: Test of five subscribers receiving 1,000,000 signals from a single publisher
run: |
./out/bin/rmc_test -S &
sleep 0.2
./out/bin/rmc_test -S &
sleep 0.2
./out/bin/rmc_test -S &
sleep 0.2
./out/bin/rmc_test -S &
sleep 0.2
./out/bin/rmc_test -S &
sleep 0.2
./out/bin/rmc_test -E5 -c 10000000 &
wait
wait
wait
wait
wait
wait
echo "Fivs sub test Done"
- name: Test of five publishers sending 1,000,000 signals each to five subscribers
run: |
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 &
sleep 0.2
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 &
sleep 0.2
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 &
sleep 0.2
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 &
sleep 0.2
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 &
sleep 0.2
./out/bin/rmc_test -i1 -E5 -c 1000000 &
sleep 0.2
./out/bin/rmc_test -i2 -E5 -c 1000000 &
sleep 0.2
./out/bin/rmc_test -i3 -E5 -c 1000000 &
sleep 0.2
./out/bin/rmc_test -i4 -E5 -c 1000000 &
sleep 0.2
./out/bin/rmc_test -i5 -E5 -c 1000000 &
wait
wait
wait
wait
wait
wait
wait
wait
wait
wait
echo "Five pub and five sub test done"
- name: Jitter and packet loss test
run: |
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -S -e1 -e2 -e3 -e4 -e5 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -i1 -E5 -c 100000 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -i2 -E5 -c 100000 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -i3 -E5 -c 100000 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -i4 -E5 -c 100000 -d 0.8 -j 100000 &
sleep 0.2
./out/bin/rmc_test -i5 -E5 -c 100000 -d 0.8 -j 100000 &
wait
wait
wait
wait
wait
wait
wait
wait
wait
wait
echo "Jitter and packet loss test done"

0 comments on commit 44b91cd

Please sign in to comment.