-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.68 KB
/
ucc-benchmarks.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
name: Run Benchmarks
on:
push:
branches:
- main
workflow_dispatch:
inputs:
branch:
description: 'Branch to run benchmarks on'
required: false
default: 'main'
jobs:
run-benchmarks:
runs-on: ucc-benchmarks-8-core-U22.04
if: contains(github.event.head_commit.message, '[benchmark chore]') == false
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
# Build the Docker image
- name: Build Docker image
run: docker build -t ucc-benchmark .
# Run the benchmarks in the Docker container
- name: Run benchmarks
run: |
docker run --rm \
-v "/home/runner/work/ucc/ucc:/ucc" \
ucc-benchmark bash -c "
source /venv/bin/activate && \
./benchmarks/scripts/run_benchmarks.sh 8 && \
python ./benchmarks/scripts/plot_avg_benchmarks_over_time.py && \
python ./benchmarks/scripts/plot_latest_benchmarks.py
"
# Commit and push benchmark results
- name: Configure Git for commit
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
- name: Commit and push results
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git switch ${{ github.head_ref || github.ref_name }}
git add -f benchmarks/*
git status
git commit -m "Update benchmark results [benchmark chore]" || echo "No changes to commit"
git push origin HEAD:${{ github.head_ref || github.ref_name }} --force