-
-
Notifications
You must be signed in to change notification settings - Fork 19
74 lines (61 loc) · 2.07 KB
/
Copy pathbenchmark.yml
File metadata and controls
74 lines (61 loc) · 2.07 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
name: Benchmark
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
repository_dispatch:
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
continue-on-error: false
- name: Setup Bun
uses: oven-sh/setup-bun@v1
continue-on-error: true
- name: Install Dependencies
run: bun install || true
continue-on-error: true
- name: Install JSVU and V8
run: |
bunx jsvu --os=linux64 --engines=v8 || true
echo "${HOME}/.jsvu/bin" >> $GITHUB_PATH
continue-on-error: true
- name: Install Binaryen
run: sudo apt-get update && sudo apt-get install -y binaryen || true
continue-on-error: true
- name: Run AssemblyScript Benchmarks
run: ./run-bench.as.sh || true
continue-on-error: true
- name: Run JavaScript Benchmarks
run: ./run-bench.js.sh || true
continue-on-error: true
- name: Build Charts
run: |
mkdir -p ./build/charts
bun ./scripts/build-chart01.ts || true
bun ./scripts/build-chart02.ts || true
bun ./scripts/build-chart03.ts || true
bun ./scripts/build-chart04.ts || true
continue-on-error: true
- name: Commit Charts to docs branch
continue-on-error: true
run: |
set -e
git config user.name "github-actions"
git config user.email "actions@github.com"
# Ensure the docs branch exists locally
git fetch origin docs || true
if git rev-parse --verify docs >/dev/null 2>&1; then
git branch -D docs || true
fi
git checkout -b docs origin/docs || git checkout --orphan docs || true
# Copy generated charts
mkdir -p charts
cp build/charts/* charts/ || true
git add charts/ || true
git commit -m "Update benchmark charts [skip ci]" || echo "No changes to commit"
git push origin docs --force || true