Skip to content

Commit

Permalink
fix(ci): always run on cncf x86_64 node.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
FedeDP committed Jun 18, 2024
1 parent f2eb192 commit 768e031
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 768e031

Please sign in to comment.