-
Notifications
You must be signed in to change notification settings - Fork 21
52 lines (45 loc) · 1.25 KB
/
watch_bench.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
name: 'Watch Benchmarks'
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'bench/**'
permissions:
issues: write
jobs:
changes:
runs-on: ubuntu-latest
outputs:
files: ${{ steps.changes.outputs.benchmarks_files }}
changes: ${{ steps.changes.outputs.benchmarks }}
steps:
- uses: actions/checkout@v3
- name: 'Detect File Changes'
uses: dorny/paths-filter@v2
id: changes
with:
list-files: json
base: ${{ github.ref }}
working-directory: bench
filters: |
benchmarks:
- added|modified: 'bench/*.mjs'
benchmark:
needs: changes
if: needs.changes.outputs.files != '[]'
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
# Parse JSON array containing names of all filters matching any of changed files
# e.g. ['add-property.js', 'array-append.js'] if both bench files contains changes
bench-file: ${{ fromJSON(needs.changes.outputs.files) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Running ${{ matrix.bench-file }}
uses: ./.github/workflows/bench.yml
with:
bench-file: ${{ matrix.bench-file }}