From 768e03186a665b6d2cbdbd59010904ec17e9e7f2 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Tue, 18 Jun 2024 12:41:21 +0200 Subject: [PATCH] fix(ci): always run on cncf x86_64 node. Since we need to guarantee same-machine reproducibility for the perf reports, it is better to run perf CI on our own node. Also, do not upload perf data for PR since to be actually useful, we should `perf archive` it and upload the archive. But then it would become too much large. Signed-off-by: Federico Di Pierro --- .github/workflows/perf.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 9d2023a36e..88fa889163 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -13,7 +13,7 @@ concurrency: jobs: perf-libs-linux-amd64: - runs-on: 'ubuntu-22.04' + runs-on: [ "self-hosted", "linux", "X64" ] steps: - name: Checkout Libs ⤵️ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -32,20 +32,12 @@ jobs: make unit-test-libsinsp -j4 - name: Run Perf + shell: bash run: | cd build - sudo perf record --call-graph dwarf ./libsinsp/test/unit-test-libsinsp + sudo perf record --call-graph dwarf -o perf.data -q libsinsp/test/unit-test-libsinsp - - name: Archive perf report (PR) - if: github.event_name == 'pull_request' - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: perf_report - retention-days: 1 # just 1 day because they are big and there can be multiple ones (ie: on each push to the PR) - path: build/perf.data - if-no-files-found: error - - - name: Archive perf report (master) + - name: Archive master perf report if: github.event_name == 'push' uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: