Repository navigation
77 lines (60 loc) 路 1.93 KB
/
Copy pathflamegraphs.yml
File metadata and controls
77 lines (60 loc) 路 1.93 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: 'Flamegraphs'
on:
push:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: 'Building the flamegraph binary'
runs-on: macos-latest
steps:
- name: Checkout the repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Build the repository
uses: ./.github/actions/build
with:
target: aarch64-apple-darwin
profile: release-lto
- name: Store the build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: flamegraph-binary
path: target/aarch64-apple-darwin/release-lto
flamegraphs:
strategy:
matrix:
benchmark:
- [Next.js, next]
- [Gatsby, gatsby]
needs: [build]
name: 'Generating the ${{matrix.benchmark[0]}} flamegraphs'
runs-on: macos-latest
steps:
- name: Checkout the repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: flamegraph-binary
path: local
- name: Set the +x flag on the binaries
run: |
chmod +x local/{yarn,yarn-bin}
- name: Install Flamegraph
run: |
cargo install flamegraph@0.6.9
- name: 'Creates a temporary directory'
id: bench-dir
run: |
echo "BENCH_DIR=$(mktemp -d)" >> "$GITHUB_OUTPUT"
- name: Prepare Node
uses: ./.github/actions/prepare-node
- name: 'Run the performance test'
run: |
sudo bash scripts/bench-run.sh zpm ${{matrix.benchmark[1]}} flamegraph ${{steps.bench-dir.outputs.BENCH_DIR}}
- name: 'Upload the flamegraph'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: flamegraphs-${{matrix.benchmark[1]}}
path: ${{steps.bench-dir.outputs.BENCH_DIR}}/flamegraphs