feat: expire stale neighbour entries #111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpcap-dev | |
| - name: Configure CMake | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| run: cmake --build build | |
| - name: Run Tests | |
| run: cd build && ctest --output-on-failure | |
| - name: Run throughput benchmark | |
| run: | | |
| ./build/benchmark_throughput \ | |
| --workers=2 --duration=5 --warmup --json \ | |
| -o throughput_result.json | |
| - name: Run pktbuf benchmark | |
| run: | | |
| ./build/benchmark_pktbuf \ | |
| --threads=4 --ops=10000000 --warmup --json \ | |
| -o pktbuf_result.json | |
| - name: Upload baseline | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-baseline | |
| path: | | |
| throughput_result.json | |
| pktbuf_result.json | |
| overwrite: true | |
| - name: Download baseline | |
| if: github.event_name == 'pull_request' | |
| uses: dawidd6/action-download-artifact@v6 | |
| with: | |
| name: benchmark-baseline | |
| branch: main | |
| workflow: cmake.yaml | |
| path: baseline/ | |
| if_no_artifact_found: warn | |
| - name: Compare throughput | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| [ -f baseline/throughput_result.json ] || { echo "No baseline. Skipping."; exit 0; } | |
| python3 scripts/bm_compare.py \ | |
| baseline/throughput_result.json \ | |
| throughput_result.json \ | |
| --metric results.consumer.throughput_mpps \ | |
| --threshold 10 | |
| - name: Compare pktbuf | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| [ -f baseline/throughput_result.json ] || { echo "No baseline. Skipping."; exit 0; } | |
| python3 scripts/bm_compare.py \ | |
| baseline/pktbuf_result.json \ | |
| pktbuf_result.json \ | |
| --metric results.multi_thread.ops_per_sec \ | |
| --threshold 10 |