-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 1.68 KB
/
Copy pathbench.yml
File metadata and controls
69 lines (60 loc) · 1.68 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
name: bench
on:
push:
branches: [master]
pull_request:
branches: [master]
paths:
- 'src/**'
- 'benchmark/**'
- 'Cargo.toml'
- 'Cargo.lock'
jobs:
perf:
name: performance benchmarks
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
path: lake-native-compiler
- name: Checkout lake-stdlib
uses: actions/checkout@v4
with:
repository: morphqdd/lake-stdlib
path: lake-stdlib
ref: master
continue-on-error: true
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: lake-native-compiler
- name: Install toolchains
run: |
sudo apt-get update
sudo apt-get install -y \
mold gcc g++ golang \
hyperfine \
libtokio-rt-dev || true
# hyperfine via cargo as fallback
cargo install --locked hyperfine || true
- name: cargo build --release
working-directory: lake-native-compiler
run: cargo build --release
- name: Run perf benchmarks
working-directory: lake-native-compiler
env:
LAKE_PATH: ${{ github.workspace }}/lake-stdlib
run: |
if [ -d "$LAKE_PATH/std" ]; then
./benchmark/run.sh perf
else
echo "::warning::lake-stdlib missing — skipping bench"
fi
- name: Upload bench results
if: always()
uses: actions/upload-artifact@v4
with:
name: bench-results
path: lake-native-compiler/benchmark/results/
retention-days: 30