From 11ae5a290df859f8dcfcd36fe1e6aceaeb65c7a6 Mon Sep 17 00:00:00 2001 From: Vladimir Petrigo Date: Fri, 27 Dec 2024 16:26:29 +0100 Subject: [PATCH] Update CI workflow to manage NTP server and store results. Added steps to start and stop an NTP server during benchmarking, enhancing test isolation. Benchmark results are now stored with a dedicated action, improving result accessibility. This update simplifies the workflow and ensures better resource handling. --- .github/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8329669..e4b8d30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,14 @@ jobs: - uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v4 + - name: Start test NTP server + run: uvx --from git+https://github.com/vpetrigo/ntpserver@master ntpserver > /dev/null & - name: Run benchmarking - run: | - uvx --from git+https://github.com/vpetrigo/ntpserver@master ntpserver > /dev/null & - cargo bench --features sync + run: cargo bench --features sync | tee output.txt + - name: Kill NTP server + run: pgrep -f ntpserver | xargs kill + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + tool: 'cargo' + output-file-path: output.txt