-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (79 loc) · 3.15 KB
/
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
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
name: Run Benchmarks
on:
release:
types: [released]
env:
JAVA_VERSION: 17
JAVA_PACKAGE: jdk
JAVA_ARCH: x64
JAVA_DISTRO: temurin
jobs:
benchmarks:
name: Benchmarks
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
benchmark: [codegen, dao]
steps:
- id: checkout
name: Clone Git Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: last_release
name: Fetch last release info
run: echo "tag=$(gh release view --json tagName --jq '.tagName')" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: java
name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
java-package: ${{ env.JAVA_PACKAGE }}
architecture: ${{ env.JAVA_ARCH }}
distribution: ${{ env.JAVA_DISTRO }}
cache: maven
- id: run-benchmark
name: Run Benchmark [${{ matrix.benchmark }}]
run: mvn --batch-mode --projects yosql-benchmarks/yosql-benchmarks-${{ matrix.benchmark }} --also-make --activate-profiles benchmarks verify --define org.slf4j.simpleLogger.log.yosql=warn --define skipTests 2>&1 1> build.log
- id: copy-results
name: Copy ${{ matrix.benchmark }} Results
run: cp --force ./yosql-benchmarks/yosql-benchmarks-${{ matrix.benchmark }}/target/benchmark/yosql-benchmarks-${{ matrix.benchmark }}.json ./yosql-website/content/benchmarks/results/yosql-benchmarks-${{ matrix.benchmark }}-${{ steps.last_release.outputs.tag }}.json
- id: replace-results
name: Replace CURRENT ${{ matrix.benchmark }} Results
run: cp --force ./yosql-benchmarks/yosql-benchmarks-${{ matrix.benchmark }}/target/benchmark/yosql-benchmarks-${{ matrix.benchmark }}.json ./yosql-website/content/benchmarks/results/yosql-benchmarks-${{ matrix.benchmark }}-CURRENT.json
- id: push
name: Push Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update benchmark data for ${{ steps.last_release.outputs.tag }}
file_pattern: yosql-website/*.json
- id: cpr
name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PAT }}
commit-message: Update benchmarks for latest release
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: Update benchmarks for latest release
body: ${{ steps.gwu.outputs.version-information }}
labels: |
Release :: Ignore
Benchmarks :: CodeGen
Benchmarks :: DAO
Priority :: Low
Type :: Task
assignees: sebhoss
draft: false
base: main
branch: update-benchmarks
delete-branch: true
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge --rebase --auto "${{ steps.cpr.outputs.pull-request-number }}"
with:
token: ${{ secrets.PAT }}