-
Notifications
You must be signed in to change notification settings - Fork 50
52 lines (49 loc) · 1.5 KB
/
flamegraph.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: flamegraph
on:
push:
branches:
- main
pull_request:
branches:
- main
- "v*"
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
editor_flamegraph:
name: editor_flamegraph
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Checkout sources
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo_${{ hashFiles('**/Cargo.toml') }}
- name: Install stable@stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Bevy Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev
- name: Install Flame Dependencies
run: |
sudo apt install linux-tools-common linux-tools-generic linux-tools-`uname -r`
cargo install flamegraph
- name: Run cargo test
run: CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --bin=space_editor -o flamegraph-${{ steps.date.outputs.date }}.svg
- name: save flamegraph
uses: actions/upload-artifact@v4
with:
name: flamegraph-${{ steps.date.outputs.date }}.svg
path: "./"