-
Notifications
You must be signed in to change notification settings - Fork 98
69 lines (66 loc) · 2.73 KB
/
benchmark.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Benchmark
on:
pull_request:
branches:
- main
types:
- closed
workflow_dispatch:
jobs:
run-benchmarks:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && !contains(github.event.pull_request.title, '[IGNORE]'))
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.21.1"
- name: Install crystal
uses: crystal-lang/install-crystal@v1
- name: Install zig
uses: goto-bus-stop/setup-zig@v2
- name: Install Julia
uses: julia-actions/setup-julia@v1
- name: Install Vlang
uses: vlang/setup-v@v1.3
- name: Install odin
run: |
wget https://github.com/odin-lang/Odin/releases/download/dev-2023-08/odin-ubuntu-amd64-dev-2023-08.zip -O odin.zip
unzip odin.zip -d odin_exe
chmod +x $GITHUB_WORKSPACE/odin_exe/odin
echo "$GITHUB_WORKSPACE/odin_exe" >> $GITHUB_PATH
- name: Install hyperfine for benchmarking
run: |
wget https://github.com/sharkdp/hyperfine/releases/download/v1.17.0/hyperfine_1.17.0_amd64.deb -O hyperfine.deb
sudo dpkg -i hyperfine.deb
- name: Install dart
uses: dart-lang/setup-dart@v1
- name: Run Benchmark
run: ./run.sh all raw_results.md
- name: Clean up
run: rm -rf odin_exe && rm hyperfine.deb
# - name: Push results to repo
# uses: github-actions-x/commit@v2.9
# with:
# commit-message: "Update benchmark results"
# files: raw_results.md
# push-branch: main
# github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Modify Readme
run: dart extract/extract.dart raw_results.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_REPO_TOKEN }}
commit-message: Update benchmark results
title: "[IGNORE] Update benchmark results"
body: "New benchmark results"
labels: automated pr
branch: benchmark-results
add-paths: |
raw_results.md
readme.md