-
Notifications
You must be signed in to change notification settings - Fork 69
106 lines (102 loc) · 3.59 KB
/
micro-bm.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Binding Perf Tests (Micro Benchmarks)
# on:
# pull_request:
# types: [opened, synchronize, reopened, labeled]
# branches:
# - master
# Ignore micro benchmarks - micro benchmarking does not seem to be very helpful.
# We should rethink if we really need it or make it more useful.
on:
push:
branches-ignore:
- '**'
concurrency:
# Cancels pending runs when a PR gets updated.
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
openjdk-microbm:
runs-on: [self-hosted, Linux, freq-scaling-off]
if: contains(github.event.pull_request.labels.*.name, 'PR-benchmarking')
steps:
- name: Check Revisions
uses: qinsoon/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
default_env: 'OPENJDK_BINDING_TRUNK_REF=master,MMTK_CORE_TRUNK_REF=master,OPENJDK_BINDING_BRANCH_REF=master,MMTK_CORE_BRANCH_REF=${{ github.event.pull_request.head.sha }}'
# Trunk
# - binding
- name: Checkout OpenJDK Binding Trunk
uses: actions/checkout@v4
with:
repository: mmtk/mmtk-openjdk
token: ${{ secrets.GITHUB_TOKEN }}
path: mmtk-openjdk-trunk
submodules: true
ref: ${{ env.OPENJDK_BINDING_TRUNK_REF }}
# -core
- name: Checkout MMTk Core
uses: actions/checkout@v4
with:
ref: ${{ env.MMTK_CORE_TRUNK_REF }}
path: mmtk-core-trunk
# Branch
# - binding
- name: Checkout OpenJDK Binding Branch
uses: actions/checkout@v4
with:
repository: mmtk/mmtk-openjdk
token: ${{ secrets.GITHUB_TOKEN }}
path: mmtk-openjdk-branch
submodules: true
ref: ${{ env.OPENJDK_BINDING_BRANCH_REF }}
# - core
- name: Checkout MMTk Core
uses: actions/checkout@v4
with:
ref: ${{ env.MMTK_CORE_BRANCH_REF }}
path: mmtk-core-branch
# checkout perf-kit
- name: Checkout Perf Kit
uses: actions/checkout@v4
with:
repository: mmtk/ci-perf-kit
token: ${{ secrets.GITHUB_TOKEN }}
ref: "0.8.0"
path: ci-perf-kit
submodules: true
# Use rust-toolchain in the trunk (it doesnt matter much - if the toolchains defined in the trunk and the branch are different, we cant run anyway)
- name: Setup Rust Toolchain
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV
# run compare
- name: Compare Performance
id: run
run: |
./ci-perf-kit/scripts/openjdk-micro-bm.sh mmtk-openjdk-trunk/ mmtk-core-trunk/ mmtk-openjdk-branch/ mmtk-core-branch/ openjdk-rebench-report.md
# set report.md to output
- uses: pCYSl5EDgo/cat@master
id: cat
with:
path: openjdk-rebench-report.md
# upload run results
- uses: actions/upload-artifact@v4
with:
name: openjdk-rebench-data
path: ci-perf-kit/microbm/ci.data
- uses: actions/upload-artifact@v4
with:
name: openjdk-rebench-report.md
path: openjdk-rebench-report.md
# report
- name: Result
if: always()
uses: thollander/actions-comment-pull-request@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: ${{ steps.cat.outputs.text }}
# Cleanup logs (this is necessary for self-hosted runners)
- name: Clean up logs and reports
if: always()
run: |
rm -f ci-perf-kit/microbm/*.data
rm openjdk-rebench-report.md