From 6a200443106bb83c6261c64c323ceb9f0563fdad Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 18 Jul 2023 18:39:00 +0200 Subject: implement flame graph generation --- .github/workflows/ci.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ce967f..731d81c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends gcovr libgit2-dev libjson-c-dev libsodium-dev libsqlite3-dev python3-pytest valgrind + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends gcovr libgit2-dev libjson-c-dev libsodium-dev libsqlite3-dev python3-pytest - name: Generate report run: make coverage - name: Upload report @@ -65,6 +65,31 @@ jobs: path: ./build/coverage/ if-no-files-found: error + flame_graphs: + runs-on: ubuntu-latest + name: Flame graphs + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install dependencies + run: | + sudo apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends libgit2-dev libjson-c-dev libsodium-dev libsqlite3-dev python3-pytest + - name: Install FlameGraph + run: | + git clone --depth 1 https://github.com/brendangregg/FlameGraph.git ~/FlameGraph + echo ~/FlameGraph >> "$GITHUB_PATH" + - name: Build + run: make install + - name: Generate flame graphs + run: sudo --preserve-env=PATH make test/perf + - name: Upload graphs + uses: actions/upload-artifact@v3 + with: + name: flame_graphs + path: ./build/flame_graphs/ + if-no-files-found: error + publish: needs: [lint, build, coverage] runs-on: ubuntu-latest -- cgit v1.2.3