-
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (56 loc) · 1.6 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
name: Benchmark
on:
push:
branches:
- 'dev-*'
pull_request:
branches:
- main
workflow_dispatch:
inputs:
target_url:
type: string
description: url of target
baseline_url:
type: string
description: url of baseline
jobs:
RunBenchmark:
runs-on: ubuntu-latest
env:
TARGET_URL: ${{ github.event.inputs.target_url || '${{ github.event.pull_request.head.repo.html_url }}#${{ github.event.pull_request.head.sha }}' }}
BASELINE_URL: ${{ github.event.inputs.baseline_url || '${{ github.event.pull_request.base.repo.html_url }}#${{ github.event.pull_request.base.sha }}' }}
steps:
-
run: |
echo "Target repo url: $TARGET_URL"
echo "Baseline repo url: $BASELINE_URL"
-
name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup main branch locally without switching current branch
if: ${{ github.event_name == 'pull_request' }}
run: git fetch origin main:main
-
name: Setup julia
uses: julia-actions/setup-julia@v1
-
name: Build pkg
uses: julia-actions/julia-buildpkg@v1
-
id: benchmark
name: Run benchmark
run: |
julia --project=benchmark benchmark/runbenchmarks-pr.jl --target=$TARGET_URL --baseline=$BASELINE_URL
-
name: Print report
run: |
cat benchmark/report.md
-
name: Upload report
uses: actions/upload-artifact@v2
with:
name: report.md
path: benchmark/report.md