Skip to content

Commit df3d8a6

Browse files
committed
ci: allow inputs to benchmark
1 parent 90e659d commit df3d8a6

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Benchmark
33

44
on:
55
workflow_dispatch:
6+
inputs:
7+
suite:
8+
description: Benchmark suite to run
9+
debug:
10+
type: boolean
11+
description: Debugging output
612
schedule:
713
- cron: '15 4 * * *'
814

@@ -83,8 +89,19 @@ jobs:
8389
GIT2_CLI="$(pwd)/build/git2"
8490
fi
8591
92+
if [ "${{ github.event.inputs.suite }}" != "" ]; then
93+
SUITE_FLAG="--suite ${{ github.event.inputs.suite }}"
94+
fi
95+
96+
if [ "${{ github.event.inputs.debug }}" = "true" ]; then
97+
DEBUG_FLAG="--debug"
98+
fi
99+
86100
mkdir benchmark && cd benchmark
87-
../source/tests/benchmarks/benchmark.sh --baseline-cli "git" --cli "${GIT2_CLI}" --name libgit2 --json benchmarks.json --zip benchmarks.zip
101+
../source/tests/benchmarks/benchmark.sh \
102+
${SUITE_FLAG} ${DEBUG_FLAG} \
103+
--baseline-cli "git" --cli "${GIT2_CLI}" --name libgit2 \
104+
--json benchmarks.json --zip benchmarks.zip
88105
shell: bash
89106
- name: Upload results
90107
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)