-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
77 lines (68 loc) · 2.5 KB
/
Copy pathaction.yml
File metadata and controls
77 lines (68 loc) · 2.5 KB
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
name: Julia precompile benchmark
description: Compare Julia precompilation latency between a pull request base and head
author: QuantumSavory
branding:
icon: clock
color: blue
inputs:
builds:
description: Number of independent package-cache builds
required: false
default: '2'
samples:
description: Number of fresh-process samples per scenario and build
required: false
default: '5'
runs:
using: composite
steps:
- name: Validate the event
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
run: |
[[ $EVENT_NAME == pull_request ]] || {
echo "julia-precompile-benchmark supports only pull_request workflows" >&2
exit 2
}
- name: Check out the pull request base
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: ${{ github.event.pull_request.base.repo.full_name }}
ref: ${{ github.event.pull_request.base.sha }}
path: base
persist-credentials: false
- name: Check out the pull request head
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
path: head
persist-credentials: false
- name: Set up Julia
uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32 # v3
with:
version: '1.12.6'
- name: Measure cold-start latency
shell: bash
env:
PRECOMPILE_BENCHMARK_BUILDS: ${{ inputs.builds }}
PRECOMPILE_BENCHMARK_SAMPLES: ${{ inputs.samples }}
PRECOMPILE_BENCHMARK_HARNESS_REPOSITORY: ${{ github.action_repository }}
PRECOMPILE_BENCHMARK_HARNESS_REF: ${{ github.action_ref }}
run: |
"$GITHUB_ACTION_PATH/run.sh" \
"$GITHUB_WORKSPACE/head/benchmark/precompile/scenarios.jl" \
"$GITHUB_WORKSPACE/cold-start-results" \
"base=$GITHUB_WORKSPACE/base" \
"head=$GITHUB_WORKSPACE/head"
- name: Add comparison to the job summary
if: always() && hashFiles('cold-start-results/summary.md') != ''
shell: bash
run: cat cold-start-results/summary.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload raw results
if: always() && hashFiles('cold-start-results/**') != ''
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: cold-start-results
path: cold-start-results