Skip to content

Fix validation Job

Fix validation Job #2

Workflow file for this run

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: "./"