This repository was archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
55 lines (46 loc) · 1.38 KB
/
benchmark.yml
File metadata and controls
55 lines (46 loc) · 1.38 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
name: benchmark
on:
pull_request:
jobs:
tests:
name: benchmark
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
path: pull-request
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.ref }}
path: pull-request-base
- name: install php
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: cache
id: cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
pull-request/target/
pull-request-base/target/
key: cargo-${{ hashFiles('pull-request-base/Cargo.lock') }}
- name: install hyperfine
if: steps.cache.outputs.cache-hit != 'true'
run: cargo install hyperfine
- name: benchmark
run: |
hyperfine --runs 10 --warmup 2 "cd pull-request && cargo test -r php_standard_library" "cd pull-request-base && cargo test -r php_standard_library"